From patchwork Wed Jul 19 07:50:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 122443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2278251vqt; Wed, 19 Jul 2023 01:10:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlFj8bu6t1bE5XectunDOW3aNCa4njdRg+yYtbpEb8tw5TGwJX4bVxXmmgGJlO2B8Ltzvtj9 X-Received: by 2002:a05:6358:2817:b0:135:43da:b16d with SMTP id k23-20020a056358281700b0013543dab16dmr2637862rwb.11.1689754232117; Wed, 19 Jul 2023 01:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689754232; cv=none; d=google.com; s=arc-20160816; b=JDUYlqKUKrCn9QycOzaBEM9g7NxeaFs2rDhgUpUxAKsqPOs9j/4g3OID6Jyb2oYJBh 476jXuhDEyXBTSOcDKXDRKFltf/+V/LZRGPAZSoSwT7I712ob86eef5sUV80Wv7dL1O0 sWJd43K3F9t5CHMHMhEFcvFBeOWeul7Mra7+DrM2GSwB5WD1seBNRRhkLXXdWOX0t+0U YAjhLt7JRlCrnAYraU1xACBpZSU5JazXUKv860FBs2SYQBrE9AISV/vrirSf9ftXRJnn GgzrF621hE2HMfnKHfzXSolzoQTi0WSap57KunirwpqCyGdUB+Zm6x6d9+ferYGTS9Wk z7uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6JC4WWETfFfjGVtV1ifdQerYVvztYyLwFPiXgJNPrEM=; fh=NKnLsaTUs6DGQa/OThi18WPpEgJ637Y16FMWW8s0AeQ=; b=KgQQHOy0v79wN3K873KhvoJ/M3+fHystj25C7ieu1Tdm1rR33nosgrP8EKAfwcoCOL CBo1osrq99um/widuJQM6ENx8LhrXmtiR/g9jeihORhUMtWhD/OxuXGQhiEpnav0OqQk DPlEX5E3NA+I4jZZ8vpcARRPyMRyIoUe7rP+4KTXELpUlpWDGYANGWG8wMcg/qgRNCTR TxxRIbUqWGaJ7r2YyLB+oLOtGRYezPakP0VLofuFsYEPokcQXg4zZDh2E5mYYJU9Acpq /XL2/vECOh8WYxhpAlYpIJNFSlT8WFwh3R7vF7eq4mUycUCYn3aTCCbnzoi679QEUBgJ v0oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="DncmQ/aN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d22-20020a63d656000000b0055b766191f4si3055245pgj.218.2023.07.19.01.10.17; Wed, 19 Jul 2023 01:10:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="DncmQ/aN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbjGSHvX (ORCPT + 99 others); Wed, 19 Jul 2023 03:51:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbjGSHvK (ORCPT ); Wed, 19 Jul 2023 03:51:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29042134 for ; Wed, 19 Jul 2023 00:51:10 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 658B36607073; Wed, 19 Jul 2023 08:51:08 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1689753069; bh=P2asjJa8ZKRcMIUubSWXLd+81XU6yi5cTxDjeHRxCpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DncmQ/aNBVXHlmrzBpAM82GdzdA2DMrDqjYopTIBEmYgyARJlFGvTn/Ime0aVDrCS 52fCG9RqqsAVUBD3ywVmGD7sW/FGzV3czEIuitOcXv26U7SzoKFCai/0u6jBxmqfPn druIeZpB2G5UHbaDrrwGd5ATTEsxWNL4Cik4OJkTjGHAE0b0YGZ9MSmqemTvSpeg6X E/wZf10fti0KN7uyVA5IYq5VgFSlcDBy+dqiZLtm0/qCx4kQddgc8tkdBlLvcdN/PD F/ZHy9JdaBKmzu2xQ/qQw0K94SpcW2KZIroHUd6ZgUGEMFugc1eQ45s2M8t/KE0RR8 kvCmRYPjBPBcA== From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, fshao@chromium.org Subject: [PATCH v2 3/6] drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge() Date: Wed, 19 Jul 2023 09:50:53 +0200 Message-Id: <20230719075056.72178-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230719075056.72178-1-angelogioacchino.delregno@collabora.com> References: <20230719075056.72178-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771835733842072935 X-GMAIL-MSGID: 1771835733842072935 Function drm_of_find_panel_or_bridge() is marked as deprecated: since the usage of that in this driver exactly corresponds to the new function devm_drm_of_get_bridge(), switch to it. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Fei Shao --- drivers/gpu/drm/mediatek/mtk_dpi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 03a2b900bb50..e9c5a0f44537 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1063,10 +1063,10 @@ static int mtk_dpi_probe(struct platform_device *pdev) if (dpi->irq <= 0) return -EINVAL; - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, - NULL, &dpi->next_bridge); - if (ret) - return ret; + dpi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); + if (IS_ERR(dpi->next_bridge)) + return dev_err_probe(dev, PTR_ERR(dpi->next_bridge), + "Failed to get bridge\n"); dev_info(dev, "Found bridge node: %pOF\n", dpi->next_bridge->of_node); @@ -1089,8 +1089,6 @@ static int mtk_dpi_probe(struct platform_device *pdev) static int mtk_dpi_remove(struct platform_device *pdev) { - struct mtk_dpi *dpi = platform_get_drvdata(pdev); - component_del(&pdev->dev, &mtk_dpi_component_ops); return 0;