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 b9009b3..69d0ef6 100644 (file)
@@ -120,7 +120,7 @@ static int arcpgu_load(struct drm_device *drm)
                return -ENODEV;
        }
 
-       platform_set_drvdata(pdev, arcpgu);
+       platform_set_drvdata(pdev, drm);
        return 0;
 }