From patchwork Tue Mar 1 14:12:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1852 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2C6273F0D5 for ; Tue, 1 Mar 2022 15:13:28 +0100 (CET) Received: by mail-pg1-f200.google.com with SMTP id j5-20020a63e745000000b00378c359fac3sf2723011pgk.2 for ; Tue, 01 Mar 2022 06:13:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646144007; cv=pass; d=google.com; s=arc-20160816; b=cqpRpVqEcsftWZXYuQAlHCiRkg/dJzDL9VfRAh67Dym8vf5g0mFBf/aU05XyQT4eM+ GuuDyFfpOAugzNkPEsY9KdinFphXS3eoXbEs6y9VofsY7i+5o3+vWxwIcEThSo34l44+ L2hQaZNQ3QAFv2rPth7OfxRhe6WxhgPrToAnCgUyG7fcj9SIEfsVRP4ptN2g0kJYOiTX wNHWb5YnHBzRs+8LyzzXb8nqTNt/IsdybMEv5b/4BtoN4NqsxJJ9wp2N+hXufONl/B+d GgofDkoDIeQ3RnDpca76eWSO/nwYWIU98N3hWGVBamio0Cdn3TKJkjyON6MEje+2gEey ArlQ== 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=NAN1cENmpyMlsqlTMLw3syH9t9Bmis/Cb8BSeFwR6Qo=; b=VcoZsJGiYVXad7M52pBrC4Rw4GS9mBdn87cmiyGK/IQHOQThhewceeixkDo9IF0jwG 601I6apuRkbawox0EGlyWRYsa1doSOAu/4E1t5yXO/+8JXIl9AjWO7d9Gbu8AR5plekx HC2zWDyyEPkYLDQ3R7FQiVv/YvY+sbYpLJMn7aThW2pcxWFVGioJVe2Z/Kzf2n8auwLK RC/eQu5iDjS+acV3m2c46htjfgXad1PWlKgsO1/lSUwUeJwuEf/GM3uos2AF8nBB5Uof NFl94ZKZHPt2dSAr44b/rBzE+WqW2tuZRFUkGYy8nnl+/mjMwNQTb148QqcEyZtDKJVQ zVXg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="hbF/WZKz"; 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=NAN1cENmpyMlsqlTMLw3syH9t9Bmis/Cb8BSeFwR6Qo=; b=PjF+m0bLFz6JHT7y0iPfw9hf8IXKMt51SJ2Gq7uQG302+PEfbRVAPhgFDxbINoQ7T1 E1+TttW+mYuf/+BYcFVWm+NnYfHpTYB40DkaA9S4ckraZrhV28HdBIEqb4169sqZGwiR l+MkE+dCvVyBkHzNX6Z2uJfKw+ClPlGv30eVg= 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=NAN1cENmpyMlsqlTMLw3syH9t9Bmis/Cb8BSeFwR6Qo=; b=l76Y13WI0sWims+2j16PV+U8lEu7io135dTexb4DPTCx6wP1IaNbp5mvm60X5BO2jh AYieru+XWUKT2GxJ9Zc+t/NiCcDwGZU7Tw3zSEOwMggTTF+aKDDzgP8elCl7AWTSWMEm DRcnJbW9hInnVJMM0mZJCOFh4QHUPhsum8J7mT+ydC+XLFG82hFvoEqK5v1bB7Dqjdyi ho6WgD+BGCDlEPNXRZGyX7+bwwscju0abbkXYoaCgofnS6fvZqqsfT92LCNu5EuMj8pM NAQ/YZN3YKGRRa9r79D2ypp5YirIkQ0ob4nBvimlQ0ypLSWqA/WUpQhk1uDWCopbm5bQ 1aQQ== X-Gm-Message-State: AOAM533OSiRlPalC2fUt8Ls3NOWqKrezIrYVnThnMsscNO6S8DjuTx7R BXk9ldG2ax5GynW+u9ghb3PzVzsq X-Google-Smtp-Source: ABdhPJzgy20bwUXYnA4vm7A5GSWLcIGnBtg264CadjSKKkfOFLVt4MX+wsryv+H2l92FAnMCxwlBeA== X-Received: by 2002:a17:902:aa84:b0:150:8d6:bdec with SMTP id d4-20020a170902aa8400b0015008d6bdecmr25303740plr.118.1646144006965; Tue, 01 Mar 2022 06:13:26 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:ecce:b0:14f:d9c5:79c0 with SMTP id a14-20020a170902ecce00b0014fd9c579c0ls12465503plh.5.gmail; Tue, 01 Mar 2022 06:13:26 -0800 (PST) X-Received: by 2002:a17:90a:a58e:b0:1bd:4752:90cf with SMTP id b14-20020a17090aa58e00b001bd475290cfmr11198905pjq.54.1646144006202; Tue, 01 Mar 2022 06:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646144006; cv=none; d=google.com; s=arc-20160816; b=0rS9b5IE04QE6rdqWI/Go2yQjaFFTjRbA/BjZ1Q0Ur4e2dUPdgTURLDSwf5PwkSh82 C9aNWHuR+02Jqogeqky12Qym8xqUYGdj9XlTgJM9rC38TTGJPAAyxTvjsu//nG3ntOya X2ove+47KVKDyv09iHfsPSu1h8mxMHb64439IMrg6tVghhYDfuJEFVwyJEkmMEP/AdbY 8a4b4Qf7jol4vmNZEZRVWgTc+vKRvdZvPlAO1RWl/Ga7un6A+i+biPukM9TZJJd3g9Mu FHJ9Nf9uexa+AfdvTuMMD8NyEewwPiZ9mEfg0IPC00nQyjrci1pSfF8mXcR2NXqR9lyx 55Ug== 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=qaTZu9FvVrqWlSDXwnXpKy5XmlDOhQcTJsIWX9eI4CQ=; b=ix3HqjdsG42SR95hg06/irxV8W+oz15/FtZHItwZ0zn/P5dZkNlzQkAnJ9B5ERJkId WTfGntkLcyvOcSWHZrMrU/PTYfZBCEZSBM0vaXlmCKhOHFOix/X1HZPI/6//JqRw3Vjc v5t6J+pf4CO3vKPrpMtASW0tCIMnsEkQk+YoAawJbTy8bN/55roM1IoUlBPE0iep+O0U x3l+F1LDQ24zMewr6CcUQK1QADMMcRvH6rj3CzHhiaP82QCq+I8Za36tXaCTnYPLoN9a JtUhnN52JsgEHy+LKC8nO2jXXx7Qma5Pk0qi0AVwQNyQzkpkrPZ0PqiEqUZ0jdaoDf+E r9xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="hbF/WZKz"; 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 l13-20020a170903120d00b001516eb5db81sor2499290plh.41.2022.03.01.06.13.26 for (Google Transport Security); Tue, 01 Mar 2022 06:13:26 -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:ba88:b0:14f:9ef3:f80f with SMTP id k8-20020a170902ba8800b0014f9ef3f80fmr25381276pls.170.1646144005914; Tue, 01 Mar 2022 06:13:25 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:dbfb:dee9:8dc1:861a]) by smtp.gmail.com with ESMTPSA id d11-20020a056a0010cb00b004e1b76b09c0sm17317571pfu.74.2022.03.01.06.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 06:13:25 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Neil Armstrong , Robert Foss Cc: dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 7/8] drm: bridge: anx7625: Switch to devm_drm_of_get_bridge Date: Tue, 1 Mar 2022 19:42:46 +0530 Message-Id: <20220301141247.126911-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220301141247.126911-1-jagan@amarulasolutions.com> References: <20220301141247.126911-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="hbF/WZKz"; 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 v2: - split the patch drivers/gpu/drm/bridge/analogix/anx7625.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 9aab879a8851..f7c911104464 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1606,8 +1606,6 @@ static int anx7625_parse_dt(struct device *dev, struct anx7625_platform_data *pdata) { struct device_node *np = dev->of_node, *ep0; - struct drm_panel *panel; - int ret; int bus_type, mipi_lanes; anx7625_get_swing_setting(dev, pdata); @@ -1644,16 +1642,7 @@ static int anx7625_parse_dt(struct device *dev, if (of_property_read_bool(np, "analogix,audio-enable")) pdata->audio_en = 1; - ret = drm_of_find_panel_or_bridge(np, 1, 0, &panel, NULL); - if (ret < 0) { - if (ret == -ENODEV) - return 0; - return ret; - } - if (!panel) - return -ENODEV; - - pdata->panel_bridge = devm_drm_panel_bridge_add(dev, panel); + pdata->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); if (IS_ERR(pdata->panel_bridge)) return PTR_ERR(pdata->panel_bridge); DRM_DEV_DEBUG_DRIVER(dev, "get panel node.\n");