Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: ld9040: Replace upcasting macro by function

Using a function instead of a macro provides proper type checking.

Signed-off-by: Thierry Reding <treding@nvidia.com>

+4 -1
+4 -1
drivers/gpu/drm/panel/panel-ld9040.c
··· 110 110 int error; 111 111 }; 112 112 113 - #define panel_to_ld9040(p) container_of(p, struct ld9040, panel) 113 + static inline struct ld9040 *panel_to_ld9040(struct drm_panel *panel) 114 + { 115 + return container_of(panel, struct ld9040, panel); 116 + } 114 117 115 118 static int ld9040_clear_error(struct ld9040 *ctx) 116 119 {