From patchwork Tue Nov 22 01:45:58 2022 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: 24112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1950550wrr; Mon, 21 Nov 2022 18:02:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf7aA6RQ6WOJMXE1InTeF80gOaP7WjSKadRG65kTcO+/wFXhejclMmd8C6yjfjYntorpRKHa X-Received: by 2002:a17:90a:ca13:b0:218:cf25:1e7a with SMTP id x19-20020a17090aca1300b00218cf251e7amr564720pjt.29.1669082548888; Mon, 21 Nov 2022 18:02:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669082548; cv=none; d=google.com; s=arc-20160816; b=yDWOLv9C4I/NMJOMjjRxNhKKrEpL5sT9XVB+Q8Vsglym4Tu6uPb7XhDeKYXFttG/4T +rtfvHauYbExCqok4aAsYAmZpAo83JrVyAhsyvRzA0rZu1iNE6mtoHe/FPNhbPuimwrU +axQuTrwswfs0evjrW8smMRWCU7tcdwbk3k4W95wr3ewaywK0W32KCHoGdyViusocjtt g7m619MIFvtodyWfP7YPqOOE2lL/d72Hj3MvTQyxUSE2WamOlgsvcT4zOfnwcGRy70wN /SIIyo+DSDW6aFFPkvTMEzWVY7JcHCF9dRPbN2pNchnieWJKSC1NNFdKbQkQDXgwbvE3 /zFg== 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=eCbmavw4IGMzoUO/RSYU8ZInz3Fh9WypDbRlhQst2LQ=; b=CBtJwGmQ5A8Jgk3vs0UQJqremnDaGBnVstDADNbPGEYUkRBQ8DnHuUpsM3s9dmD/Oo tC7I118GO+p+oqBHef7dr6BDqcVUD7pFmzliN+URMMDigD5FfECJWUNsk0uc8zlfEUuH Nl8/2f93mCxJtj9VMogltnmThVQjGiGz68qVAHF1Pe2xEHDaOGMRk0Gd7boc3x4peEE9 Ez9Q8a1Dj97uTWLgh97Ej8Nw9Fz39VeN/nJSoSQ5zoUlQJE5JDwoqhBsSDcKXUdxvDQh O3bfHFuV80wAExWIHneTD94dUqXb5mhFEtS3UdEpg30khaUnQmINuZAc98CA0pXioK6H gOFw== 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 c3-20020a17090a558300b00213cdfa8abasi10648247pji.173.2022.11.21.18.02.04; Mon, 21 Nov 2022 18:02:28 -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 S232362AbiKVBqO (ORCPT + 99 others); Mon, 21 Nov 2022 20:46:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231717AbiKVBqL (ORCPT ); Mon, 21 Nov 2022 20:46:11 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADE84C606D for ; Mon, 21 Nov 2022 17:46:10 -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 4NGRtT1n75z4y0vG; Tue, 22 Nov 2022 09:46:09 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AM1jvWT038685; Tue, 22 Nov 2022 09:45:58 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Tue, 22 Nov 2022 09:45:58 +0800 (CST) Date: Tue, 22 Nov 2022 09:45:58 +0800 (CST) X-Zmail-TransId: 2afa637c29d64fd0c401 X-Mailer: Zmail v1.0 Message-ID: <202211220945587336502@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , Subject: =?utf-8?b?W1BBVENIXSBtZmQ6IHVzZSBkZXZtX3BsYXRmb3JtX2dldF9hbmRfaW9y?= =?utf-8?b?ZW1hcF9yZXNvdXJjZSgp?= X-MAIL: mse-fl2.zte.com.cn 2AM1jvWT038685 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 637C29E1.000 by FangMail milter! X-FangMail-Envelope: 1669081569/4NGRtT1n75z4y0vG/637C29E1.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 637C29E1.000/4NGRtT1n75z4y0vG X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,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?1750159902934767745?= X-GMAIL-MSGID: =?utf-8?q?1750159902934767745?= From: Minghao Chi 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: Minghao Chi Signed-off-by: ye xingchen --- drivers/mfd/stm32-lptimer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/stm32-lptimer.c b/drivers/mfd/stm32-lptimer.c index 746e51a17cc8..fa322f4412c8 100644 --- a/drivers/mfd/stm32-lptimer.c +++ b/drivers/mfd/stm32-lptimer.c @@ -52,7 +52,6 @@ static int stm32_lptimer_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct stm32_lptimer *ddata; - struct resource *res; void __iomem *mmio; int ret; @@ -60,8 +59,7 @@ static int stm32_lptimer_probe(struct platform_device *pdev) if (!ddata) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mmio = devm_ioremap_resource(dev, res); + mmio = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(mmio)) return PTR_ERR(mmio);