From 2860f32eea22a5364993c4855291ec48212ed42e Mon Sep 17 00:00:00 2001 From: Artem Mygaiev Date: Wed, 11 Sep 2024 15:34:02 +0200 Subject: [PATCH] Build fixing fl2000_drm --- fl2000_drm.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fl2000_drm.c b/fl2000_drm.c index 009d78e..123c158 100644 --- a/fl2000_drm.c +++ b/fl2000_drm.c @@ -24,8 +24,8 @@ static const u32 fl2000_pixel_formats[] = { DRM_FORMAT_XRGB8888, }; -/* IT66121 HDMI bridge driver name*/ -static const char *fl2000_supported_bridge = "it66121"; +/* TODO: This has to come from driver parameters */ +static char *fl2000_supported_bridge = "it66121"; /* Maximum pixel clock set to 500MHz. It is hard to get more or less precise PLL configuration for * higher clock @@ -481,6 +481,12 @@ static int fl2000_drm_bind(struct device *master) dev_info(master, "Binding FL2000 master"); + drm_if = dev_get_drvdata(&usb_dev->dev); + if (!drm_if) { + dev_err(&usb_dev->dev, "Cannot find DRM structure!"); + return -ENODEV; + } + /* Attach bridge */ ret = component_bind_all(master, &drm_if->pipe); if (ret) { @@ -488,6 +494,7 @@ static int fl2000_drm_bind(struct device *master) return ret; } + drm = &drm_if->drm; drm_mode_config_reset(drm); fl2000_reset(usb_dev); @@ -520,8 +527,8 @@ static void fl2000_drm_unbind(struct device *master) dev_err(&usb_dev->dev, "Cannot find DRM structure!"); return; } - drm = &drm_if->drm; + drm = &drm_if->drm; drm_atomic_helper_shutdown(drm); /* Detach bridge */