diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-09-04 17:39:19 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-09-11 11:47:19 +0300 |
commit | dad75a5208ec88779d9ccd2c95ef5de659209208 (patch) | |
tree | 90fff985de63bda54c18a39ca81048f90bfee6f8 /drivers/gpu/drm/armada/armada_drv.c | |
parent | 90ad200b4cbc92e160c3f3331bb999f87cc0fbfd (diff) | |
download | linux-dad75a5208ec88779d9ccd2c95ef5de659209208.tar.xz |
drm/armada: Don't use drm_device->dev_private
Upcasting using a container_of macro is more typesafe, faster and
easier for the compiler to optimize.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: Russell King <linux@armlinux.org.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200904143941.110665-3-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/armada/armada_drv.c')
-rw-r--r-- | drivers/gpu/drm/armada/armada_drv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index a8d5908b3922..980d3f1f8f16 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -106,8 +106,6 @@ static int armada_drm_bind(struct device *dev) return ret; } - priv->drm.dev_private = priv; - dev_set_drvdata(dev, &priv->drm); /* Mode setting support */ @@ -169,7 +167,7 @@ static int armada_drm_bind(struct device *dev) static void armada_drm_unbind(struct device *dev) { struct drm_device *drm = dev_get_drvdata(dev); - struct armada_private *priv = drm->dev_private; + struct armada_private *priv = drm_to_armada_dev(drm); drm_kms_helper_poll_fini(&priv->drm); armada_fbdev_fini(&priv->drm); |