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

Commit 9d90ce5c authored by Thierry Reding's avatar Thierry Reding
Browse files

drm/panel: s6e8aa0: Use static inline for upcasting



Use a static inline function for upcasting a struct drm_panel to the
driver-specific structure. The advantage over using a macro is that it
gives us additional type checking.

Acked-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 3c523d7d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -120,7 +120,10 @@ struct s6e8aa0 {
	int error;
};

#define panel_to_s6e8aa0(p) container_of(p, struct s6e8aa0, panel)
static inline struct s6e8aa0 *panel_to_s6e8aa0(struct drm_panel *panel)
{
	return container_of(panel, struct s6e8aa0, panel);
}

static int s6e8aa0_clear_error(struct s6e8aa0 *ctx)
{