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)
committerDave Airlie <airlied@redhat.com>
Tue, 8 Jul 2014 01:25:21 +0000 (11:25 +1000)
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>
Cc: <stable@vger.kernel.org> #v3.9+
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/tilcdc/tilcdc_drv.c

index 490aee79e1065e2cb98fdba079e4a8bc70f40eb5..006a30e90390f0d752465d99d539288805732d3f 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);