From patchwork Thu Jan 19 07:59:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 45641 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp206684wrn; Thu, 19 Jan 2023 00:22:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXvR/vG7w96OQXos6LOCSnshiuuhhLv73chJvwb9U/y/mIxjbqraqhwJKYc3cQhJHzwuh4Kr X-Received: by 2002:a17:906:cb89:b0:868:d72f:d106 with SMTP id mf9-20020a170906cb8900b00868d72fd106mr10059534ejb.47.1674116547467; Thu, 19 Jan 2023 00:22:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674116547; cv=none; d=google.com; s=arc-20160816; b=ThYqkQmjDgBl4/934YjbhE7yASr7XJiehaN2hzDpk+LD62fJjuErg7dmAinEWOE74I QAMTKtyvQsDt76DF95OVG84ltkDIOYnLYnYbcem7xmMrmnAGORigYd/pkntcxPmSFtnN UbntrtbL8FSPVeEXSug5MoDvLn34hgkRgsh3cuyDd4gy8ZWX9v6tsKzgC3fBS4O9X2q2 aL5Cs5ahmbd5kNdd/RR7kJJEktl3j4nG8J+i5IQMKG7bSfPzlIwnrwFu9/rT3gAUmoJJ nKZDkoYAL1pfXe/e85hiWZvfwvT6sEFJXZS4iqM00oQuekFledtaZ1YPDUOY1xoYmC77 YqXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=Rh4h1keTGgbIO1KZjCmo+mDiwOMySt5QZ0QjP6ZGxb0=; b=jFTgoSJQYDTJCm+KAJGx+DiOvPeHdpKF8rrtgGDgMbVNBruF/khtGCktzbHiFq5K2h BQbbjh7uCvFEa1bPKIkoD3m/OYhJvQmYDw6XSysN/qVG1Mb2r8C8HGnI5mPqytW3XIdK nz8LSW7kwcZ2NcJr9JxhBlfzqrId3COV0mHmgUod5Bf27UAG8ndKIkADI7lAQTq1g3sr MdAu461gfiZTls7EpXNUbkXYGzcQXNePGejakLCC1e+miuPIMv+azNZIYOvJC5JVEOxX VaQmcrAhMKFFJMDt4D4DvAJKz7MgZgU8hiHM4Jp8iLXFRiiZCk3ReV73BeNy8V1FW5zS XrYg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ed9-20020a056402294900b0048c1bb5d23bsi14429186edb.67.2023.01.19.00.22.03; Thu, 19 Jan 2023 00:22:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230082AbjASH7P (ORCPT + 99 others); Thu, 19 Jan 2023 02:59:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjASH7K (ORCPT ); Thu, 19 Jan 2023 02:59:10 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 277FD53B3E for ; Wed, 18 Jan 2023 23:59:05 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4NyFPy6kByz501St; Thu, 19 Jan 2023 15:59:02 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 30J7wxKL050322; Thu, 19 Jan 2023 15:58:59 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Thu, 19 Jan 2023 15:59:01 +0800 (CST) Date: Thu, 19 Jan 2023 15:59:01 +0800 (CST) X-Zmail-TransId: 2af963c8f8452c6ade3a X-Mailer: Zmail v1.0 Message-ID: <202301191559014087173@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH=5D_drm=3A_bridge=3A_Use_devm=5Fplatform=5Fget=5F?= =?utf-8?q?and=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 30J7wxKL050322 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63C8F846.001/4NyFPy6kByz501St X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR,UNPARSEABLE_RELAY 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755438432798850632?= X-GMAIL-MSGID: =?utf-8?q?1755438432798850632?= From: ye xingchen Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen Reviewed-by: Brian Norris --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index df9370e0ff23..50f092b316d0 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1686,7 +1686,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data) { struct platform_device *pdev = to_platform_device(dev); struct analogix_dp_device *dp; - struct resource *res; unsigned int irq_flags; int ret; @@ -1740,9 +1739,7 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data) clk_prepare_enable(dp->clock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - dp->reg_base = devm_ioremap_resource(&pdev->dev, res); + dp->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(dp->reg_base)) { ret = PTR_ERR(dp->reg_base); goto err_disable_clk;