Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5186124rwb; Mon, 21 Nov 2022 18:17:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf543RHk4i8ESTR9PNSDSC2xNTP+M241vqD7giVJIr5sTMHefAXAqHyT+XhWprikjAnyLJfT X-Received: by 2002:a17:90b:154e:b0:216:bd62:8e69 with SMTP id ig14-20020a17090b154e00b00216bd628e69mr28415457pjb.205.1669083421720; Mon, 21 Nov 2022 18:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669083421; cv=none; d=google.com; s=arc-20160816; b=pnvSJ6MoLaS4yfqdOJRaUONW+jP8fTfrab/NuJFYbXDUg9IfBYkDVAb8ZB/qGQeEgb ziOZ+btwCmjLGAIPFRyvntdcQrOtT/p9mqugxoVDgdeY6FO83ZIHINXYCppGi6XPE0jN N5JU2CiXFM07bcMa/nbyywo7baDhvoIDZFdFmABm+d/6xNm0itDgmG0L+eSh1j8xQlYI SlYaPYNE9SSMhTYMtxXF83enjlTGzT6t2PaKGWKd8sWtFzCwIJHbksc4PFBifcHjlngE Fmb+cFi3OHVSsrXB59fs1/gmFYM9QXLYiA6aB4TplJZKIJ9+cJuCwAjrcHcNSJBye+WL fIcQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a170902eb9100b0017a0f71990dsi12637185plg.141.2022.11.21.18.16.48; Mon, 21 Nov 2022 18:17:01 -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 + 91 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?W1BBVENIXSBtZmQ6IHVzZSBkZXZtX3BsYXRmb3JtX2dldF9hbmRfaW9yZW1hcF9yZXNvdXJjZSgp?= Content-Type: text/plain; charset="UTF-8" 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 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); -- 2.25.1