提交 dff2ed27 编写于 作者: T Thierry Reding

drm/panel: ld9040: Replace upcasting macro by function

Using a function instead of a macro provides proper type checking.
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 5f1dcd8b
...@@ -110,7 +110,10 @@ struct ld9040 { ...@@ -110,7 +110,10 @@ struct ld9040 {
int error; 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) static int ld9040_clear_error(struct ld9040 *ctx)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册