summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm/hdlcd_drv.h
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@redhat.com>2022-10-26 17:34:29 +0200
committerLiviu Dudau <liviu.dudau@arm.com>2022-11-07 20:47:34 +0000
commit5f56e596dd7562c04137eed1f220703ad7111087 (patch)
treed050d73f80b03a477d4923d55e2f774f5f61359b /drivers/gpu/drm/arm/hdlcd_drv.h
parent9914013fe65647b5c0afc732da1adc9bc62a0a26 (diff)
drm/arm/hdlcd: replace drm->dev_private with drm_to_hdlcd_priv()
Using drm_device->dev_private is deprecated. Since we've switched to devm_drm_dev_alloc(), struct drm_device is now embedded in struct hdlcd_drm_private, hence we can use container_of() to get the struct drm_device instance instead. Signed-off-by: Danilo Krummrich <dakr@redhat.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221026153431.72033-3-dakr@redhat.com
Diffstat (limited to 'drivers/gpu/drm/arm/hdlcd_drv.h')
-rw-r--r--drivers/gpu/drm/arm/hdlcd_drv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.h b/drivers/gpu/drm/arm/hdlcd_drv.h
index 3892b36767ac..f1c1da2ac2db 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.h
+++ b/drivers/gpu/drm/arm/hdlcd_drv.h
@@ -21,6 +21,7 @@ struct hdlcd_drm_private {
#endif
};
+#define drm_to_hdlcd_priv(x) container_of(x, struct hdlcd_drm_private, base)
#define crtc_to_hdlcd_priv(x) container_of(x, struct hdlcd_drm_private, crtc)
static inline void hdlcd_write(struct hdlcd_drm_private *hdlcd,