diff options
| -rw-r--r-- | drivers/gpu/drm/drm_platform.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/shmobile/shmob_drm_drv.c | 12 |
2 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c index aaeb6f8d69ce..b8a282ea8751 100644 --- a/drivers/gpu/drm/drm_platform.c +++ b/drivers/gpu/drm/drm_platform.c | |||
| @@ -64,7 +64,6 @@ int drm_get_platform_dev(struct platform_device *platdev, | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | if (drm_core_check_feature(dev, DRIVER_MODESET)) { | 66 | if (drm_core_check_feature(dev, DRIVER_MODESET)) { |
| 67 | dev_set_drvdata(&platdev->dev, dev); | ||
| 68 | ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL); | 67 | ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL); |
| 69 | if (ret) | 68 | if (ret) |
| 70 | goto err_g1; | 69 | goto err_g1; |
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index c71d493fd0c5..1c350fc4e449 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c | |||
| @@ -201,6 +201,8 @@ static int shmob_drm_load(struct drm_device *dev, unsigned long flags) | |||
| 201 | goto done; | 201 | goto done; |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | platform_set_drvdata(pdev, sdev); | ||
| 205 | |||
| 204 | done: | 206 | done: |
| 205 | if (ret) | 207 | if (ret) |
| 206 | shmob_drm_unload(dev); | 208 | shmob_drm_unload(dev); |
| @@ -299,11 +301,9 @@ static struct drm_driver shmob_drm_driver = { | |||
| 299 | #if CONFIG_PM_SLEEP | 301 | #if CONFIG_PM_SLEEP |
| 300 | static int shmob_drm_pm_suspend(struct device *dev) | 302 | static int shmob_drm_pm_suspend(struct device *dev) |
| 301 | { | 303 | { |
| 302 | struct platform_device *pdev = to_platform_device(dev); | 304 | struct shmob_drm_device *sdev = dev_get_drvdata(dev); |
| 303 | struct drm_device *ddev = platform_get_drvdata(pdev); | ||
| 304 | struct shmob_drm_device *sdev = ddev->dev_private; | ||
| 305 | 305 | ||
| 306 | drm_kms_helper_poll_disable(ddev); | 306 | drm_kms_helper_poll_disable(sdev->ddev); |
| 307 | shmob_drm_crtc_suspend(&sdev->crtc); | 307 | shmob_drm_crtc_suspend(&sdev->crtc); |
| 308 | 308 | ||
| 309 | return 0; | 309 | return 0; |
| @@ -311,9 +311,7 @@ static int shmob_drm_pm_suspend(struct device *dev) | |||
| 311 | 311 | ||
| 312 | static int shmob_drm_pm_resume(struct device *dev) | 312 | static int shmob_drm_pm_resume(struct device *dev) |
| 313 | { | 313 | { |
| 314 | struct platform_device *pdev = to_platform_device(dev); | 314 | struct shmob_drm_device *sdev = dev_get_drvdata(dev); |
| 315 | struct drm_device *ddev = platform_get_drvdata(pdev); | ||
| 316 | struct shmob_drm_device *sdev = ddev->dev_private; | ||
| 317 | 315 | ||
| 318 | mutex_lock(&sdev->ddev->mode_config.mutex); | 316 | mutex_lock(&sdev->ddev->mode_config.mutex); |
| 319 | shmob_drm_crtc_resume(&sdev->crtc); | 317 | shmob_drm_crtc_resume(&sdev->crtc); |
