summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/imx/imx-ldb.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2016-07-06 15:47:11 +0200
committerPhilipp Zabel <p.zabel@pengutronix.de>2016-07-12 18:24:29 +0200
commit3df0739052c23989b441883fa251a0988f75c0f3 (patch)
tree5e24ea8b63f4b36191e81b9dd2f792a57de0f8fb /drivers/gpu/drm/imx/imx-ldb.c
parent49f98bc4d44a4ee507737f8d5531d05539787319 (diff)
downloadlinux-3df0739052c23989b441883fa251a0988f75c0f3.tar.bz2
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 @@
#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);