Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3577659pxb; Mon, 21 Feb 2022 00:51:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPTArlJcsieURj15+YrTZb74UGGuL2RXfQoY91d2lSGMyQbghtUF70O2k8T4ka2WnkHV29 X-Received: by 2002:a05:6402:2055:b0:40f:6a63:2625 with SMTP id bc21-20020a056402205500b0040f6a632625mr20923595edb.329.1645433517569; Mon, 21 Feb 2022 00:51:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645433517; cv=none; d=google.com; s=arc-20160816; b=VxM6hmEQgZQRqNk9Urdr/i/wQNn7rm40WP7snZlN0pkRk2SVvDWBiJWUH1/Z1JYx/d YbHZi2zMbE636Y0OLH0bCZhPNtnkpx2eVrZgCuNvp8bTmrxBBsHXbAsDFDIWFLuKyzpv sqOnqqyOHWgIl1yxdRoI1n9okCN2Jxerp+82GUQWxK2cnJxgE3w3FjNp+UDg8wb6Ecaf elBEMZvcW2d5/Kl2aiXpMjyH0Jyd/wikf/dtBRqMa4yKOB3j3Ozk0NWCujNUgnp7V1hS 4Ouv4Cy7r1uyseCljiR3RN5njwUNkccicEiDvIqcUnAAZq4LeKWB0PZ09BPYbgf3MS/6 9+Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=e3PLukBtwfovlwrmcqI4UjQoWYEr1ObJtYBgUzUoDAs=; b=DNxh8oRV0EpZTh2sPGJttNKUaJlVt5RnA3tu4otW4lc/T8JrX01dnkqkrmzv7J6Eax XjCWqo0kpwTFogfFNClFc/eIPDe8rRGN92WsCzKXV0XREv0Du97xYBfSGdiQyFxVMj7Z xHJRo+B6Vn7ywLIo5nzc5jsy02oUoariMn8dP0W//hD909RFC7A2C2dogcDiMq2hMg+E oX+OgYyN2mhpcA9iIgy0CwzdYCj/+1rKWkkZZC/jS8AI0yIincTn0ANFhWnjy9lVGTXv uMc6R0r7jbqtxGazKrjovi+rSCI2BfKvc0TcisY6hYcgOJ3AY6OuBaaOQdrTG+BmD4xn mRwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Bu/jNlb3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw15si6874891ejc.125.2022.02.21.00.51.34; Mon, 21 Feb 2022 00:51:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Bu/jNlb3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244535AbiBUH3R (ORCPT + 99 others); Mon, 21 Feb 2022 02:29:17 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231397AbiBUH3Q (ORCPT ); Mon, 21 Feb 2022 02:29:16 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDCCE2E7 for ; Sun, 20 Feb 2022 23:28:53 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id p9so25360062wra.12 for ; Sun, 20 Feb 2022 23:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=e3PLukBtwfovlwrmcqI4UjQoWYEr1ObJtYBgUzUoDAs=; b=Bu/jNlb3lvECwKGFKqpGdOKDkX/dwpq3DeeCBPL4qdZRs+20A7yQ1DHVXTHQ3m6LvJ AnEGmKipFWYIFviPjHqCywEnmWtZ8AwdteBwMKrBHolRiZPXhCB50x/yhvEbAdH2UODJ fCdqIHyTsoNPtNXLRpS1jnWpUTga6MLuq/u/vGN/YkPaZ/27WjEQIDJNuIL2l8LPvGC2 7b+jwdzaIHoNHPVkbK2YpJ46aFRqlzwZz0VwVzRzFMMCEb4igsiWCW2FeBDm4DQIJxXr KEToa5m5bIR6JmObEkr98YCR6TrfHD0voUNSh64nEGdSwCQoLM0AjLH2P7x9h/4FO1No bCBw== 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:mime-version :content-transfer-encoding; bh=e3PLukBtwfovlwrmcqI4UjQoWYEr1ObJtYBgUzUoDAs=; b=HqPCGry95LC082blssOS5fqxr/vHezNsG9z3y7JQT4s1D2R17CDP8gmKxNHdOJV6pz DWslbfQO2qMFYpBQJCemawOeaMqTg6uVdwF9jhUfP6zECGrylYhNA8mB90dK4CNNC4Fg DNAfwTR8a3hTvGYc8UfQf4XQd3bMm9c90ZAATvqf3KjiJYgBmaPj1WFIGK9qL1XALVud 5BypyyOTktAMuqGpfEDxbNpMarYEplvsdlQWd0LtVt9d6gWx6cB7RkVGZevg93hpiwFS KAQkvYs5UC1arRAZ5fRrxrRjfO2Z37VfohhVuEmHoel5kH+JeLJ/zdyiX2cUC8J+07bi tDmw== X-Gm-Message-State: AOAM533ifvwPrAgq/rshN13PZTs4OxgpYLxdFqWCkV9ZCQL3m+VhtEJI TFDDQ9mS+KvceNcs4BW4mMk= X-Received: by 2002:a5d:4e03:0:b0:1e3:3a59:48ae with SMTP id p3-20020a5d4e03000000b001e33a5948aemr14430468wrt.634.1645428532396; Sun, 20 Feb 2022 23:28:52 -0800 (PST) Received: from localhost.localdomain ([94.73.33.246]) by smtp.gmail.com with ESMTPSA id a1sm51008492wrf.42.2022.02.20.23.28.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Feb 2022 23:28:52 -0800 (PST) From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= To: andrzej.hajda@intel.com Cc: narmstrong@baylibre.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, maxime@cerno.tech, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Subject: [PATCH] drm/bridge: anx7625: switch to devm_drm_of_get_bridge Date: Mon, 21 Feb 2022 08:28:35 +0100 Message-Id: <20220221072835.10032-1-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function "drm_of_find_panel_or_bridge" has been deprecated in favor of "devm_drm_of_get_bridge". Switch to the new function and reduce boilerplate. Signed-off-by: José Expósito --- drivers/gpu/drm/bridge/analogix/anx7625.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 2346dbcc505f..dfeb800751d5 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1333,8 +1333,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); @@ -1371,18 +1369,14 @@ 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) + pdata->panel_bridge = devm_drm_of_get_bridge(dev, np, 1, 0); + if (IS_ERR(pdata->panel_bridge)) { + if (PTR_ERR(pdata->panel_bridge) == -ENODEV) return 0; - return ret; - } - if (!panel) - return -ENODEV; - pdata->panel_bridge = devm_drm_panel_bridge_add(dev, panel); - if (IS_ERR(pdata->panel_bridge)) return PTR_ERR(pdata->panel_bridge); + } + DRM_DEV_DEBUG_DRIVER(dev, "get panel node.\n"); return 0; -- 2.25.1