From patchwork Tue Mar 8 08:27:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1867 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7DE1E3F067 for ; Tue, 8 Mar 2022 09:27:56 +0100 (CET) Received: by mail-pl1-f198.google.com with SMTP id c12-20020a170902848c00b0015025f53e9csf8876597plo.7 for ; Tue, 08 Mar 2022 00:27:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646728075; cv=pass; d=google.com; s=arc-20160816; b=azOXdNyei2tKYqPOheXmG6bOoIYpdsfrmxtJ6pMAOiCfzsFaIFJ/tt6mhwAXuppI0R Ofc5ei59ZX6pt+IAeYzdONW+XCnpvuR/HktrUHWvtOCNkqq74WZ8WP8XtW6blomCKB5y 9a6huOrXEa0rzYfVWU1poqzgb3yd4wJyFzqewo7MwW92FlRQtVOdrbK41sRwJwLcVQmw tE/+JlswmKZ+MX4TY5U8bpgVY7cGceTO2qjnALu7C0b+JdNjh7Mk/IO1/r9GMCfDvTT8 6+6M14ZS5EeYMFQrx+gu6XcZzMH8W/ORav8UeSwq8F8Cq5bBPVDf919T4xxfOFidAUSl NR4w== 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=FV52Mx8Clm7YC39nD5jSVylnLBEWYfxq4MtAVjSQQXs=; b=s8eDvYeI+O1FylnZsVIWna0LsdI6RYqyklSYah/qy3qB47eX9ZwLK9iRxx1AnnjbJE /p1pX5oiCJCik9vQwNC8Za+1kVFqStNen2YO7QAn1CpOLDZQ3FGp9YnqoTiCq1nXr1Q4 oAFBygJ+tJXQZdJyfXuV9dRibqH1wZipd/yTZbPmIOtVp8vVfTPvIPGQhnMqqPjkcwJC ihoT7L1DaEJrlID1847e5eWFDqUKklyFnV5JNFCLLjC/uL70CkoT6tXx6zxw4dcGrjzk vVpyF7ImVxTEmLpQmVEKnJPRddCopxCBMVlHjwi6vB/tEfNHPSog3nHsw6GImIAT/svn RQjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ORwZdfSw; 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=FV52Mx8Clm7YC39nD5jSVylnLBEWYfxq4MtAVjSQQXs=; b=D4lq+tWFxXfBt7Hm52FzLTrBv9ZkcT4OYl7MSmkyxu7cF4uJHIRYcYEIe8TPokg6ly +BmZVvPYfOL6Med5miKoM4mDBfXBm8YBhbb7mnQNvvv07JBn+8dR6sPO6fXKULR9R2I9 viwMQenOPtbWhstjmnLTTLV1hMsBUydsko800= 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=FV52Mx8Clm7YC39nD5jSVylnLBEWYfxq4MtAVjSQQXs=; b=l/cJTetg6mDiRLSZr2PZd/MyOCrzfzRePiCppI+Kj9k0zUKkk4+GAqb3xsS1uoZ5nM sQB+dWQMAUkmIof+GhDeIprmPWntVuGFgtGZ8ab/SkbahSYXfNmvL5ZhltVwvm4ZwKnd DsL/W3jR48lJdd0/jzZeXr6JpkUY4Acv4VoM6XMo4KjNaIa7r2GaqWpbhwNHXE8PA/lx mb0amrG8GXbXaN1WVDXX+/tprK5lW3JF9d1f9K6I+rcndJIMQo/wSOCjt8oY36pFqlOq nrX2pfc6X4w1XhMOObirRRv5e4SfqS/u2QVTxT+ou2xl1FQsJkMAJg6RRqfriuybur1y R/jQ== X-Gm-Message-State: AOAM5319RfkbUfJX1nPPupfGgFwp1giUeSK6J6aEOoWkq8W4gHElIBDD qp8ozQcd7Ia2WJb9AFNrgT3473id X-Google-Smtp-Source: ABdhPJyQdwQ4m4w90KcksF+/yk5FTzCgTe/v7K1QPryNM9+G7ahvX+58Hxd0WzmdPRxl9Ol3MT+Ltw== X-Received: by 2002:a17:902:b945:b0:14f:f05e:5479 with SMTP id h5-20020a170902b94500b0014ff05e5479mr16488356pls.94.1646728075335; Tue, 08 Mar 2022 00:27:55 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:dd14:0:b0:375:8566:f8b7 with SMTP id t20-20020a63dd14000000b003758566f8b7ls6421130pgg.1.gmail; Tue, 08 Mar 2022 00:27:54 -0800 (PST) X-Received: by 2002:a65:5843:0:b0:347:6fca:d6de with SMTP id s3-20020a655843000000b003476fcad6demr13130803pgr.168.1646728074657; Tue, 08 Mar 2022 00:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646728074; cv=none; d=google.com; s=arc-20160816; b=GquPDAyUAR6YTO+3evYtMLwE7xwZSx/oshNeQG6rPItm9IiDyuYZIN6hKucFULOV9q Z0womDamcQG+8fzYGylMobf7HBaggmotIZdwUo4oWfTxILB3LIurwvynfPUuS3iKlyaq b+QS0cWCXKbPJXniLyaNzC5OOq0yZiIR1ArJpBl2AjoslYQXOEIeeZHD3Slwh0MHeT5L 0I02UX6ceHa6nx6GtezdNkh2eku4wYiD+Fia+baJ2tJGEUgkr1LeKrt5XKIYQjS1Bk7a iMBbPwen8JgTp1a4JEdliS+UJF+7vXGdnv3E9vX22XwAFSVaRGK7Latn56MppYUn8rOZ EHWw== 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=BzuL90H2SXaIr6WoFWlHW5oD691TseVSnN53BQHlmIY=; b=nAkc2BsW6grUbXbiDmNDroxpyVzcsuGb+VpsaCe9Ya6rNlVgosqoUzzDThiY1BNmzI 4e6l5wGVPtiQN8nKknWXqGGhKAaslOqJL9JXSnb5jKvO9QiC7AOFV8fTe+ke/WbVipeB aM9uS6agnBNHoPNWmiDW4RAnzmZ+2kqFcgJzHJm51/GN+iiVXzw8trGSIWlaWT+NbF7a nWJg2iaROHMbv1bqC6F2webvy8bEZN0gH+Jf3sAwaBp/nWjOJ7Ubg87fYMpEh9As+Z0L bl6hIi7wKPQtl56Nr0CtnKgLBMDBG1m/V63HO/pR4qSFr+j64DKb6HAmk3aEIoX7oKEy Hoig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ORwZdfSw; 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 x61-20020a17090a6c4300b001bc9ad65e6fsor635075pjj.41.2022.03.08.00.27.54 for (Google Transport Security); Tue, 08 Mar 2022 00:27:54 -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:90a:1f08:b0:1bc:1b9f:9368 with SMTP id u8-20020a17090a1f0800b001bc1b9f9368mr3452219pja.63.1646728074320; Tue, 08 Mar 2022 00:27:54 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 00:27:53 -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 7/8] drm: bridge: anx7625: Switch to devm_drm_of_get_bridge Date: Tue, 8 Mar 2022 13:57:25 +0530 Message-Id: <20220308082726.77482-7-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=ORwZdfSw; 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/analogix/anx7625.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 9aab879a8851..9e686d960e3b 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -1606,8 +1605,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 +1641,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");