diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-03-01 19:07:34 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-09-03 09:13:26 -0400 |
commit | b9f4d2ebf641d157be89a68227a5feb00c961d10 (patch) | |
tree | 18972475d565660c07c8e78ec51f3f1ea31b5555 /drivers/gpu/drm/omapdrm/dss/omapdss.h | |
parent | 92ce521a4841131acf9af41e5bc772990ada06dc (diff) |
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/omapdss.h')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/omapdss.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index a6ddc881ea72..94a3f98bdd3d 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h | |||
@@ -489,11 +489,15 @@ static inline bool omapdss_is_initialized(void) | |||
489 | 489 | ||
490 | int omapdss_register_display(struct omap_dss_device *dssdev); | 490 | int omapdss_register_display(struct omap_dss_device *dssdev); |
491 | void omapdss_unregister_display(struct omap_dss_device *dssdev); | 491 | void omapdss_unregister_display(struct omap_dss_device *dssdev); |
492 | #define for_each_dss_display(d) \ | ||
493 | while ((d = omapdss_device_get_next(d, true)) != NULL) | ||
492 | 494 | ||
493 | void omapdss_device_register(struct omap_dss_device *dssdev); | 495 | void omapdss_device_register(struct omap_dss_device *dssdev); |
494 | void omapdss_device_unregister(struct omap_dss_device *dssdev); | 496 | void omapdss_device_unregister(struct omap_dss_device *dssdev); |
495 | struct omap_dss_device *omapdss_find_device_by_port(struct device_node *src, | 497 | struct omap_dss_device *omapdss_find_device_by_port(struct device_node *src, |
496 | unsigned int port); | 498 | unsigned int port); |
499 | struct omap_dss_device *omapdss_device_get_next(struct omap_dss_device *from, | ||
500 | bool display_only); | ||
497 | int omapdss_device_connect(struct omap_dss_device *src, | 501 | int omapdss_device_connect(struct omap_dss_device *src, |
498 | struct omap_dss_device *dst); | 502 | struct omap_dss_device *dst); |
499 | void omapdss_device_disconnect(struct omap_dss_device *src, | 503 | void omapdss_device_disconnect(struct omap_dss_device *src, |
@@ -501,8 +505,6 @@ void omapdss_device_disconnect(struct omap_dss_device *src, | |||
501 | 505 | ||
502 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev); | 506 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev); |
503 | void omap_dss_put_device(struct omap_dss_device *dssdev); | 507 | void omap_dss_put_device(struct omap_dss_device *dssdev); |
504 | #define for_each_dss_display(d) while ((d = omap_dss_get_next_device(d)) != NULL) | ||
505 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); | ||
506 | 508 | ||
507 | int omap_dss_get_num_overlay_managers(void); | 509 | int omap_dss_get_num_overlay_managers(void); |
508 | 510 | ||