From patchwork Tue Mar 8 08:27:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1865 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 305B63F067 for ; Tue, 8 Mar 2022 09:27:50 +0100 (CET) Received: by mail-pf1-f197.google.com with SMTP id y27-20020aa7943b000000b004f6decccdb5sf5554097pfo.1 for ; Tue, 08 Mar 2022 00:27:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646728069; cv=pass; d=google.com; s=arc-20160816; b=cv6XLBwyTNr6Rrz+ww4Sd8xnDJifoWAYLS911wsZp5oEcKQ4KU/VxnlVhc7Cz5YI2f ravOWAAq14pOCtSHlKVMzZXqEYn+CYhSR2D8yp7kFwI1+cELUTQpu0c37PgFmFU0iDza mhaEphdWjUyaU5w0qVCOWxWOs8mPPJ6FmTeEDZlSA0d3AoNA3oo3gWEI7YRoKvxs18Aa mzhFpVNVXDj/KF1im0c3y7bfpZjLgLCfG1MLdtR7K+ZEwQz+F4nRFhWW13j96KPqXUCw SJNzZGfsgQyUYnDrasj9JmDowgH+BasDYb5H1rer1xdA424fU0HDIEXVJ6aNHdGb2LoJ 5KdA== 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=QCUOKeWCSlU5esDch+gTJ2e87/RJ8fgoxv/+iuxMRJY=; b=P8bj5+SbLOgvmY9VkEB6HlltkbhNYnkEp+mzM1GP0nAPGSLE/cj0kF0lPn5LXERaVo AkrAH3Y+juEWTyS1FPInhBhr0HfnMNlRBfRoYDVlslhdyEG3YwE0/Ip+YgECyBTXMtod c6sy4HINX3YvZewUrl/pEv/lhCKKd5kNJaeOA/hFcDFi9Ybz4JYgkEfsDG5iyd1HV91o I8hiMS6DHu78d0SeQssEuLez/LjrdTBqL/yG71GTuOROq9ahbZqYGn7oz1Zcs5CHICo8 75R2Q6Aj6UJlLTAkUyLker32YmKs5M8kA49eBQAuXtQ60pMHq60XF/unnJTVOs0A1tw2 pLAA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g53c3nLq; 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=QCUOKeWCSlU5esDch+gTJ2e87/RJ8fgoxv/+iuxMRJY=; b=I/fFfY9Y2Ahcl+kbEHaxP+zLzcbLqaEzgXrPXNBHWxl1xXWE3O38ROh6alfbMj+Kp5 tCtcwz1EKssJju3K53LzawSn5ukgkS208MPHwzU5wRHzIiQDBla8AFTp4USc5ydQD4Kl 8NCo92205rRgNhlJOXm/QA7WcuyHOlvyWIqn4= 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=QCUOKeWCSlU5esDch+gTJ2e87/RJ8fgoxv/+iuxMRJY=; b=sL48Od5KiM0NburjqS1NVs/gE2/oPYXwnBDjwt8vPIleAgro9tNj2/7ez3gB1DhhG6 jJMsZUr1x6ypeezSt04RqRRxgfhjQ14rXxMzOAEDmqUynXqG0XyFwYiX9uHQfvjhyoby Ug76QbyUN+0IgnhMxKyDm8jeXNgtVZ5cjHO7ad+HOhSjPUiW1YiPRlwvOziCyvfrhf37 vcjNRYL1Zx4cywX4ZuWCzB1ScCYKjVfwkeJrlz4N4yAlEdIwEbUrSIho3EjSRIso+yvK S7kTMo4pEYFE7eDPKmNsYHT1LppTiCPqe3PO6oY7uKIOKr64wXEsRBX72SCMDQL97fEM d6uA== X-Gm-Message-State: AOAM532pSLK5EFb6wVPIxJ7o6oQAyfXph4i/7fjfYKYLqNGMwOCARrs9 NI9HdDXIPSIy/vB1fpP4eW9/WBj3 X-Google-Smtp-Source: ABdhPJymsdp8V+94EwJ8iKoTywVaCNzY3Z3LImB2HnDEXMhGN1HvxFpY4UJ6wa9Xy12H6cJ1mVNwNQ== X-Received: by 2002:a17:90a:6508:b0:1be:d59c:1f10 with SMTP id i8-20020a17090a650800b001bed59c1f10mr3360974pjj.229.1646728069020; Tue, 08 Mar 2022 00:27:49 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bb8c:b0:14d:d65a:dbdb with SMTP id m12-20020a170902bb8c00b0014dd65adbdbls11891472pls.6.gmail; Tue, 08 Mar 2022 00:27:48 -0800 (PST) X-Received: by 2002:a17:90a:7e95:b0:1bc:5d56:8d4c with SMTP id j21-20020a17090a7e9500b001bc5d568d4cmr3395385pjl.93.1646728068293; Tue, 08 Mar 2022 00:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646728068; cv=none; d=google.com; s=arc-20160816; b=RovyPyUmXzbPjxIM+a+AegAI07R4do/8rsx3+5dizKLDNjKeP5GGTeBmZsyv0vOt5Q kMNZXe6B9OsvxGguVkwpZc7T/jIGJSgXwRFKUlLJ7U2JWgJS/GVt8hyci1uU27tnuL1a sfRWxmDVTJM+WK0ILSyQ2Zm33zwQdFgFHepnFOv2Ww35blLAWS2Ii8htEv44DAZ9iDgM bnwTn8h8kaW7KTebcBUDEQ9RWmhrHdnkz09f6cmwM8CqxrUPqIZ4995c156RGbTr4QAh Oa/yrZ/Dp4W8KwfpBYNed8ECHaZfcQDW5nXyaRJxHv5oB+aXvsalN2NiV+ZppvJBeW/s Udfw== 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=dp9Q1CI/wcSBt8a1D9eVD10iZJY30fzYd+eyRgz+eeM=; b=jNecBDrceQ2caW+IJsiFg5vHnsm8X4mUdHhBD6sqWQ9ZpXm77mkZc5A5HBXwWega70 jjyJpCqOIsDZGe9myVlLYyQCfDpckNQ/XWvDnqUqcePa5mHL+VlbQrsjFV8ELU9h+z5S CcZe0sZId/ILe/eV9bdIBQs8yYvs5Yler7e1e75zKeATXGVnAsnP3UHfgbWAzya1ZND3 sJeSPa2RqVqziginE5T0jbBoe7nVTvxhvRCtRyCICI2hZJO5Fr8x2yemoSDRXSEPKtuA vvNVEk6nafNUsXOmQ1yEeSNWI9+yz2LOXJK3DkZ3c+DiK4MMYokYNGLeO9mQFnwGoIXn 5n+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g53c3nLq; 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 s19-20020a170902b19300b0014fe928997bsor1612381plr.43.2022.03.08.00.27.48 for (Google Transport Security); Tue, 08 Mar 2022 00:27:48 -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:c40a:b0:151:a792:71f2 with SMTP id k10-20020a170902c40a00b00151a79271f2mr16239683plk.36.1646728068032; Tue, 08 Mar 2022 00:27:48 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 00:27:47 -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 5/8] drm: bridge: nxp-ptn3460: Switch to devm_drm_of_get_bridge Date: Tue, 8 Mar 2022 13:57:23 +0530 Message-Id: <20220308082726.77482-5-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=g53c3nLq; 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/nxp-ptn3460.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c index e941c1132598..f4cfa190d306 100644 --- a/drivers/gpu/drm/bridge/nxp-ptn3460.c +++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -263,7 +262,6 @@ static int ptn3460_probe(struct i2c_client *client, struct device *dev = &client->dev; struct ptn3460_bridge *ptn_bridge; struct drm_bridge *panel_bridge; - struct drm_panel *panel; int ret; ptn_bridge = devm_kzalloc(dev, sizeof(*ptn_bridge), GFP_KERNEL); @@ -271,11 +269,7 @@ static int ptn3460_probe(struct i2c_client *client, 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);