aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/imx/imx-ldb.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2016-07-06 09:47:11 -0400
committerPhilipp Zabel <p.zabel@pengutronix.de>2016-07-12 12:24:29 -0400
commit3df0739052c23989b441883fa251a0988f75c0f3 (patch)
tree5e24ea8b63f4b36191e81b9dd2f792a57de0f8fb /drivers/gpu/drm/imx/imx-ldb.c
parent49f98bc4d44a4ee507737f8d5531d05539787319 (diff)
drm/imx: turn remaining container_of macros into inline functions
This allows the compiler to do type checking. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-ldb.c')
-rw-r--r--drivers/gpu/drm/imx/imx-ldb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 9ac833540080..00d67b5407d8 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -51,8 +51,6 @@
51#define LDB_DI1_VS_POL_ACT_LOW (1 << 10) 51#define LDB_DI1_VS_POL_ACT_LOW (1 << 10)
52#define LDB_BGREF_RMODE_INT (1 << 15) 52#define LDB_BGREF_RMODE_INT (1 << 15)
53 53
54#define con_to_imx_ldb_ch(x) container_of(x, struct imx_ldb_channel, connector)
55
56struct imx_ldb; 54struct imx_ldb;
57 55
58struct imx_ldb_channel { 56struct imx_ldb_channel {
@@ -70,6 +68,11 @@ struct imx_ldb_channel {
70 u32 bus_format; 68 u32 bus_format;
71}; 69};
72 70
71static inline struct imx_ldb_channel *con_to_imx_ldb_ch(struct drm_connector *c)
72{
73 return container_of(c, struct imx_ldb_channel, connector);
74}
75
73static inline struct imx_ldb_channel *enc_to_imx_ldb_ch(struct drm_encoder *e) 76static inline struct imx_ldb_channel *enc_to_imx_ldb_ch(struct drm_encoder *e)
74{ 77{
75 return container_of(e, struct imx_ldb_channel, encoder); 78 return container_of(e, struct imx_ldb_channel, encoder);