From: Daniel Vetter Date: Wed, 11 Dec 2013 10:34:24 +0000 (+0100) Subject: drm/imx: directly call drm_put_dev in ->remove X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9076dccfc532e1b00cb181304d3066aeb19ad45b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/imx: directly call drm_put_dev in ->remove Again no apparent user of the driver data field. Cc: Sascha Hauer Cc: Greg Kroah-Hartman Acked-by: Sascha Hauer Signed-off-by: Daniel Vetter Signed-off-by: Dave Airlie --- diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 6bd015ac9d68..0507b662ae40 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -444,6 +444,8 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags) if (!imx_drm_device_get()) ret = -EINVAL; + platform_set_drvdata(drm->platformdev, drm); + ret = 0; err_init: @@ -829,7 +831,7 @@ static int imx_drm_platform_probe(struct platform_device *pdev) static int imx_drm_platform_remove(struct platform_device *pdev) { - drm_platform_exit(&imx_drm_driver, pdev); + drm_put_dev(platform_get_drvdata(pdev)); return 0; }