drm/tilcdc: fix release order on exit
authorGuido Martínez <guido@vanguardiasur.com.ar>
Tue, 17 Jun 2014 14:17:08 +0000 (11:17 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:52:08 +0000 (14:52 -0700)
commit eb565a2bbadc6a5030a6dbe58db1aa52453e7edf upstream.

Unregister resources in the correct order on tilcdc_drm_fini, which is
the reverse order they were registered during tilcdc_drm_init.

This also means unregistering the driver before releasing its resources.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Tested-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/tilcdc/tilcdc_drv.c

index de34657..0644429 100644 (file)
@@ -629,10 +629,10 @@ static int __init tilcdc_drm_init(void)
 static void __exit tilcdc_drm_fini(void)
 {
        DBG("fini");
-       tilcdc_tfp410_fini();
-       tilcdc_slave_fini();
-       tilcdc_panel_fini();
        platform_driver_unregister(&tilcdc_platform_driver);
+       tilcdc_panel_fini();
+       tilcdc_slave_fini();
+       tilcdc_tfp410_fini();
 }
 
 late_initcall(tilcdc_drm_init);