summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rcar-du/rcar_du_encoder.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-03-31 03:50:16 +0400
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-11-26 21:09:37 +0300
commit4b96b70cfa465550eb9d7112c28e8b5a4093e022 (patch)
tree07098c697281fce96743d440b9807a6e4b5cee62 /drivers/gpu/drm/rcar-du/rcar_du_encoder.h
parent3ea4d5ec68fa5dc489ee1e4fe3ff07e4ddf0459d (diff)
downloadlinux-4b96b70cfa465550eb9d7112c28e8b5a4093e022.tar.xz
drm: rcar-du: Replace direct DRM encoder access with cast macro
Add a new macro to downcast an rcar_du_encoder pointer to a drm_encoder pointer and use it. This prepares for the replacement of the rcar_drm_encoder encoder field with a drm_slave_encoder. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_encoder.h')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_encoder.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.h b/drivers/gpu/drm/rcar-du/rcar_du_encoder.h
index 4b906b90c204..c6334b4280d9 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.h
@@ -35,6 +35,8 @@ struct rcar_du_encoder {
#define to_rcar_encoder(e) \
container_of(e, struct rcar_du_encoder, encoder)
+#define rcar_encoder_to_drm_encoder(e) (&(e)->encoder)
+
struct rcar_du_connector {
struct drm_connector connector;
struct rcar_du_encoder *encoder;