Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3591576pxb; Mon, 21 Feb 2022 01:13:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrKpZuHtaoKG6WmgNPYwgKwysmI2p14N7pA6HwoBNdazvRtciI5VzJb2zG3h1EeYisHztn X-Received: by 2002:a17:90a:2c0c:b0:1b9:fa47:1caf with SMTP id m12-20020a17090a2c0c00b001b9fa471cafmr20672173pjd.34.1645434828045; Mon, 21 Feb 2022 01:13:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645434828; cv=none; d=google.com; s=arc-20160816; b=G6EM4zguPrH3Sc6P+FsxEK0v4EfIdIx9HihI8EU7VClvePSBhrT+/YCPtHZMCv/n0s QY/wXokRUR4eNUGHOpm2u+aMLoaEXhe70gvuvhiCM+9tg24JPWPv+iYTSY72mnRQVuKe MhJMFds7gpmBIamDHlY5l58W1wuNTDvk8TYj+JjxsFGhJW3NhRcg9ZCzA8gYkn6fPXQY 3PSj58m9Y0gsdj7T25xQQELmg46/+h4ST9AOlE1ezsyffQt/6Ad96qYUxyjQf40tgXFJ uEPu8eJh2Ky24lNUEDqSbFlrN5KKfjiOKmp9DDk+WZQeGZ/mLbLPX6comXInzZ7oEl38 EJQQ== 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=j8kD/ok13BJf5Nrp4mRjz+VFnutGthXKYvZnWK9jovI=; b=z2gxB7gKrv+zF0/ayOVF0CT9O0GSl7h5PkYIJIDDTUiLF3RGEGD7Uph0+JQf4CQE7d +mzhtBRRc/iyxMgfy24XoRvfcpeZtxpO9r3GwedcxWUGvN/Pmyz7ij1ct5OPoG0tjuag 2R1e6UtkfLpae9B+01mdn0wM2s0lcKjyexZT+ZyHt9fSdIFQNpVeW95zjGUP1kagszbS hDuXGOpzzo+AWjRRnjfmzfw6Z2YigE1sMH1smUrn5h8RpKAOp3fzJ/HKY0yXGFlvNkMM ob+RjT77AEjtHHRDPnXbn/UDcu7YJ64DRw9BUh204iai/OGd01ViCRocWgbsYIypYyZo iQHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XWaLHpOF; 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 k15si4760847pll.287.2022.02.21.01.13.34; Mon, 21 Feb 2022 01:13:48 -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=XWaLHpOF; 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 S1346370AbiBUHi0 (ORCPT + 99 others); Mon, 21 Feb 2022 02:38:26 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbiBUHiZ (ORCPT ); Mon, 21 Feb 2022 02:38:25 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8348A1084; Sun, 20 Feb 2022 23:38:02 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id e3so25504291wra.0; Sun, 20 Feb 2022 23:38:02 -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=j8kD/ok13BJf5Nrp4mRjz+VFnutGthXKYvZnWK9jovI=; b=XWaLHpOFQ0cjx8OYjCzDNiywKezMjHZqpCgeBj1HdMPi+5CrCtpovP6dIuGMJ1GYg9 +VoM/lz9G0BsPOfIStaKmk2clsPJLuJn/UWBRAyXRdD0uQvlvyHc10RQltqVoItgKZWd c+swsX0zNTgCRqHoGNT+eWvsP/zqf6D74HmqdN+Mmm9MYSNQKadKK2TA+/z96nfS8HML 3DlIvDV5raw/wfnAn01twAw5hf+g20oL6a+sLlmlT3Z7CXVxXlmQwg2MX4om8JPpJBeV QGqVZvnrNZ12h4wuRJUP/tPTw6N3N8tjRFemCXSfx6GxjQOpK2FxoyMlbRCIWVd6OWON dyqw== 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=j8kD/ok13BJf5Nrp4mRjz+VFnutGthXKYvZnWK9jovI=; b=PPV4kUSNq31N68oHKaYZr7uxf0/3he6MoUxq6y+/SwqU0ALcDkrmEByxkXPHc+xjYG tE1TWy95to4nd6sVslcnKjhG5I1SfjT7tIbVtdnlFcOy8U7s5eblUBvQ0KkaMqkMScRH hV3+6yxVViP0UYUMM5uFyYj/EOvt8IekMkTDGaC595BbrTQ2/8T0KlgJBAGCHzMyXG1T Bt4xKYIahGGH01I2VVDaCZ9mJ0rSIebdGvQrT4H66am1c803TRJGytbvslnk8MFxB6Zx 0zLUKLQMBDjpBlL+quDphMmbBnFgLYiwMvrDbgbfMCEojs/f0PPCh55gM8JYLovNNtvj ASBw== X-Gm-Message-State: AOAM530lnhi+xYDLHaF4OgNZIDQO0SgqKtNHfLJro58etADCDXO1buys 3jTeJ1SSYLiunkB2+HS9CEw6JafWCxx8PA== X-Received: by 2002:a05:6000:1a89:b0:1e8:db90:54cd with SMTP id f9-20020a0560001a8900b001e8db9054cdmr14553344wry.303.1645429081157; Sun, 20 Feb 2022 23:38:01 -0800 (PST) Received: from localhost.localdomain ([94.73.33.246]) by smtp.gmail.com with ESMTPSA id z7sm6598773wml.40.2022.02.20.23.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Feb 2022 23:38:00 -0800 (PST) From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= To: laurent.pinchart@ideasonboard.com Cc: kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@ffwll.ch, maxime@cerno.tech, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Subject: [PATCH] drm: rcar-du: switch to devm_drm_of_get_bridge Date: Mon, 21 Feb 2022 08:37:57 +0100 Message-Id: <20220221073757.12181-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/rcar-du/rcar_lvds.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c index 72a272cfc11e..99b0febc56d1 100644 --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c @@ -712,18 +712,12 @@ static int rcar_lvds_parse_dt(struct rcar_lvds *lvds) { int ret; - ret = drm_of_find_panel_or_bridge(lvds->dev->of_node, 1, 0, - &lvds->panel, &lvds->next_bridge); - if (ret) + lvds->next_bridge = devm_drm_of_get_bridge(lvds->dev, + lvds->dev->of_node, + 1, 0); + if (IS_ERR(lvds->next_bridge)) { + ret = -EINVAL; goto done; - - if (lvds->panel) { - lvds->next_bridge = devm_drm_panel_bridge_add(lvds->dev, - lvds->panel); - if (IS_ERR_OR_NULL(lvds->next_bridge)) { - ret = -EINVAL; - goto done; - } } if (lvds->info->quirks & RCAR_LVDS_QUIRK_DUAL_LINK) -- 2.25.1