From: Thierry Reding Date: Tue, 5 Aug 2014 06:59:01 +0000 (+0200) Subject: drm/panel: ld9040: Replace upcasting macro by function X-Git-Tag: v4.14-rc1~7068^2~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dff2ed275454b5a69b785949be73e2dcbb686e3f;p=platform%2Fkernel%2Flinux-rpi.git drm/panel: ld9040: Replace upcasting macro by function Using a function instead of a macro provides proper type checking. Signed-off-by: Thierry Reding --- diff --git a/drivers/gpu/drm/panel/panel-ld9040.c b/drivers/gpu/drm/panel/panel-ld9040.c index c6aa7f7..42ac67b 100644 --- a/drivers/gpu/drm/panel/panel-ld9040.c +++ b/drivers/gpu/drm/panel/panel-ld9040.c @@ -110,7 +110,10 @@ struct ld9040 { int error; }; -#define panel_to_ld9040(p) container_of(p, struct ld9040, panel) +static inline struct ld9040 *panel_to_ld9040(struct drm_panel *panel) +{ + return container_of(panel, struct ld9040, panel); +} static int ld9040_clear_error(struct ld9040 *ctx) {