From patchwork Thu Jul 6 12:30:23 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: 116667 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2525876vqx; Thu, 6 Jul 2023 05:34:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlFQJbNGjUeCcNeEjybXcdpiaFXC53NKkbX6HOvegnqnpdykJRWI0Hz9WumZC/T9A/RN9K88 X-Received: by 2002:a17:90b:4ac6:b0:262:e439:5013 with SMTP id mh6-20020a17090b4ac600b00262e4395013mr1186142pjb.9.1688646881236; Thu, 06 Jul 2023 05:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688646881; cv=none; d=google.com; s=arc-20160816; b=fwDp855NgBK0EnqpGic/Ws4+M67g0Ou73VXV3fHky2YHJefzzDrhpeXAfhpBNjL8bM Ek1Iq4Gtzj9jrxKi6HGOV9qPaYIJJE7OZnkSno4KoqrS1+TAS/El/cRrP/lH+glUQIWs 8y0vP7n7HgWTo6b05aK3o4/8F1Jfet0bvKrvXtikuJvNcuRA4wIGwbqlHa7ibhCB+MGO gXfeOtYcchSpxr2VXp/uu72ZSLEXhJMbgsD14O4RGQdyKM58fH9zOw1Q86qkrPR3A2OC dvPQwFwMCk2UXD/oQrBa0XjT7xjIJi5BiDUpZbPHWYSMIJ5A0sdzDOmXCU/7nDTg2gSH M9KA== 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=34Anw/wI92zz8P+zTww+gkLhetdCiKuz2Fn1f6zs4Jw=; fh=JpmmvsKbFEtjFcPhKwAU/TS0J6xmkcPCzvp06hVht3s=; b=eWqDcOJ+wVAFg6KHV8jbybsmONIxM5yoNG/5lnlEQbpQS8O6eAC/iOtF0+v1r2ITM6 ITxxRg84/TT3jXipyLmZ7br2XyLiU5VfDGd/dJddJfut3yyVzsTIBP0xMz7WPtrMplE0 KhC3xCFrhOxwxuY8ZHaQ1HGCmGI5G4k1SdFygplWCrILdNJAXQTMS1fIUic00wl8ksM9 CinU1dloBvDiJ7DvPytMK005uqLKu8KAdoH8JykzVSBhIVoTCWjdMDgveTagYyZ89Igd vgH+qiGf9ZBwksaU8aLaidjbJcLnybHlKcf7m0zFvk7eHyZ8lANDhbneDtvdrbL/7yiL MQwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="PXRdj/hw"; 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 15-20020a63144f000000b00534780446d9si1336960pgu.640.2023.07.06.05.34.27; Thu, 06 Jul 2023 05:34:41 -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="PXRdj/hw"; 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 S232370AbjGFMaw (ORCPT + 99 others); Thu, 6 Jul 2023 08:30:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231751AbjGFMan (ORCPT ); Thu, 6 Jul 2023 08:30:43 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E62FD1BD6 for ; Thu, 6 Jul 2023 05:30:37 -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 E43326606FC1; Thu, 6 Jul 2023 13:30:35 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1688646636; bh=5+0g34fw0wGVdF8pSXSyeJt5CPUOp79klTRlFXdGl4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PXRdj/hwHQs2SS81BQtrJIekePJZYwkIN/n2Ikp2BxktX6eGrI213k29FdWmkIYe5 hVg7B2E/Qrmy3m27lgj54mi/lEmr9stGO4ZeuQRis4apiQFKZyfxTGtNOb/6JhhB6T s2hE7LiTsKshLGTET5+QLNk8OO40i9FCJsR1dg28ncRoyPLq0d3d9/K4EDZm2hb3YK m2qYk8qRFiQorjGMfTJTRHAyQK84SaUKmApKeDWu2THIKisZlKErE64VTNpSCfyd7/ pHJVaOU+Vj3+qugYlIlfliCc1QUQx0wcjwKF4MlwmMpbvvqDoLF9XAHRLEzGLoTGey g6G9Ds1ehO4og== 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, wenst@chromium.org, nfraprado@collabora.com Subject: [PATCH v4 7/9] drm/mediatek: dp: Use devm variant of drm_bridge_add() Date: Thu, 6 Jul 2023 14:30:23 +0200 Message-Id: <20230706123025.208408-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230706123025.208408-1-angelogioacchino.delregno@collabora.com> References: <20230706123025.208408-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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770674591759574963?= X-GMAIL-MSGID: =?utf-8?q?1770674591759574963?= In preparation for adding support for aux-bus, which will add a code path that may fail after the drm_bridge_add() call, change that to devm_drm_bridge_add() to simplify failure paths later. Signed-off-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai --- drivers/gpu/drm/mediatek/mtk_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c index eebcb32e67ee..6bc620aded45 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -2564,7 +2564,7 @@ static int mtk_dp_probe(struct platform_device *pdev) DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_HPD; mtk_dp->bridge.type = mtk_dp->data->bridge_type; - drm_bridge_add(&mtk_dp->bridge); + devm_drm_bridge_add(dev, &mtk_dp->bridge); mtk_dp->need_debounce = true; timer_setup(&mtk_dp->debounce_timer, mtk_dp_debounce_timer, 0);