From patchwork Wed Feb 15 09:09:31 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: 57434 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp87754wrn; Wed, 15 Feb 2023 01:18:28 -0800 (PST) X-Google-Smtp-Source: AK7set9AcHjYOP1T5by4JepQ64jBvEVYEXpbIEFnq/Of0C4BJddLc4bn3DoWegY0m0UszuxVFtCJ X-Received: by 2002:a17:906:a3d6:b0:88d:33fe:3306 with SMTP id ca22-20020a170906a3d600b0088d33fe3306mr1150046ejb.31.1676452708689; Wed, 15 Feb 2023 01:18:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676452708; cv=none; d=google.com; s=arc-20160816; b=irMCK1LJXs7EoOlhuSF+3mz3JDvnUj+YTQ/uGT5LStUwPkJPQi6yNSjQ620LhvaQCB fTJNpF21l0YpVLjGkjmd70Fyhvx4BkfISWOCJo00oW/1ghUTIzsm49ztYYB3ZTpwFlv8 /8E2pqikxOJF5Hr0iV9vvPl+pR8GZeMezLvXtKErFkQjxCXNmuBqGlmL737XTtdanH+9 7ZLQJjlc9hmkKTQD4APK0CrCv7/kDgfViR2u+0IrXS5KaeZOWtMPEDA0R5o+gPK6+Ta/ 13tJPPgENeIrjZ4bJPWW8qEaebbbikGROQmIIHtfaTi4RTEPQYlqd9OEofzTVd1Shs/c fXBw== 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=q7ibYfIcL3G3XH0w8H8MKhpguxNR8sgJC2IUw3bceX4=; b=MYwOe06nBll3LaZOYJ1Cn6Ljt20qozWCtJ2R/O+Y150uECSwtBuAbcA/+bm8kLNced f7XY92QWDcg+sIub6lHRXtz6Ee98FgDiB8pfISgSjbfySXsWtNdr4lvjwYuBSWLea6pE upLY1NweHo8Iasi4HJ8ZjDaJ+gXKblgqFUBRJlSONMsFvOgxfnEjXsmP9O/Vp+lInTc9 OLamMxVhiR//iVRpac73JQPiB7k6xsFQ1BRWffQqFl4KIAlP6gSvsVrpBSg3ESzIT2XD eg8cqPgdZqgEj3oUjqCQxT+mAHfnrR9lGSpUDsvBZ6R2Cu+LxAhmZRHIExweUp93ijxc Z50Q== 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 n30-20020a17090673de00b0087bd3f0b97asi21538442ejl.637.2023.02.15.01.18.05; Wed, 15 Feb 2023 01:18: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 S233420AbjBOJKA (ORCPT + 99 others); Wed, 15 Feb 2023 04:10:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233772AbjBOJJ4 (ORCPT ); Wed, 15 Feb 2023 04:09:56 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8224336FDA for ; Wed, 15 Feb 2023 01:09:43 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (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 4PGsj20TMwz501Qn; Wed, 15 Feb 2023 17:09:42 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.97.17]) by mse-fl1.zte.com.cn with SMTP id 31F99SAv099156; Wed, 15 Feb 2023 17:09:28 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 15 Feb 2023 17:09:31 +0800 (CST) Date: Wed, 15 Feb 2023 17:09:31 +0800 (CST) X-Zmail-TransId: 2af963eca14bffffffff88a92eb5 X-Mailer: Zmail v1.0 Message-ID: <202302151709312778128@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , Subject: =?utf-8?q?=5BPATCH=5D_reset=3A_meson=3A_Use_devm=5Fplatform=5Fget?= =?utf-8?q?=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl1.zte.com.cn 31F99SAv099156 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63ECA156.000/4PGsj20TMwz501Qn 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?1757888075495781761?= X-GMAIL-MSGID: =?utf-8?q?1757888075495781761?= 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/reset/reset-meson.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c index 26dc54778615..5336da695cc6 100644 --- a/drivers/reset/reset-meson.c +++ b/drivers/reset/reset-meson.c @@ -116,14 +116,12 @@ MODULE_DEVICE_TABLE(of, meson_reset_dt_ids); static int meson_reset_probe(struct platform_device *pdev) { struct meson_reset *data; - struct resource *res; data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); if (!data) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->reg_base = devm_ioremap_resource(&pdev->dev, res); + data->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(data->reg_base)) return PTR_ERR(data->reg_base);