OSDN Git Service

drm: omapdrm: dsi: Combine two commonly used inline functions
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 13 Feb 2018 12:00:34 +0000 (14:00 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 1 Mar 2018 07:18:18 +0000 (09:18 +0200)
commitc068408ef386e151e566ab96dd9e3103b264189b
tree312582124baaa7851e4f78d6c9632755b435e4f9
parent7093d6cd1fb39efbc014f209eab0bc7a21e08811
drm: omapdrm: dsi: Combine two commonly used inline functions

The dsi_get_dsidrv_data() and dsi_get_dsidev_from_dssdev() inline
functions convert a struct omap_dss_device pointer to the corresponding
struct platform_device, and a struct platform_device pointer to the
corresponding struct dsi_data. They are nearly always called together
without any use of the intermediate platform_device, so combine them
into a single function.

In the three locations where only dsi_get_dsidrv_data() is used, call
dev_get_drvdata() directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/gpu/drm/omapdrm/dss/dsi.c