summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-08-23 22:32:43 +0300
committerSam Ravnborg <sam@ravnborg.org>2019-08-24 10:42:48 +0200
commit6dbe0c4b0fc0646442b2b1580d022404e582fd7b (patch)
treea9b0b7860bb5d0577bac6bfaf13b42ef86517360 /drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
parent65abbda8ed7ca48c8807d6b04a77431b438fa659 (diff)
downloadlinux-6dbe0c4b0fc0646442b2b1580d022404e582fd7b.tar.gz
linux-6dbe0c4b0fc0646442b2b1580d022404e582fd7b.tar.bz2
linux-6dbe0c4b0fc0646442b2b1580d022404e582fd7b.zip
drm/panel: Initialise panel dev and funcs through drm_panel_init()
Instead of requiring all drivers to set the dev and funcs fields of drm_panel manually after calling drm_panel_init(), pass the data as arguments to the function. This simplifies the panel drivers, and will help future refactoring when adding new arguments to drm_panel_init(). The panel drivers have been updated with the following Coccinelle semantic patch, with manual inspection to verify that no call to drm_panel_init() with a single argument still exists. @@ expression panel; expression device; identifier ops; @@ drm_panel_init(&panel + , device, &ops ); ... ( -panel.dev = device; -panel.funcs = &ops; | -panel.funcs = &ops; -panel.dev = device; ) Suggested-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190823193245.23876-3-laurent.pinchart@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c')
-rw-r--r--drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c b/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
index e0e20ecff916..38f114b03b89 100644
--- a/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
+++ b/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
@@ -166,9 +166,8 @@ static int osd101t2587_panel_add(struct osd101t2587_panel *osd101t2587)
if (IS_ERR(osd101t2587->backlight))
return PTR_ERR(osd101t2587->backlight);
- drm_panel_init(&osd101t2587->base);
- osd101t2587->base.funcs = &osd101t2587_panel_funcs;
- osd101t2587->base.dev = &osd101t2587->dsi->dev;
+ drm_panel_init(&osd101t2587->base, &osd101t2587->dsi->dev,
+ &osd101t2587_panel_funcs);
return drm_panel_add(&osd101t2587->base);
}