OSDN Git Service

drm/bridge: ti-sn65dsi83: Do not cache dsi_lanes and host twice
authorMarek Vasut <marex@denx.de>
Sun, 12 Jun 2022 10:29:18 +0000 (12:29 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 12 Jun 2022 14:06:53 +0000 (16:06 +0200)
commitfc8adb13d844b44c147b4dced292c74a1ab5cb25
tree6cfe214e0ba4bea744befbc2c1b57d87948eb078
parentd643daaf1694b7565fbe3982b630e1c7b95f1600
drm/bridge: ti-sn65dsi83: Do not cache dsi_lanes and host twice

The DSI lane count can be accessed via the dsi device pointer, make use
of that. The DSI host pointer is only used in sn65dsi83_host_attach(),
move the code around so that the host does not have to be cached in the
driver private data. This simplifies the code further. No functional
change.

This has the added bonus that lt9211, tc358767, sn65dsi83 now use very
similar *_mipi_dsi_host_attach() which is ripe for deduplication.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220612102918.13874-1-marex@denx.de
drivers/gpu/drm/bridge/ti-sn65dsi83.c