diff options
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_drv.h')
-rw-r--r-- | drivers/gpu/drm/v3d/v3d_drv.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_drv.h b/drivers/gpu/drm/v3d/v3d_drv.h index e0775c884553..8a390738d65b 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.h +++ b/drivers/gpu/drm/v3d/v3d_drv.h @@ -14,7 +14,6 @@ #include "uapi/drm/v3d_drm.h" struct clk; -struct device; struct platform_device; struct reset_control; @@ -47,8 +46,6 @@ struct v3d_dev { int ver; bool single_irq_line; - struct device *dev; - struct platform_device *pdev; void __iomem *hub_regs; void __iomem *core_regs[3]; void __iomem *bridge_regs; @@ -121,7 +118,7 @@ struct v3d_dev { static inline struct v3d_dev * to_v3d_dev(struct drm_device *dev) { - return (struct v3d_dev *)dev->dev_private; + return container_of(dev, struct v3d_dev, drm); } static inline bool @@ -130,6 +127,8 @@ v3d_has_csd(struct v3d_dev *v3d) return v3d->ver >= 41; } +#define v3d_to_pdev(v3d) to_platform_device((v3d)->drm.dev) + /* The per-fd struct, which tracks the MMU mappings. */ struct v3d_file_priv { struct v3d_dev *v3d; |