]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00317981: drm: vivante: drm_platform_exit is gone
authorShawn Guo <shawn.guo@freescale.com>
Fri, 13 Jun 2014 03:37:29 +0000 (11:37 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:16:22 +0000 (21:16 -0600)
The function drm_platform_exit() is removed by commit e2577d455adb (drm:
rip out drm_platform_exit).  To fix the build error below, we need to
call drm_put_dev directly.

  CC      drivers/gpu/drm/vivante/vivante_drv.o
drivers/gpu/drm/vivante/vivante_drv.c: In function ‘vivante_exit’:
drivers/gpu/drm/vivante/vivante_drv.c:100:3: error: implicit declaration of function ‘drm_platform_exit’ [-Werror=implicit-function-declaration]

Note, this only works with commit "ENGR00317981: drm: set drm_device
pointer into drvdata".

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
drivers/gpu/drm/vivante/vivante_drv.c

index c9878e359f26bcf85a5ccc620483235d667a0e66..d5a915bba192137ffdb7f74ff7f3b825e4c7ac4e 100644 (file)
@@ -95,7 +95,8 @@ static int __init vivante_init(void)
 static void __exit vivante_exit(void)
 {
        if (pplatformdev) {
-               drm_platform_exit(&driver, pplatformdev);
+               /* The drvdata is set in drm_get_platform_dev() */
+               drm_put_dev(platform_get_drvdata(pplatformdev));
                platform_device_unregister(pplatformdev);
                pplatformdev = NULL;
        }