From patchwork Tue Mar 1 14:12:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1851 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 574F43F0D5 for ; Tue, 1 Mar 2022 15:13:23 +0100 (CET) Received: by mail-pj1-f72.google.com with SMTP id e3-20020a17090a4a0300b001bd4aa4cfbasf4341985pjh.6 for ; Tue, 01 Mar 2022 06:13:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646144002; cv=pass; d=google.com; s=arc-20160816; b=s8jRR2ckdDHhAD45m8TT+Tc/uhB9iXDl6e+Cuo9yJJg15WrXh6ITKFSIqWSMo69aGq QYGJ47/ed/9lWqQ+vaMODYNQAQPKAlK9hvAajYOe2nEuiRe5VwPiDusFbp+v4StHZuCO KOwkGJQZTqjwz2rx+dFsO9PyjTTtQiq/kwAPest3sZxdpqMtB4d6VG83UgY/H5piHucb aV/ddS25jP04xx7sReANTyNPKimpQKbQyahDAXTlNpQFsl4m/4kg8PqZkjXxhxKrpkqE CbpEJC39c69PKib8vAfYZskILGaUSK9rO6iJS7oC4VeA+X6+DrtcxeghqanfRgsLytGU 7w9g== 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=y/Ba9EuWl/gOYOHIJHfgH+/iyNWI7BkphAf6KVbx7Sg=; b=K21nUIrk5KDHpsa6p73MFb3H1wgQdTCl4S4yC4aQBVTou6WvRWgGqTbz4x6J6oLZZL QB+uFOhPzCsrHR4pCtEYPQ67prYoKqSf8rcnYdCetV5n+eqsmrv+Kjo1qV4o3YT0/xyF 7DC6Ny6AV95X8byM1MMdvrsW34wm7Y+yT4/X2vaW93krEKUolkHq+GlCxatCMtIBalAP hXC6z+WA6K6sEBrQiRkC4uJhKTotSx+XVbLHYT9IhPZlZpYOcqds16DfNTtsyJu/tGB0 FshW/HuxoGoXGR4JlI86qQmTbm4UVwwsOaQrpr32a4sCfScGDw6xN2ukbIf1H9rpNMVZ N2Sw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ky85ZWNX; 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=y/Ba9EuWl/gOYOHIJHfgH+/iyNWI7BkphAf6KVbx7Sg=; b=jcCnlaJzF1JvZsIFYTqKr00RCrPcCN8Hmt881ei5l6ThSifgR0dz3IC0qkvj+CjY36 MtL6whL39uTwVze/7UkCcltSUrCTDtwK3U+rR8HkGbxYCAqZaIFHoEp+lBKI5pfS05dh zsjSAYbjmpIcutEkackZ9/LGx4SjCk+DXd+H0= 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=y/Ba9EuWl/gOYOHIJHfgH+/iyNWI7BkphAf6KVbx7Sg=; b=gpih07ozYeRwI4xmo9QLrHTkczQo/C6j9amLm0bbwuOjrKvJ14kMxxBHfD8F8EbvX2 HSbLgdEp7mkVWFcQl7b4gZQvrHJlIUQKTbpxLqaEG64p1qoI0gfpAI+M63BPuS+4YATI G99GMja0Ne1C3lTwJnrDfUoKlYZZsoRnkJumEJ7mol3opzrR2K9f6Lj2HQh07HWBplN0 PhjzboTFEZwh8zdXwxfviWojmvnKF695YYXv5ceu3nA1F78tjEjKpiSZf3WetRNkPGPc Uv3zv1KLxiBoiRcrO0TXakqPqD6/l1tpYEgxj8QFXlGXKtsizoS0Tnlj9LyeumaqSLRe EzNA== X-Gm-Message-State: AOAM531WOQUGTi9r1h1+KKfQxTYUTEbaOSpCwxilL2GXmLEob03juDck zipa6DQ7swTqaPCFeh3MJZgEtHeA X-Google-Smtp-Source: ABdhPJxDPI/yAnluKGni0QPI82RlfogmeeZNTCI2U4CoRyFvcZ1tzPAiXQp5DazRPDH8ZCjOhme2Ng== X-Received: by 2002:a63:4c65:0:b0:375:5cc8:64ea with SMTP id m37-20020a634c65000000b003755cc864eamr21622993pgl.279.1646144002123; Tue, 01 Mar 2022 06:13:22 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:eb44:0:b0:378:a292:4507 with SMTP id b4-20020a63eb44000000b00378a2924507ls2805938pgk.5.gmail; Tue, 01 Mar 2022 06:13:21 -0800 (PST) X-Received: by 2002:a05:6a00:2301:b0:4e1:5842:48d7 with SMTP id h1-20020a056a00230100b004e1584248d7mr27752637pfh.14.1646144001465; Tue, 01 Mar 2022 06:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646144001; cv=none; d=google.com; s=arc-20160816; b=eQcdXV0GF2nFKI+z/ntegdtf3GfUCprde3FCXjV4Z8i4u7l2z6VAeYlE0gpjMdBEqc CYLGyy6+XkV69OVq9dPRZI9ExGK9k1GkK75BLqroOylZ1yxH9z5tLKpcJbSH86yA+wQy +tPLm8C0P8V1bt9SkjSWVCIibHHxLUB8+3i+t1/atCuDm62hyTHzh/dnAOrRmeLUs+RA 34PkpTH9mo3Hu2rnZnSQLhbzZAPTFbmVMlPM+ZXWbZDedWb92SxVU1rJEVqLz+zGdiL5 FgPFc4X2+2mtvZT8b0OtZVzd5pb+q6vv/gOdQzqzJVETNfli623uqdRsI545NS8Pz8Ob vSiw== 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=iRt+M+Ob+KcM1LrH93JuvfzptMSFKo5T03WLMF24Y/0=; b=fSwBHUtGUuP//MRf4nCJwe2SMeu+91KFx6Yyh4BVVZohtuegF4QCfoKJirOvyEIiJW kotCbqGf3C4ebkQnXSDd9I0/UbKJSdNj6EVBHyAB6ykZcmTA6R3vIaaaj9zIS571eKdP I+ida3Twiw+vz2W/BjbDPH5Ag63Z/VdNVLjXl48I7arIP6mp9c9IWQo+p8Tx/wKMkRTr ucxm8kSi0aKgeKpzDvhWOYFs7m/KLZ2DIB5XV9iD4mhe5T3KCLFkYwZoV1lAPQr0zY25 MIanKJA2a78GXMe9Iv8vf+vfIBG5ruOS/0/wpNRS1yxpmrdUYYYL/sb2AJ7hRkuWcDTu RLIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ky85ZWNX; 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 h6-20020a170902704600b0014fe9289973sor6520529plt.35.2022.03.01.06.13.21 for (Google Transport Security); Tue, 01 Mar 2022 06:13:21 -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:740b:b0:151:8479:3633 with SMTP id g11-20020a170902740b00b0015184793633mr2760060pll.152.1646144001150; Tue, 01 Mar 2022 06:13:21 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 06:13:20 -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 6/8] drm: bridge: parade-ps8622: Switch to devm_drm_of_get_bridge Date: Tue, 1 Mar 2022 19:42:45 +0530 Message-Id: <20220301141247.126911-6-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=Ky85ZWNX; 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/parade-ps8622.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c index 614b19f0f1b7..37b308850b4e 100644 --- a/drivers/gpu/drm/bridge/parade-ps8622.c +++ b/drivers/gpu/drm/bridge/parade-ps8622.c @@ -452,18 +452,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);