From patchwork Wed Feb 8 07:40:13 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: 54249 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3315707wrn; Tue, 7 Feb 2023 23:42:07 -0800 (PST) X-Google-Smtp-Source: AK7set8juAmNhvI6oHBV4mmOusm/rkbR930C94XYyeG440iXBjDAgNIEM+gT4rTVIG9fJuo/Udfl X-Received: by 2002:a17:906:3686:b0:8a4:e0a2:e774 with SMTP id a6-20020a170906368600b008a4e0a2e774mr6820196ejc.29.1675842127004; Tue, 07 Feb 2023 23:42:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675842126; cv=none; d=google.com; s=arc-20160816; b=CHPAeqTn8J29kqoKVRTOMw8ulYQ18pcOI6rGGbb39jBUnvz1ktM3a10VuLRffMmwKa nO/GI60HluMMP0v88R2nZ0t2eaSZB2JM3WWXhNDY2F6JeKFGq0P9z/OOwmDk1Coi5YEC QIF20b24dz6n/wvmNrN2xjP2IUZXqPW8OKoWPLjVlL05uBdqJ7LiEYwmOl3ufM2/frp8 8EAncYf+DNbxFVA5d/8zRZ8K4Fvqu5FOlDUBCuxsrNtAYwweM7DOuH9lp/Ua2tDKBFEz stZNrbOZJUZUTIhLO4SURkP47XAhkXldHsw8t+TvsHO0IKKgv6mc+qpPOEqD5UAanypm ZZeA== 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=Sl8VsW4+ShOj+rkgj1CNPNYzfO/oaVyYSXKO09m1hEY=; b=C6tUPSQ260ZT/TLRuf8KeWElQJBgWf33T9mi3Mod2SC0cIF7tlmi8gMMJkWy4kV72P BTKJxNxLVB8uHJ+xx0PsW+UUmcqqBifo0bFqbYjusE8Q0xwoVVLbl+9l1Mrm7Kf9RyTX eZOjGu05LuI04BG2gBbHpHYHHzRltnRLHBJTdiA6Zz0n113rvXQfm81MJlrU3cG92Vv9 lqdHDOYEqkGDb/1Wl/cFUpKAmhHJVURcul52YxXzseMdwKRAzzJpX+VM7rGbGXXVs+me PCCmVOIdXqRC6MS4n51/EiSbRchP5QBLuUm7Kt5ATd2QswJF7RvqH/0Za/DSPyJoFCY7 aSRA== 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 cm4-20020a170907938400b0088f92a0d234si14424818ejc.586.2023.02.07.23.41.44; Tue, 07 Feb 2023 23:42:06 -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 S231206AbjBHHk0 (ORCPT + 99 others); Wed, 8 Feb 2023 02:40:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231175AbjBHHkZ (ORCPT ); Wed, 8 Feb 2023 02:40:25 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7EDE19F; Tue, 7 Feb 2023 23:40:23 -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 mxhk.zte.com.cn (FangMail) with ESMTPS id 4PBX3B2mTQz6FK2g; Wed, 8 Feb 2023 15:40:22 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.97.17]) by mse-fl2.zte.com.cn with SMTP id 3187eB3v039174; Wed, 8 Feb 2023 15:40:11 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 8 Feb 2023 15:40:13 +0800 (CST) Date: Wed, 8 Feb 2023 15:40:13 +0800 (CST) X-Zmail-TransId: 2af963e351ddfffffffff5a5518b X-Mailer: Zmail v1.0 Message-ID: <202302081540136870117@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , Subject: =?utf-8?q?=5BPATCH=5D_clk=3A_bm1880=3A_use_devm=5Fplatform=5Fget=5F?= =?utf-8?q?and=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 3187eB3v039174 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63E351E6.000 by FangMail milter! X-FangMail-Envelope: 1675842022/4PBX3B2mTQz6FK2g/63E351E6.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E351E6.000/4PBX3B2mTQz6FK2g 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?1757247834435301383?= X-GMAIL-MSGID: =?utf-8?q?1757247834435301383?= 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 --- drivers/clk/clk-bm1880.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk-bm1880.c b/drivers/clk/clk-bm1880.c index fad78a22218e..1013be67254b 100644 --- a/drivers/clk/clk-bm1880.c +++ b/drivers/clk/clk-bm1880.c @@ -876,16 +876,13 @@ static int bm1880_clk_probe(struct platform_device *pdev) struct bm1880_clock_data *clk_data; void __iomem *pll_base, *sys_base; struct device *dev = &pdev->dev; - struct resource *res; int num_clks, i; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pll_base = devm_ioremap_resource(&pdev->dev, res); + pll_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(pll_base)) return PTR_ERR(pll_base); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - sys_base = devm_ioremap_resource(&pdev->dev, res); + sys_base = devm_platform_get_and_ioremap_resource(pdev, 1, NULL); if (IS_ERR(sys_base)) return PTR_ERR(sys_base);