提交 7bf93c73 编写于 作者: A Ajay Kumar 提交者: Thierry Reding

drm/panel: Provide convenience wrapper for .get_modes()

Add a convenience wrapper for the struct drm_panel_funcs' .get_modes()
function so that not every driver needs to check that the panel driver
implements the function before calling it.
Signed-off-by: NAjay Kumar <ajaykumar.rs@samsung.com>
[treding: extract from larger patch, commit message]
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 45527d43
......@@ -112,6 +112,14 @@ static inline int drm_panel_enable(struct drm_panel *panel)
return panel ? -ENOSYS : -EINVAL;
}
static inline int drm_panel_get_modes(struct drm_panel *panel)
{
if (panel && panel->funcs && panel->funcs->get_modes)
return panel->funcs->get_modes(panel);
return panel ? -ENOSYS : -EINVAL;
}
void drm_panel_init(struct drm_panel *panel);
int drm_panel_add(struct drm_panel *panel);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册