From patchwork Tue Mar 8 08:27:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1866 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4D0223F067 for ; Tue, 8 Mar 2022 09:27:53 +0100 (CET) Received: by mail-pj1-f70.google.com with SMTP id r64-20020a17090a43c600b001bf8e05847esf587809pjg.4 for ; Tue, 08 Mar 2022 00:27:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646728072; cv=pass; d=google.com; s=arc-20160816; b=X7PCQeDqGVfgbXIQ+sVKty/QMezms/BMUpFi7obtEHjfhegu8KNAXbziwKWVuN0nah jq+Lz40pPaowxBcKlpzLAbslfTNCKz1gaq9oufzjl12gjZkktZI1GrjUuVaZZYunESOO KFMS7Aba41ah5MTEYIIEosavjLHuD8ZgAXcCfHjnTmeNF8s+srWGedWVFIEuqYsmbPMY 6Pn4UQEYhuTtDPaq1zAP0SbBzooeQxvHXyDHbTjMikgGtym8pGu4y6wRmPiAXObR9BB2 QWaT+/n6+lq4ApKii3IQWXJCphhW1JFmBYu/uDkwgRWqlwtA3sOyKewLg25gaNhMLB4h kDug== 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=R0iFDaX7vtH9MAK/QRs8NuCkzNb6zUbkVN6lt9Spw5c=; b=yd0qDn0bC2t1JtZasIMyIPyd2ogyrzSWZOj/GYyCt45vpJMx691dO/XhTSFYst7L3M CszJF2cFq8m7nTAPf4z2qKB094T5Ss5OEgwrlTgBeFQ88aq+nkRSv66Opy9w5R18g2x7 nDjFiWxKZ49W++rZrAiZQBJoQIhhL9HdUw4L0JHzl6SnmFMBN20bIcQS66d8cGvAtdAl WGJFfopsDfFETq8ovVYm/jXAXaplT/7I4zy9MNMPKl8NGmwWHWBLGhdtbjgKKPZjcgTY mv0Jj55Ow+LuiRrpYIm5mzinNvlbp73fF5fKGVxbNWTcKNZbIhxWpMm8HN7xAXMNe0Ym 9nBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Lluh5umc; 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=R0iFDaX7vtH9MAK/QRs8NuCkzNb6zUbkVN6lt9Spw5c=; b=SBjJvH5M3bATgssTxPDPHpSPaInttUymCB+4D/5pgel9aGh9y1dY6kPC9+0OugQfVg mvmBOVrX+OtkgXu00K6rm2J/WPdzXkxj/dbf7h5DoN7pFK3LgwMp2ORBzYzKIzZuLBpH xQSLOjGkO/pG5YXV3Byo7BK3R3saCk2Zp4Eoo= 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=R0iFDaX7vtH9MAK/QRs8NuCkzNb6zUbkVN6lt9Spw5c=; b=clzviO0kU2i1DjO4wW6SHCUZFSppLvhSNitlCQJQSkrXHBFuA8HoABBH9zj0mYS+PZ t+hflnIkbXHdS1C6ObkO02aPkEeND5inybxziSRxeqtgUNLAUdQIj0SdWnrg3Gpa1XLQ jrRyEqy9WEWK/hkd5ukDJnr50a+nLmQccYSppDGcGEB5v90TiGwdf7P1Ovs7ZIw1Axsy QLxEhdjwp0KHyzXfrS3M+VO4xBPb5FXy4PvKu2Tw5O98kKXDBTt9rft28YDBIL0rulfO TkQfnmAMRyfuVBbwp2STewfqbcwwMbRBV1PIkZ/4kAZ3FlK6iLDW7wqRg8r1F19KPiio 6Iwg== X-Gm-Message-State: AOAM533ajIZRhmI6Uri+KPVtOeq7Mpdyyv2C8+gu3LvUGMmTFcuMyFlm 93MpYF7+ezikwhN3oAx7gYL1mk4X X-Google-Smtp-Source: ABdhPJx4XESbP4/T+awqQamdK9fzImSLOmKxNvGMYsMGNbBUfNYK3gkN70pLPvTTvFxb8rQKF116yg== X-Received: by 2002:a17:90b:1652:b0:1bf:32e9:6db3 with SMTP id il18-20020a17090b165200b001bf32e96db3mr3435758pjb.179.1646728072068; Tue, 08 Mar 2022 00:27:52 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:1392:b0:4f7:2818:e48c with SMTP id t18-20020a056a00139200b004f72818e48cls1018368pfg.4.gmail; Tue, 08 Mar 2022 00:27:51 -0800 (PST) X-Received: by 2002:a05:6a00:10cf:b0:4f6:5834:aefb with SMTP id d15-20020a056a0010cf00b004f65834aefbmr17234586pfu.77.1646728071350; Tue, 08 Mar 2022 00:27:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646728071; cv=none; d=google.com; s=arc-20160816; b=1IjH7tmMWZyePvCV7mzV2p/g5OsZfAttNNbAUMgkl2We4A9oFGUixcpoT7MIB13TSJ W36yjWPc5M6c9WElXwhV8Ui4MybL0OLs12p7ccFQXQCHJKkIJ2eePq1M9NBljoVS654S RVN6XD9Ezc6A6WDCne9f4eyl3ZH9ac0mFzPDd3A+EMzJQx9pzT5av6kt3EirVbbVnAQI yHLrTydt3y363/0TXy52k3y/MVLT0ElsVAXgcJ3LOxp4cAb0dcFh+srG63Rh+qR+Frez Wlm1sqTkKi/x3AS2pW73cEIZce509pZaxh0hJrzXttbFTQriVmZ2X0bLMcPbTJeDH4x7 rcSw== 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=ZGVvrI809fz6rllRIdV+WsX7fJSqxzfnBPmVg23DB8I=; b=ER9FLB1+Ik4QLn0BfZWypDgWqKoVfoR78k+yQB/Cm929PLd68mIJF1BZqSvhFOp3qH 2AAHXK1z6oRARiapE5EjUIVx3Phy74N1ZDTBPdPImGcs7cGvtoyEmz0FqXdK8Zrbuez3 uEF6NofUP28X0Svagtrmb7PBFBBY2/b4lqW3XhDTuDI2hguFpH6MkynjkxBMZ0D2Pkq7 a9qpG1OFyHY12PE2ZtkbUj7pivWsm3dkiwtZA9MoUkDm/HqznxSdWfmFU33+9pcqLgUY 8oZwsLuY5/3BvzahJwEczrBc+1aG6Nvu6xWD9WhUQBcaqKTdOxAZks36Kx224hW+iaje JPKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Lluh5umc; 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 k3-20020a17090a7f0300b001b8cc417afdsor732062pjl.0.2022.03.08.00.27.51 for (Google Transport Security); Tue, 08 Mar 2022 00:27:51 -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:90b:1c05:b0:1bf:488e:cb77 with SMTP id oc5-20020a17090b1c0500b001bf488ecb77mr3463389pjb.1.1646728071095; Tue, 08 Mar 2022 00:27:51 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 00:27:50 -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 Subject: [PATCH v3 6/8] drm: bridge: parade-ps8622: Switch to devm_drm_of_get_bridge Date: Tue, 8 Mar 2022 13:57:24 +0530 Message-Id: <20220308082726.77482-6-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=Lluh5umc; 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. Signed-off-by: Jagan Teki --- Changes for v3: - drop panel.h Changes for v2: - split the patch drivers/gpu/drm/bridge/parade-ps8622.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c index 614b19f0f1b7..b58c928a05f8 100644 --- a/drivers/gpu/drm/bridge/parade-ps8622.c +++ b/drivers/gpu/drm/bridge/parade-ps8622.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -452,18 +451,13 @@ static int ps8622_probe(struct i2c_client *client, struct device *dev = &client->dev; struct ps8622_bridge *ps8622; struct drm_bridge *panel_bridge; - struct drm_panel *panel; int ret; ps8622 = devm_kzalloc(dev, sizeof(*ps8622), GFP_KERNEL); if (!ps8622) return -ENOMEM; - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, &panel, NULL); - if (ret) - return ret; - - panel_bridge = devm_drm_panel_bridge_add(dev, panel); + panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); if (IS_ERR(panel_bridge)) return PTR_ERR(panel_bridge);