diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2016-07-06 16:47:11 +0300 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-07-12 19:24:29 +0300 |
commit | 3df0739052c23989b441883fa251a0988f75c0f3 (patch) | |
tree | 5e24ea8b63f4b36191e81b9dd2f792a57de0f8fb /drivers/gpu/drm/imx/parallel-display.c | |
parent | 49f98bc4d44a4ee507737f8d5531d05539787319 (diff) | |
download | linux-3df0739052c23989b441883fa251a0988f75c0f3.tar.xz |
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/parallel-display.c')
-rw-r--r-- | drivers/gpu/drm/imx/parallel-display.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c index 9da60df5efa7..7b7bb3100831 100644 --- a/drivers/gpu/drm/imx/parallel-display.c +++ b/drivers/gpu/drm/imx/parallel-display.c @@ -26,8 +26,6 @@ #include "imx-drm.h" -#define con_to_imxpd(x) container_of(x, struct imx_parallel_display, connector) - struct imx_parallel_display { struct drm_connector connector; struct drm_encoder encoder; @@ -39,6 +37,11 @@ struct imx_parallel_display { struct drm_panel *panel; }; +static inline struct imx_parallel_display *con_to_imxpd(struct drm_connector *c) +{ + return container_of(c, struct imx_parallel_display, connector); +} + static inline struct imx_parallel_display *enc_to_imxpd(struct drm_encoder *e) { return container_of(e, struct imx_parallel_display, encoder); |