summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/display.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-03-02 02:07:34 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:26 +0300
commitb9f4d2ebf641d157be89a68227a5feb00c961d10 (patch)
tree18972475d565660c07c8e78ec51f3f1ea31b5555 /drivers/gpu/drm/omapdrm/dss/display.c
parent92ce521a4841131acf9af41e5bc772990ada06dc (diff)
downloadlinux-b9f4d2ebf641d157be89a68227a5feb00c961d10.tar.bz2
drm/omap: dss: Make omap_dss_get_next_device() more generic
Despite its name, the omap_dss_get_next_device() function operates on display devices only. Make it more generic by allowing operation on all devices, with a parameter to specify the device type. While at it rename the function to omapdss_device_get_next() to match the naming of the other functions operating on struct omap_dss_device. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/display.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/display.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c
index e7872e0c8dab..5df73cd76153 100644
--- a/drivers/gpu/drm/omapdrm/dss/display.c
+++ b/drivers/gpu/drm/omapdrm/dss/display.c
@@ -92,52 +92,3 @@ void omap_dss_put_device(struct omap_dss_device *dssdev)
module_put(dssdev->owner);
}
EXPORT_SYMBOL(omap_dss_put_device);
-
-/*
- * ref count of the found device is incremented.
- * ref count of from-device is decremented.
- */
-struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from)
-{
- struct list_head *l;
- struct omap_dss_device *dssdev;
-
- mutex_lock(&panel_list_mutex);
-
- if (list_empty(&panel_list)) {
- dssdev = NULL;
- goto out;
- }
-
- if (from == NULL) {
- dssdev = list_first_entry(&panel_list, struct omap_dss_device,
- panel_list);
- omap_dss_get_device(dssdev);
- goto out;
- }
-
- omap_dss_put_device(from);
-
- list_for_each(l, &panel_list) {
- dssdev = list_entry(l, struct omap_dss_device, panel_list);
- if (dssdev == from) {
- if (list_is_last(l, &panel_list)) {
- dssdev = NULL;
- goto out;
- }
-
- dssdev = list_entry(l->next, struct omap_dss_device,
- panel_list);
- omap_dss_get_device(dssdev);
- goto out;
- }
- }
-
- WARN(1, "'from' dssdev not found\n");
-
- dssdev = NULL;
-out:
- mutex_unlock(&panel_list_mutex);
- return dssdev;
-}
-EXPORT_SYMBOL(omap_dss_get_next_device);