From patchwork Tue Mar 8 08:27:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1863 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 304783F067 for ; Tue, 8 Mar 2022 09:27:44 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id u10-20020a63df0a000000b0037886b8707bsf9899274pgg.23 for ; Tue, 08 Mar 2022 00:27:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646728063; cv=pass; d=google.com; s=arc-20160816; b=qQszJWuUH0ZvoTUhjCJSQnFnZ/w/HelEqaLIRcAJ1l8GjvI62htROMJgQPU40UX4LU rEb4wKJj24E+OCloRySKD1Rw6BZLpKo3blT3IQjuzGr/oUyJpBBNN8Yf2qGO11iKBHaj CadUcFlv7mGcIy+93vokWXfKN0Iw7bGOt2UxuX6oVK877Gv2NmfbZVlR31bioeFG59AO hAXRq9frjBMffSRS2No4O7SS2aeKd28GI+TwKKU24K8CVPaYxbW1O+zK1McUNaY1lyTk dg6meQaBHo+CoIZx33NJvOutU65D+qjIWkx/d7PF+SG9MS99bjtEUfU+LtARtQQd6+TD 5iiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=N7pItSvuYqbfTvafn15erZS91AI+T0PkR1Seq8+E8Vs=; b=tln9O4Xlr67KZYGPb7UetrSSOKJsMWK5wC4hFn7VIoSY6YSnbdKd97KX0YiqkXx73I F7MaTngRQFBhsQdRGWSOld3kn2Xn1lqOK54LpDdNCIfAusAaWeCoCgK621Zqk7aXWX8U 1QQ/ZObWCPUbynvZa6RFCdAkPv7UA3c5/4PemS2IQ5N4Vc6W9ifK+rskZRF9cU8h8RkX t9s7/xJlyhcDqM/dn0YIEg4Iw7DSIGQKOp63Fdtmvx/TeUPJaBOKcEoE1L+phCxWiVL+ fGZCwMD4uFcDZNx3NtgP6CX/P7KGbEEL5wDnnW+rulH8lFN+bnIgt+rQuQ8SAj5UbhWW koVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=px2TDsrI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=N7pItSvuYqbfTvafn15erZS91AI+T0PkR1Seq8+E8Vs=; b=gVog28wg55QSZXn1+ZjPhJSZI3cY/xPOqag5mFCtgQ30eMb7qSE7/EyjhLkVvkjwiG VYLRd1XfFQvpDp4qFfW2D5qgDqkkZMKMJMizXOWub+CFMkqwa6RFi6hbjLtaSMTM9VcS /9OkilhygRuqfD7ZlQ5uVGajVvVn+6uzYkvKA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=N7pItSvuYqbfTvafn15erZS91AI+T0PkR1Seq8+E8Vs=; b=4a+7ot40Mjc71RAqmEi1ogI+H6EqzaET/PzjJyhdeaO4Hy+uQZqwyhoXqX64UyoI88 3V8q/GGM1ZbNoGrWpSo6Ji9Auo5kPQPosa8IMgBVbgMZuCSUflJl3hWIMu7+DeJe5HJb hCB+rS44/gHSMgdHxsVyWLpW0HiKyA6qbRkCqYZScJ3BUIiSJiC/P2BbHULeuyKT88vT Zk5tzcyoYYrBGh4WePtYf9eDpqDbF3XRQmvuWsuemwqI4QiRrH5O+l8zRQz/jnPxZGgk 4ILP9ZLG9HuwQXj2HMSPwmw8nQF6JUya47+komOu78DhnZNWTe/VMiANFp9ZcGxnbHEY 4Usw== X-Gm-Message-State: AOAM533lhwU5UGh94s0Mx3RK6cSsWDLBh0dtWSAC5bTMaM2I2MXcr5BL Aae6Qb48bHWmKBa4y2Y532duUMRL X-Google-Smtp-Source: ABdhPJyINbhVKhSb8nmP/XtBr5oe2pHmSw/vOaswRemypAc9gjblHh3arNPJX/NEuHEScLR2dFPqtw== X-Received: by 2002:a17:90a:5b06:b0:1b8:b705:470b with SMTP id o6-20020a17090a5b0600b001b8b705470bmr3416364pji.168.1646728062858; Tue, 08 Mar 2022 00:27:42 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:d713:b0:151:ed65:d672 with SMTP id w19-20020a170902d71300b00151ed65d672ls3847067ply.5.gmail; Tue, 08 Mar 2022 00:27:42 -0800 (PST) X-Received: by 2002:a17:903:2051:b0:151:d161:f0a4 with SMTP id q17-20020a170903205100b00151d161f0a4mr15549488pla.37.1646728062076; Tue, 08 Mar 2022 00:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646728062; cv=none; d=google.com; s=arc-20160816; b=WLMCmEI2VbaruHUCF9CKIwcB9SQ3KZbOawY+BLGRZxnliG+dtmWoQYw5HHI8ym0n0i RvBXCH/Mmrlpn3EBM5TBn9KU09kCjraG/XBTUPQZu1hQNS5pIaBJcpfZDrhZkaFewDOt 83gza4GFe/fRsu/K7UoR1+gcR+DyZkiBsfffFXqQui+3t6/5qDsQA5OKlQda8XqRDSjz f/p6/SaSN4A1LOCIELYZXNkOVE01NGGqKstDMOgustzHCTIQxGbQ+df0hqAsReSow42N OZcdm+xmdG7S+Eb8twRcu/ir2Gqs9muvr7x6YF43sN6Wyyk7go+lNeUIJiXMiPBMY2bP YFFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=tOb/lNm32VMdALdX4KwHrL5rmS6yQsENw8Ur3mJRU6I=; b=x9otte7XQg5Td+sNYQ4wEcJRPiFagDAAbvQU5yr66DcmpSWvEnwYXzoLY/NxHy/wPg CW8dMThzsEYbjag2izQdISfdLaYwMTTInEF1yQW6yh9kcnOpv1tj/7/tuiq1UgqycvRL RCn14m/Yf4p7TpJi6jGqpLfd2lPKLbX2Kii9f5ozpafgZmEfA/pws5F2aK3wBCTKMdA2 BC14MXuFfCh9lydYTZsRXkyQC8BGvXg3VvgHmEr80kGs6G8gWFuf/grhtXusuFN4q+Xx Yg7y2rppcsTxdrZPzhTjmSkQ885AOoPQLlOry72yKB4lZY1qQW678pbQhU52ztB3r5XZ YEhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=px2TDsrI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id n10-20020a170902e54a00b0014fe9289997sor1518245plf.71.2022.03.08.00.27.42 for (Google Transport Security); Tue, 08 Mar 2022 00:27:42 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:f650:b0:14f:139e:aef2 with SMTP id m16-20020a170902f65000b0014f139eaef2mr15893117plg.151.1646728061794; Tue, 08 Mar 2022 00:27:41 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:c770:6f0b:21a:8de4]) by smtp.gmail.com with ESMTPSA id r1-20020a17090a560100b001bf72b5af97sm2000671pjf.13.2022.03.08.00.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 00:27:41 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Neil Armstrong , Robert Foss , Sam Ravnborg Cc: dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki , Chun-Kuang Hu , Philipp Zabel Subject: [PATCH v3 3/8] drm: bridge: mtk_dsi: Switch to devm_drm_of_get_bridge Date: Tue, 8 Mar 2022 13:57:21 +0530 Message-Id: <20220308082726.77482-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220308082726.77482-1-jagan@amarulasolutions.com> References: <20220308082726.77482-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=px2TDsrI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , devm_drm_of_get_bridge is capable of looking up the downstream bridge and panel and trying to add a panel bridge if the panel is found. Replace explicit finding calls with devm_drm_of_get_bridge. Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Jagan Teki --- Changes for v3: - none Changes for v2: - split the patch drivers/gpu/drm/mediatek/mtk_dsi.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 5d90d2eb0019..a1b3e1f4b497 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -1004,7 +1004,6 @@ static int mtk_dsi_probe(struct platform_device *pdev) { struct mtk_dsi *dsi; struct device *dev = &pdev->dev; - struct drm_panel *panel; struct resource *regs; int irq_num; int ret; @@ -1021,17 +1020,10 @@ static int mtk_dsi_probe(struct platform_device *pdev) return ret; } - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, - &panel, &dsi->next_bridge); - if (ret) + dsi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); + if (IS_ERR(dsi->next_bridge)) { + ret = PTR_ERR(dsi->next_bridge); goto err_unregister_host; - - if (panel) { - dsi->next_bridge = devm_drm_panel_bridge_add(dev, panel); - if (IS_ERR(dsi->next_bridge)) { - ret = PTR_ERR(dsi->next_bridge); - goto err_unregister_host; - } } dsi->driver_data = of_device_get_match_data(dev);