]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: analogix: Do not use device's drvdata
authorJeffy Chen <jeffy.chen@rock-chips.com>
Wed, 10 Jan 2018 16:23:41 +0000 (17:23 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 1 Mar 2018 14:43:26 +0000 (15:43 +0100)
commitdd6909083542eb52ad0372f091e7fe8225f5d184
tree762c0cc7af7d63caab5d0ef1786c4ac8a21ca6ac
parentd24427b5c4dd494960d4e2d9f8b438a46c8a8312
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.

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
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
drivers/gpu/drm/exynos/exynos_dp.c
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
include/drm/bridge/analogix_dp.h