drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers
[sfrench/cifs-2.6.git] / drivers / gpu / drm / aspeed / aspeed_gfx_drv.c
index d207b03f8357c7380e331615e06cd7e8283873c5..78122b35a0cbb347fcd2e4dfce139800e26aba65 100644 (file)
@@ -358,11 +358,18 @@ static void aspeed_gfx_remove(struct platform_device *pdev)
        sysfs_remove_group(&pdev->dev.kobj, &aspeed_sysfs_attr_group);
        drm_dev_unregister(drm);
        aspeed_gfx_unload(drm);
+       drm_atomic_helper_shutdown(drm);
+}
+
+static void aspeed_gfx_shutdown(struct platform_device *pdev)
+{
+       drm_atomic_helper_shutdown(platform_get_drvdata(pdev));
 }
 
 static struct platform_driver aspeed_gfx_platform_driver = {
        .probe          = aspeed_gfx_probe,
        .remove_new     = aspeed_gfx_remove,
+       .shutdown       = aspeed_gfx_shutdown,
        .driver = {
                .name = "aspeed_gfx",
                .of_match_table = aspeed_gfx_match,