]> git.baikalelectronics.ru Git - kernel.git/commit
drm/omap: dss: Modify omapdss_find_output_from_display() to return channel
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 2 Mar 2018 01:11:49 +0000 (03:11 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 3 Sep 2018 13:13:26 +0000 (16:13 +0300)
commit3f8a326efefa8be15a3e231eec5dab190ebcd921
treea96b37cc3c2cbe52c5882a0839c8dbdc1f0c802b
parent0079b09ec4a58149d01b73ac2a2eabae7845e087
drm/omap: dss: Modify omapdss_find_output_from_display() to return channel

The omapdss_find_output_from_display() function is only used to retrieve
the dispc channel corresponding to the display. Return the dispc channel
directly, and rename the function to omapdss_device_get_dispc_channel()
to match its new purpose.

The dssdev->id check is removed as the dssdev is guaranteed to be an
output and have a non-zero id, as proved by the lack of crash despite
the caller never checking the returned pointer before dereferencing it.

As the function is not specific to outputs anymore, move it from
output.c to base.c.

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>
drivers/gpu/drm/omapdrm/dss/base.c
drivers/gpu/drm/omapdrm/dss/omapdss.h
drivers/gpu/drm/omapdrm/dss/output.c
drivers/gpu/drm/omapdrm/omap_crtc.c