summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2018-01-10 17:23:41 +0100
committerWyon Bi <bivvy.bi@rock-chips.com>2019-01-09 10:47:48 +0800
commit0b8c593910625ec39e6a01ea5aa17c2c64259c03 (patch)
treef5dd3e0984cb1c160ea6ae49e6fcb4120aa0e54a /include
parentc8b8e8bd39d7f8158acbb2b98dd79463b7f4f958 (diff)
BACKPORT: drm/bridge: analogix: Do not use device's drvdata
The driver that instantiates the bridge should own the drvdata, as all driver model callbacks (probe, remove, shutdown, PM ops, etc.) are also owned by its driver struct. Moreover, storing two different pointer types in driver data depending on driver initialization status is barely a good practice and in fact has led to many bugs in this driver. Let's clean up this mess and change Analogix entry points to simply accept some opaque struct pointer, adjusting their users at the same time to avoid breaking the compilation. Change-Id: Ie06ce63a5daae532df69d2447b0673b91032d61c Signed-off-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Thierry Escande <thierry.escande@collabora.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Acked-by: Jingoo Han <jingoohan1@gmail.com> Acked-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20180110162348.22765-2-thierry.escande@collabora.com Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com> (cherry-picked from 6b2d8fd98d051f8697c45f96249dca73842a2362)
Diffstat (limited to 'include')
-rw-r--r--include/drm/bridge/analogix_dp.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h
index d51a694eb9ee..05c73743c6da 100644
--- a/include/drm/bridge/analogix_dp.h
+++ b/include/drm/bridge/analogix_dp.h
@@ -13,6 +13,8 @@
#include <drm/drm_crtc.h>
+struct analogix_dp_device;
+
enum analogix_dp_devtype {
EXYNOS_DP,
ROCKCHIP_DP,
@@ -39,11 +41,12 @@ struct analogix_dp_plat_data {
struct drm_connector *);
};
-int analogix_dp_resume(struct device *dev);
-int analogix_dp_suspend(struct device *dev);
+int analogix_dp_resume(struct analogix_dp_device *dp);
+int analogix_dp_suspend(struct analogix_dp_device *dp);
-int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
- struct analogix_dp_plat_data *plat_data);
-void analogix_dp_unbind(struct device *dev, struct device *master, void *data);
+struct analogix_dp_device *
+analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
+ struct analogix_dp_plat_data *plat_data);
+void analogix_dp_unbind(struct analogix_dp_device *dp);
#endif /* _ANALOGIX_DP_H_ */