From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06224391838 for ; Tue, 11 Aug 2026 15:10:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786461053; cv=none; b=fhiR7KCJz3LqMTsPAr9FbryTQRbg6m780dNJ4+bMbxFAjWeFZamTFIUFpsC/T5fjMS1QfN8WJBWOjGyuwbVYDTh/1P/ECnsr2jqJ4aR41vy/tCWTHMD5jGexRTU25v/SVb0YRkl33IvVuG/ZlaREFFc84qrLr1BOxS3A1oNko5g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786461053; c=relaxed/simple; bh=1SV6RpBvyPkYJ+vqi3h3WPGUIkZzo+ZvIzWNxJ8B2E8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K4nKCjgYtR0tgmW7RvHQBmakMYkiT1QAS/YfMR9CTvkVSiacnn0D+l8NA+bDLn1LBE0n3kiIYd3lTFjDrFR/CTOouVnh1QQ0hQKgAQIr4DL8a40MStgwJVVZUOwprTWb82iTDwnMknn/SgjSar4cJ7oagc6V/v1M9/ngEFbScRw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K+GTRTkN; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K+GTRTkN" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4954df200ddso22120915e9.0 for ; Tue, 11 Aug 2026 08:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786461046; x=1787065846; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rbhvOVyk4557fdZi9dUSvbpKOnRtueLxiCFpN/QbC9U=; b=K+GTRTkN0fhlPZPXx6r1xJk3Gfo3reswYDA/wazKDYj4LtG8434P5IhjBPf8aaBUbS oR9MHPdHQcvVWgts44CdhhM7DZ7kQO1esQzK6Bv/h+tB4BDDWKJYvc5lLF7euA3gIdad DDxjS+GKBs8ykP1lnbeSeeRA7Q/Q0BjLA+cbB4SVbb7v9191FEqM01G44sTEG2p/h2LQ b8rhiQmL9gV690kiMCtA9TUhIQU6voyiim+grPqL7VlWHt501raSJ4i6LRybpiruIudm 8fRgpdLYtjsQycJKhFENfxozmiSfI4ZY//YEBnMIHWTvsS62X9G1BO5CDnrD+6SfM1Bm SB2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786461046; x=1787065846; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=rbhvOVyk4557fdZi9dUSvbpKOnRtueLxiCFpN/QbC9U=; b=jOupdztsMSpAq4By2eTK+4Ko37VFFnvQPSiUlDQoeGw4IcytVsHUCdBCtcp2EReK6s Vi5lc4tbM7iw7pJMwlnf0UNhxJzcwXWpIA67rpGKYBLLSeKznEIv0d9ivFmj1vKiImTY I9g+S2a0sdajeEkl9fr0cmiqS5myZPKlS5fHbF4gywZuwv3qWW7SkTbKZ/BpLWiXTNIj QEKipv7DFL91WaxeFhX/Zr/3B8MVDTIwBK8e2CvTGaFNWiv9GixCjhU4MWHyMqgm7muN XHbJtI/a4n9y4cohBFq3S4//ZoWedUnzc7pDuJZlFCRhvoX5ZT7zwjabXiZgAb84+dTw 9ogA== X-Forwarded-Encrypted: i=1; AHgh+RpoN6GxIdteo2MOyf0eDzByS6cc8PdVXU75o2GVn2qbtaPQcR0h5gQSsLaHiABBFMBwqBoltd1IX54rqkw=@vger.kernel.org X-Gm-Message-State: AOJu0YzWewzbtV0m03DLdnOTcXJ1eR980Xjb+b6gdLe0JBijDi5zNEN2 fEUXjWZ9L7wZ5YERN5ox0msQxbw/1dJRI+WgdUJCPihYKNneugI2PSNX X-Gm-Gg: AR+sD115u4c5Y/7h0momReYUszFwa16PW+7VCNGcc26EqFEHlWk0TjxPV7OLtngGmFO 77z/BIeRzmRz7zYSZeuYukwlZWETCRn0gSvkWD79KCMVQWoWLz2CJaksRu4wRtOIJ3mli+bg49B NWcRt32ZoL5V32hX6ml/HVNPOPMxbssaX6SoeEFrrU6ZD6nZbmMAvVUElSHjMtpJCH4OhC4p+A9 6EX1l3IT9Lz6PLQbcg8zI+B5mIkOBCuB2yDex4ZZed1LWtSAg8KwsJLuqpJJfHJv3St48lvvUp5 +xNF/BJT770Bm3+r73Wu2fGuXHmp4G95YkYkeSPK0jCVlrtE2/y6iXq65YipyWl+i5UjbIxT2LE +wMY7zPYPOrD/f+zJ9B9Ni3MpdHS0dIgIyfVEpY6or/k23m/1HkmObz0r44rzn1Enc8IUkMU3AI eEkNsOYWb/jUARK2AeR0wbE4fA2C+c/JuirbvyjpMzPRen4/BR/PQJemkrt5UwWVoSi28XSacZw J4FISj7NHqctLTn/FSNKt6r X-Received: by 2002:a05:600c:800f:b0:499:726c:50e with SMTP id 5b1f17b1804b1-499784661f7mr74280315e9.14.1786461046442; Tue, 11 Aug 2026 08:10:46 -0700 (PDT) Received: from osama.. ([2a02:908:185:7e40:b0cf:778:ae86:13b1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49977e57785sm54307265e9.2.2026.08.11.08.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 08:10:46 -0700 (PDT) From: Osama Abdelkader To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Artur Weber , David Heidelberg , Dzmitry Sankouski , Yedaya Katsman , Casey Connolly , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Osama Abdelkader Subject: [PATCH 2/6] drm/panel: Use devm_mipi_dsi_attach in Samsung panels Date: Tue, 11 Aug 2026 17:09:46 +0200 Message-ID: <20260811151000.75038-3-osama.abdelkader@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260811151000.75038-1-osama.abdelkader@gmail.com> References: <20260811151000.75038-1-osama.abdelkader@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use the managed MIPI DSI attach helper in Samsung panel drivers and drop the corresponding manual detach calls from remove paths. --- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 4 +--- drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 8 +------- drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c | 8 +------- drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 8 +------- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 4 +--- drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c | 8 +------- drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 4 +--- drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c | 3 +-- drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c | 8 +------- drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c | 8 +------- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 4 +--- drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c | 8 +------- drivers/gpu/drm/panel/panel-samsung-sofef00.c | 8 +------- 13 files changed, 13 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c index 54a65abf7e89..8b6d39636f50 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c @@ -209,7 +209,7 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi) drm_panel_add(&s6->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) drm_panel_remove(&s6->panel); @@ -219,8 +219,6 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi) static void s6d16d0_remove(struct mipi_dsi_device *dsi) { struct s6d16d0 *s6 = mipi_dsi_get_drvdata(dsi); - - mipi_dsi_detach(dsi); drm_panel_remove(&s6->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c index 692020081524..1f070a99521a 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c @@ -438,7 +438,7 @@ static int s6d7aa0_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err(dev, "Failed to attach to DSI host: %d\n", ret); drm_panel_remove(&ctx->panel); @@ -451,12 +451,6 @@ static int s6d7aa0_probe(struct mipi_dsi_device *dsi) static void s6d7aa0_remove(struct mipi_dsi_device *dsi) { struct s6d7aa0 *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = mipi_dsi_detach(dsi); - if (ret < 0) - dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); - drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c b/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c index f4d75eca3cdf..88e4d59941b4 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c @@ -213,7 +213,7 @@ static int s6e3fa7_panel_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err(dev, "Failed to attach to DSI host: %d\n", ret); drm_panel_remove(&ctx->panel); @@ -226,12 +226,6 @@ static int s6e3fa7_panel_probe(struct mipi_dsi_device *dsi) static void s6e3fa7_panel_remove(struct mipi_dsi_device *dsi) { struct s6e3fa7_panel *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = mipi_dsi_detach(dsi); - if (ret < 0) - dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); - drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c index e63080204af7..cba46e3915b8 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c @@ -342,7 +342,7 @@ static int s6e3fc2x01_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err(dev, "Failed to attach to DSI host: %d\n", ret); drm_panel_remove(&ctx->panel); @@ -355,12 +355,6 @@ static int s6e3fc2x01_probe(struct mipi_dsi_device *dsi) static void s6e3fc2x01_remove(struct mipi_dsi_device *dsi) { struct samsung_s6e3fc2x01 *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = mipi_dsi_detach(dsi); - if (ret < 0) - dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); - drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c index 1db0c63b1131..a1808124278b 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c @@ -737,7 +737,7 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) goto remove_panel; @@ -753,8 +753,6 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi) static void s6e3ha2_remove(struct mipi_dsi_device *dsi) { struct s6e3ha2 *ctx = mipi_dsi_get_drvdata(dsi); - - mipi_dsi_detach(dsi); drm_panel_remove(&ctx->panel); backlight_device_unregister(ctx->bl_dev); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c index 550e9ef9bb71..22be3463357c 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c @@ -299,7 +299,7 @@ static int s6e3ha8_amb577px01_wqhd_probe(struct mipi_dsi_device *dsi) priv->dsc.bits_per_pixel = 8 << 4; /* 4 fractional bits */ priv->dsc.block_pred_enable = true; - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err(dev, "Failed to attach to DSI host: %d\n", ret); drm_panel_remove(&priv->panel); @@ -312,12 +312,6 @@ static int s6e3ha8_amb577px01_wqhd_probe(struct mipi_dsi_device *dsi) static void s6e3ha8_amb577px01_wqhd_remove(struct mipi_dsi_device *dsi) { struct s6e3ha8 *priv = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = mipi_dsi_detach(dsi); - if (ret < 0) - dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); - drm_panel_remove(&priv->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c index e05199ce14ee..4b16ffe31b8f 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c @@ -477,7 +477,7 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) goto remove_panel; @@ -493,8 +493,6 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) static void s6e63j0x03_remove(struct mipi_dsi_device *dsi) { struct s6e63j0x03 *ctx = mipi_dsi_get_drvdata(dsi); - - mipi_dsi_detach(dsi); drm_panel_remove(&ctx->panel); backlight_device_unregister(ctx->bl_dev); diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c index 2630975c111b..0edce6eedc0b 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c @@ -105,7 +105,7 @@ static int s6e63m0_dsi_probe(struct mipi_dsi_device *dsi) if (ret) return ret; - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) s6e63m0_remove(dev); @@ -114,7 +114,6 @@ static int s6e63m0_dsi_probe(struct mipi_dsi_device *dsi) static void s6e63m0_dsi_remove(struct mipi_dsi_device *dsi) { - mipi_dsi_detach(dsi); s6e63m0_remove(&dsi->dev); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c index 77fee36dbb55..e9e621830fde 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c @@ -724,7 +724,7 @@ static int s6e88a0_ams427ap24_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err(dev, "Failed to attach to DSI host: %d\n", ret); drm_panel_remove(&ctx->panel); @@ -737,12 +737,6 @@ static int s6e88a0_ams427ap24_probe(struct mipi_dsi_device *dsi) static void s6e88a0_ams427ap24_remove(struct mipi_dsi_device *dsi) { struct s6e88a0_ams427ap24 *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = mipi_dsi_detach(dsi); - if (ret < 0) - dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); - drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c index ca5cad41ff1d..43fd28cd1a53 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c @@ -196,7 +196,7 @@ static int s6e88a0_ams452ef01_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err(dev, "Failed to attach to DSI host: %d\n", ret); drm_panel_remove(&ctx->panel); @@ -209,12 +209,6 @@ static int s6e88a0_ams452ef01_probe(struct mipi_dsi_device *dsi) static void s6e88a0_ams452ef01_remove(struct mipi_dsi_device *dsi) { struct s6e88a0_ams452ef01 *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = mipi_dsi_detach(dsi); - if (ret < 0) - dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); - drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c index 1b5c500d4f4e..4902079edd27 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c @@ -1020,7 +1020,7 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) drm_panel_remove(&ctx->panel); @@ -1030,8 +1030,6 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) static void s6e8aa0_remove(struct mipi_dsi_device *dsi) { struct s6e8aa0 *ctx = mipi_dsi_get_drvdata(dsi); - - mipi_dsi_detach(dsi); drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c b/drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c index 2fae0dc6c424..6c86cfaf92b2 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c @@ -258,7 +258,7 @@ static int s6e8fc0_m1906f9_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { drm_panel_remove(&ctx->panel); return dev_err_probe(dev, ret, "Failed to attach to DSI host\n"); @@ -270,12 +270,6 @@ static int s6e8fc0_m1906f9_probe(struct mipi_dsi_device *dsi) static void s6e8fc0_remove(struct mipi_dsi_device *dsi) { struct s6e8fc0_ctx *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = mipi_dsi_detach(dsi); - if (ret < 0) - dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); - drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef00.c b/drivers/gpu/drm/panel/panel-samsung-sofef00.c index f07d6533ed69..5cb05ba246b8 100644 --- a/drivers/gpu/drm/panel/panel-samsung-sofef00.c +++ b/drivers/gpu/drm/panel/panel-samsung-sofef00.c @@ -252,7 +252,7 @@ static int sofef00_panel_probe(struct mipi_dsi_device *dsi) drm_panel_add(&ctx->panel); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err(dev, "Failed to attach to DSI host: %d\n", ret); drm_panel_remove(&ctx->panel); @@ -265,12 +265,6 @@ static int sofef00_panel_probe(struct mipi_dsi_device *dsi) static void sofef00_panel_remove(struct mipi_dsi_device *dsi) { struct sofef00_panel *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = mipi_dsi_detach(dsi); - if (ret < 0) - dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); - drm_panel_remove(&ctx->panel); } -- 2.43.0