Commit 020a9ea7 authored by Russell King's avatar Russell King Committed by Greg Kroah-Hartman

imx-drm: imx-drm-core: avoid going the long route round for drm_device

We have the drm_device available, so rather than storing it and then
using the stored version, us the one we already have available to us.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Tested-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b5ea1492
...@@ -88,9 +88,9 @@ static int imx_drm_driver_unload(struct drm_device *drm) ...@@ -88,9 +88,9 @@ static int imx_drm_driver_unload(struct drm_device *drm)
imx_drm_device_put(); imx_drm_device_put();
drm_vblank_cleanup(imxdrm->drm); drm_vblank_cleanup(drm);
drm_kms_helper_poll_fini(imxdrm->drm); drm_kms_helper_poll_fini(drm);
drm_mode_config_cleanup(imxdrm->drm); drm_mode_config_cleanup(drm);
return 0; return 0;
} }
...@@ -424,15 +424,15 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags) ...@@ -424,15 +424,15 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)
mutex_lock(&imxdrm->mutex); mutex_lock(&imxdrm->mutex);
drm_kms_helper_poll_init(imxdrm->drm); drm_kms_helper_poll_init(drm);
/* setup the grouping for the legacy output */ /* setup the grouping for the legacy output */
ret = drm_mode_group_init_legacy_group(imxdrm->drm, ret = drm_mode_group_init_legacy_group(drm,
&imxdrm->drm->primary->mode_group); &drm->primary->mode_group);
if (ret) if (ret)
goto err_kms; goto err_kms;
ret = drm_vblank_init(imxdrm->drm, MAX_CRTC); ret = drm_vblank_init(drm, MAX_CRTC);
if (ret) if (ret)
goto err_kms; goto err_kms;
...@@ -441,7 +441,7 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags) ...@@ -441,7 +441,7 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)
* by drm timer once a current process gives up ownership of * by drm timer once a current process gives up ownership of
* vblank event.(after drm_vblank_put function is called) * vblank event.(after drm_vblank_put function is called)
*/ */
imxdrm->drm->vblank_disable_allowed = true; drm->vblank_disable_allowed = true;
if (!imx_drm_device_get()) { if (!imx_drm_device_get()) {
ret = -EINVAL; ret = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment