summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_gem.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2017-10-13 17:58:58 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-12-19 11:32:00 +0300
commit7fb15c480eea29a16f6a0568ce3ee5d5f40ef9c6 (patch)
tree3bea59f3e684bc2e4074fdb51bd5c91063bf211d /drivers/gpu/drm/omapdrm/omap_gem.c
parent7a228a0d7e4e12c3bf1ee442d6c73aae39dc296a (diff)
downloadlinux-7fb15c480eea29a16f6a0568ce3ee5d5f40ef9c6.tar.xz
drm: omapdrm: Pass drm_device to omap_gem_resume()
The omap_gem_resume() function is internal to the driver. Pass it a drm_device pointer that the caller already has instead of looking it up from device data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_gem.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index 5c5c86ddd6f4..fd81396baaf9 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -996,10 +996,9 @@ void *omap_gem_vaddr(struct drm_gem_object *obj)
#ifdef CONFIG_PM
/* re-pin objects in DMM in resume path: */
-int omap_gem_resume(struct device *dev)
+int omap_gem_resume(struct drm_device *dev)
{
- struct drm_device *drm_dev = dev_get_drvdata(dev);
- struct omap_drm_private *priv = drm_dev->dev_private;
+ struct omap_drm_private *priv = dev->dev_private;
struct omap_gem_object *omap_obj;
int ret = 0;
@@ -1012,7 +1011,7 @@ int omap_gem_resume(struct device *dev)
omap_obj->pages, npages,
omap_obj->roll, true);
if (ret) {
- dev_err(dev, "could not repin: %d\n", ret);
+ dev_err(dev->dev, "could not repin: %d\n", ret);
return ret;
}
}