Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dff2ed27 authored by Thierry Reding's avatar Thierry Reding
Browse files

drm/panel: ld9040: Replace upcasting macro by function



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

Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 5f1dcd8b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)
{