@@ -1689,8 +1689,8 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
static int exynos_dsi_bind(struct device *dev, struct device *master,
void *data)
{
- struct drm_encoder *encoder = dev_get_drvdata(dev);
- struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+ struct exynos_dsi *dsi = dev_get_drvdata(dev);
+ struct drm_encoder *encoder = &dsi->encoder;
struct drm_device *drm_dev = data;
struct device_node *in_bridge_node;
struct drm_bridge *in_bridge;
@@ -1718,8 +1718,8 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
static void exynos_dsi_unbind(struct device *dev, struct device *master,
void *data)
{
- struct drm_encoder *encoder = dev_get_drvdata(dev);
- struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+ struct exynos_dsi *dsi = dev_get_drvdata(dev);
+ struct drm_encoder *encoder = &dsi->encoder;
exynos_dsi_disable(encoder);
@@ -1818,7 +1818,7 @@ static int exynos_dsi_probe(struct platform_device *pdev)
if (ret)
return ret;
- platform_set_drvdata(pdev, &dsi->encoder);
+ platform_set_drvdata(pdev, dsi);
pm_runtime_enable(dev);
@@ -1845,8 +1845,7 @@ static int exynos_dsi_remove(struct platform_device *pdev)
static int __maybe_unused exynos_dsi_suspend(struct device *dev)
{
- struct drm_encoder *encoder = dev_get_drvdata(dev);
- struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+ struct exynos_dsi *dsi = dev_get_drvdata(dev);
const struct exynos_dsi_driver_data *driver_data = dsi->driver_data;
int ret, i;
@@ -1876,8 +1875,7 @@ static int __maybe_unused exynos_dsi_suspend(struct device *dev)
static int __maybe_unused exynos_dsi_resume(struct device *dev)
{
- struct drm_encoder *encoder = dev_get_drvdata(dev);
- struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+ struct exynos_dsi *dsi = dev_get_drvdata(dev);
const struct exynos_dsi_driver_data *driver_data = dsi->driver_data;
int ret, i;
Use the exynos_dsi as drvdata instead of the encoder to further decouple the driver from the encoder. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> --- v2: drop removal of encoder_to_dsi --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)