Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3109661pxm; Mon, 28 Feb 2022 12:12:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEFDA+PSbFt3yEDVkFJyKCF3GDk473Xo/8KV1Hmn0idcJLRArP+LvBvgYcnh5V3Dr43V0a X-Received: by 2002:a65:5a8e:0:b0:365:3b6:47fb with SMTP id c14-20020a655a8e000000b0036503b647fbmr14908002pgt.147.1646079138014; Mon, 28 Feb 2022 12:12:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079138; cv=none; d=google.com; s=arc-20160816; b=uWMwMNwZGd3UE5F8U9fR2qmLeaPMHOrQgcG7kXzHIOwa2Jw9qP04gD2HkJFoAWl2xa XjTXF+zc2+igM/jAtfpLgHKTyH8mAVeBxco1sn58Jxgq3DU8SFdaRRFHw/eLcOa9tdLx 85AFKswSAUxPgxgM++WUI5RPiiive4VyvtfPQnKi3eoMBBfLg5BBb1WbokMllQ6bDqwy vGgpZiE1yT3d95ccsXiPMV4CzPhpXR5Vhvs6L1hZHaDMRdylLPvNaN21l8Rz3WLdIctA nU6b3TYQIOLXwQtXSWUqSP75VgHJf6DgWEq7+Jr/jNQmbjLiPCXdM6/DuYbjSbis3gCc gGMA== 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=FlcmLpC9MBKD3947PIF9JBPxwRTyA5/sqH+s1PuwUHA=; b=P6QGB8cRaa6tITHOmfsu3hj5Q6ylUKmmSd2gwZgHuRVPx4Rw/JvsZM69WZ0bf7xtYN wRi2IvBXmM7a53SeIpPyQLa4AMyKA/SoUpACffOCTpRfoJgO3+5tjmR0BOV6gkQ285wa 6hv9VJndFjXxZqp7/oR7kVtFiFOwwDpXbJv7IHxitT+mwgZp89nKqZ3VyIzcRJnznT2H wevWEyF3Zo3BGOx30cDDyELMDrBa6a9d2tNu4TQoegwobqW9pankEKkX/onjAEFK8ja0 farBybLwJrvZ+0hVqGmDGmolFpBFfODCRx/A/5fVu7S8j6H63I1fYiBq1cceAOF6vRRc mYJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S5++n9Qx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s12-20020a17090302cc00b0014faa09f234si10380936plk.231.2022.02.28.12.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:12:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S5++n9Qx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 99F72158E88; Mon, 28 Feb 2022 11:35:32 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240088AbiB1Smm (ORCPT + 99 others); Mon, 28 Feb 2022 13:42:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240821AbiB1SmY (ORCPT ); Mon, 28 Feb 2022 13:42:24 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F8E9245A6 for ; Mon, 28 Feb 2022 10:37:30 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id r10so16899864wrp.3 for ; Mon, 28 Feb 2022 10:37:29 -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=FlcmLpC9MBKD3947PIF9JBPxwRTyA5/sqH+s1PuwUHA=; b=S5++n9QxaQfiFhgQFs96jfErSI/ww1y7RpotfHjiJEWLsph0ZM/igU4VDtQfolrv7z jUOFYtkgyTZDnHbFp+D185jf2GxZa4+rpL6Pkrcuws8veJn7YEwjBQFuL1CKU7VT0+QE UeCpiTSDs3iIHb70piAFIZygkYVrN51zrxA1VO1108x5+WQpnpNfkHQaGil6eg8IgErG E95mQRsHwvyCdnrsdonlQZjnRtLF3UJxJ3YFAtzGy7sqHQsn84H5ZfGh9Q/gDDf3CAFe wemf6FQ6pAsU8L5DgJMEmQk4ypOFFeyG6BLRYdQU/fmN0N5l3/GkP+7LeSOagPMWsG3i ndJw== 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=FlcmLpC9MBKD3947PIF9JBPxwRTyA5/sqH+s1PuwUHA=; b=1phxtEkUz6pvYRBbFgsMk8lkjjiz8713Kf86UYcUOWVJ6AFN8ypG0byN2S4oEhcR2H VhEJBrbR4jNylOwkZjr9GHeRgHdA89PpkOC2a7mpqHAb4sHWYOadX5eKjoJW6av5z0kg UzIjFNXSUQd2K6Ck+U0ybW5SDguQ2GRrtKobKUXI8odIBzSIIjwnFzUybVUFRFhJr55c WaOiZ3FQPFSLIO6AZMmnIkzZv2IN6fbZjK7jUNUDnJwmFhDKaXaT6VK8SYXWaG/VwOTa AN8zeWiyIIMUTL4mUaYbyNhlddmBCzX3pHVf+D7f9aqFw2vguL+RmHe2EAAkEddNuVps qB5w== X-Gm-Message-State: AOAM532xXb8boiPWgbQ0Vg8AHLHp3h5/HaTV01fqz1k6dQgRD4mx5BhT zciMKbXaAnKMw6opUF5tqjE= X-Received: by 2002:adf:bbcd:0:b0:1ed:b9a6:c66d with SMTP id z13-20020adfbbcd000000b001edb9a6c66dmr16931748wrg.455.1646073448611; Mon, 28 Feb 2022 10:37:28 -0800 (PST) Received: from localhost.localdomain ([94.73.33.246]) by smtp.gmail.com with ESMTPSA id s3-20020a5d4ec3000000b001ea95eba44dsm11118198wrv.109.2022.02.28.10.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 10:37:28 -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: ti-sn65dsi83: switch to devm_drm_of_get_bridge Date: Mon, 28 Feb 2022 19:37:24 +0100 Message-Id: <20220228183724.25030-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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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/ti-sn65dsi83.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c index 945f08de45f1..91cc00b66d3c 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c @@ -552,8 +552,6 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) struct drm_bridge *panel_bridge; struct device *dev = ctx->dev; struct device_node *endpoint; - struct drm_panel *panel; - int ret; endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, 0); ctx->dsi_lanes = of_property_count_u32_elems(endpoint, "data-lanes"); @@ -588,14 +586,9 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) } } - ret = drm_of_find_panel_or_bridge(dev->of_node, 2, 0, &panel, &panel_bridge); - if (ret < 0) - return ret; - if (panel) { - panel_bridge = devm_drm_panel_bridge_add(dev, panel); - if (IS_ERR(panel_bridge)) - return PTR_ERR(panel_bridge); - } + panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 2, 0); + if (IS_ERR(panel_bridge)) + return PTR_ERR(panel_bridge); ctx->panel_bridge = panel_bridge; -- 2.25.1