]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/omap: dss: Inline the omapdss_display_get() function
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 26 Feb 2020 11:25:12 +0000 (13:25 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 26 Feb 2020 11:32:10 +0000 (13:32 +0200)
Inline the omapdss_display_get() in its only caller to simplify the
code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-53-laurent.pinchart@ideasonboard.com
drivers/gpu/drm/omapdrm/dss/display.c
drivers/gpu/drm/omapdrm/dss/omapdss.h
drivers/gpu/drm/omapdrm/omap_drv.c

index 8a3f61f5825f0b7bf3d24326b8cdebe4146c4fa2..3b82158b1bfdb325b67ee43278750c54bcf13166 100644 (file)
@@ -40,15 +40,6 @@ void omapdss_display_init(struct omap_dss_device *dssdev)
 }
 EXPORT_SYMBOL_GPL(omapdss_display_init);
 
-struct omap_dss_device *omapdss_display_get(struct omap_dss_device *output)
-{
-       while (output->next)
-               output = output->next;
-
-       return omapdss_device_get(output);
-}
-EXPORT_SYMBOL_GPL(omapdss_display_get);
-
 int omapdss_display_get_modes(struct drm_connector *connector,
                              const struct videomode *vm)
 {
index 2e5453df2293ca1b07bd5f5c536846a69ca53668..315a356fa0c0b2e2b72bce3ee5a89172175b40ba 100644 (file)
@@ -436,7 +436,6 @@ static inline bool omapdss_is_initialized(void)
 }
 
 void omapdss_display_init(struct omap_dss_device *dssdev);
-struct omap_dss_device *omapdss_display_get(struct omap_dss_device *output);
 int omapdss_display_get_modes(struct drm_connector *connector,
                              const struct videomode *vm);
 
index e6a0650305238206e771d57e1b6e54fd8cca7bdb..cdafd7ef1c3206eb7e22e3df3102450471c5728b 100644 (file)
@@ -207,11 +207,12 @@ static int omap_display_id(struct omap_dss_device *output)
        struct device_node *node = NULL;
 
        if (output->next) {
-               struct omap_dss_device *display;
+               struct omap_dss_device *display = output;
+
+               while (display->next)
+                       display = display->next;
 
-               display = omapdss_display_get(output);
                node = display->dev->of_node;
-               omapdss_device_put(display);
        } else if (output->bridge) {
                struct drm_bridge *bridge = output->bridge;