diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2020-12-03 18:21:55 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2021-01-05 07:20:04 +0200 |
commit | a476f9e8c00c6042f002b411305de7abdcacac5f (patch) | |
tree | 7f201ac9f6cc030f99707926fc03d7b9fe822647 /drivers/gpu/drm/rcar-du/rcar_du_drv.h | |
parent | ea6aae151887070936a7bc5c91654bd8845335a0 (diff) |
drm: rcar-du: Replace dev_private with container_of
Now that drm_device is embedded in rcar_du_device, we can use
container_of to get the rcar_du_device pointer from the drm_device,
instead of using the drm_device.dev_private field.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_drv.h')
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_drv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.h b/drivers/gpu/drm/rcar-du/rcar_du_drv.h index 0b1726fd7bdb..02ca2d0e1b55 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.h +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.h @@ -99,6 +99,11 @@ struct rcar_du_device { unsigned int vspd1_sink; }; +static inline struct rcar_du_device *to_rcar_du_device(struct drm_device *dev) +{ + return container_of(dev, struct rcar_du_device, ddev); +} + static inline bool rcar_du_has(struct rcar_du_device *rcdu, unsigned int feature) { |