[18/32] drm/hisilicon/kirin: convert to the .attach_new op

Message ID 20250625-drm-dsi-host-no-device-ptr-v1-18-e36bc258a7c5@bootlin.com (mailing list archive)
State New
Headers
Series drm/mipi-dsi: avoid DSI host drivers to have pointers to DSI devices |

Commit Message

Luca Ceresoli June 25, 2025, 4:45 p.m. UTC
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
  

Patch

diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
index 1a5b97abae86a187c751b4b579d7c22f206e4c90..f299958d7be6207dfe6e0e0e2bbc7b38ffe865ed 100644
--- a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
+++ b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
@@ -722,20 +722,20 @@  static int dw_drm_encoder_init(struct device *dev,
 
 static const struct component_ops dsi_ops;
 static int dsi_host_attach(struct mipi_dsi_host *host,
-			   struct mipi_dsi_device *mdsi)
+			   const struct mipi_dsi_bus_fmt *bus_fmt)
 {
 	struct dw_dsi *dsi = host_to_dsi(host);
 	struct device *dev = host->dev;
 	int ret;
 
-	if (mdsi->lanes > 4) {
+	if (bus_fmt->lanes > 4) {
 		DRM_ERROR("dsi device params invalid\n");
 		return -EINVAL;
 	}
 
-	dsi->lanes = mdsi->lanes;
-	dsi->format = mdsi->format;
-	dsi->mode_flags = mdsi->mode_flags;
+	dsi->lanes = bus_fmt->lanes;
+	dsi->format = bus_fmt->format;
+	dsi->mode_flags = bus_fmt->mode_flags;
 
 	ret = component_add(dev, &dsi_ops);
 	if (ret)
@@ -755,7 +755,7 @@  static int dsi_host_detach(struct mipi_dsi_host *host,
 }
 
 static const struct mipi_dsi_host_ops dsi_host_ops = {
-	.attach = dsi_host_attach,
+	.attach_new = dsi_host_attach,
 	.detach = dsi_host_detach,
 };