drm: arcpgu: Fix module unload
authorJose Abreu <Jose.Abreu@synopsys.com>
Mon, 17 Jul 2017 12:08:26 +0000 (13:08 +0100)
committerAlexey Brodkin <abrodkin@synopsys.com>
Wed, 2 Aug 2017 21:11:02 +0000 (00:11 +0300)
At module unload we are expecting a struct drm_device but at
probing we are not setting it right. Fix this and correct the
arcpgu module unload.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Fixes: 0c4250e7b15e ("drm: Add support of ARC PGU display controller")
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
drivers/gpu/drm/arc/arcpgu_drv.c

index b9009b31dd455e5efb62c055e4a7b643103689f4..69d0ef684f7ba7299e1d9fd58511261832de400b 100644 (file)
@@ -120,7 +120,7 @@ static int arcpgu_load(struct drm_device *drm)
                return -ENODEV;
        }
 
                return -ENODEV;
        }
 
-       platform_set_drvdata(pdev, arcpgu);
+       platform_set_drvdata(pdev, drm);
        return 0;
 }
 
        return 0;
 }