From 3df0739052c23989b441883fa251a0988f75c0f3 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Wed, 6 Jul 2016 15:47:11 +0200 Subject: drm/imx: turn remaining container_of macros into inline functions This allows the compiler to do type checking. Signed-off-by: Philipp Zabel --- drivers/gpu/drm/imx/imx-ldb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/imx/imx-ldb.c') 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 @@ #define LDB_DI1_VS_POL_ACT_LOW (1 << 10) #define LDB_BGREF_RMODE_INT (1 << 15) -#define con_to_imx_ldb_ch(x) container_of(x, struct imx_ldb_channel, connector) - struct imx_ldb; struct imx_ldb_channel { @@ -70,6 +68,11 @@ struct imx_ldb_channel { u32 bus_format; }; +static inline struct imx_ldb_channel *con_to_imx_ldb_ch(struct drm_connector *c) +{ + return container_of(c, struct imx_ldb_channel, connector); +} + static inline struct imx_ldb_channel *enc_to_imx_ldb_ch(struct drm_encoder *e) { return container_of(e, struct imx_ldb_channel, encoder); -- cgit v1.2.3