diff options
author | Jernej Skrabec <jernej.skrabec@siol.net> | 2018-02-14 23:08:59 +0300 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-02-16 11:33:07 +0300 |
commit | eea034af90c64802fd747a9dc534c26a7ebe7754 (patch) | |
tree | 68646e9466cc0aab4f0a2dfd2334e0fabfa0678b /include/drm/bridge | |
parent | 5765916afa4e859b92457a4a14f82ef2a9876758 (diff) | |
download | linux-eea034af90c64802fd747a9dc534c26a7ebe7754.tar.xz |
drm/bridge/synopsys: dw-hdmi: don't clobber drvdata
dw_hdmi shouldn't set drvdata since some drivers might need to store
it's own data there. Rework dw_hdmi in a way to return struct dw_hdmi
instead to store it in drvdata. This way drivers are responsible to
store and pass structure when needed.
Idea was taken from the following commit:
8242ecbd597d ("drm/bridge/synopsys: stop clobbering drvdata")
Cc: p.zabel@pengutronix.de
Cc: Laurent.pinchart@ideasonboard.com
Cc: hjc@rock-chips.com
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180214200906.31509-6-jernej.skrabec@siol.net
Diffstat (limited to 'include/drm/bridge')
-rw-r--r-- | include/drm/bridge/dw_hdmi.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index f3f3f0e1b2d3..dd2a8cf7d20b 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -143,12 +143,13 @@ struct dw_hdmi_plat_data { unsigned long mpixelclock); }; -int dw_hdmi_probe(struct platform_device *pdev, - const struct dw_hdmi_plat_data *plat_data); -void dw_hdmi_remove(struct platform_device *pdev); -void dw_hdmi_unbind(struct device *dev); -int dw_hdmi_bind(struct platform_device *pdev, struct drm_encoder *encoder, - const struct dw_hdmi_plat_data *plat_data); +struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev, + const struct dw_hdmi_plat_data *plat_data); +void dw_hdmi_remove(struct dw_hdmi *hdmi); +void dw_hdmi_unbind(struct dw_hdmi *hdmi); +struct dw_hdmi *dw_hdmi_bind(struct platform_device *pdev, + struct drm_encoder *encoder, + const struct dw_hdmi_plat_data *plat_data); void dw_hdmi_setup_rx_sense(struct device *dev, bool hpd, bool rx_sense); |