From patchwork Tue Jul 4 09:58:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 115681 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1105942vqx; Tue, 4 Jul 2023 03:11:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6SreOUFj+BwpTsLknB9GSo5fSfPgr9YMvLvleVVGiNou0Vi3JiqhiJ2SD4EhwBfOBQBGM4 X-Received: by 2002:a05:6808:1295:b0:3a1:e282:8405 with SMTP id a21-20020a056808129500b003a1e2828405mr16099819oiw.13.1688465479852; Tue, 04 Jul 2023 03:11:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688465479; cv=pass; d=google.com; s=arc-20160816; b=SZ/20CStdmfyETIZ6Oq44edYxe9c4bHXkiZ37Yqn3IG0yj+l9bT0es+Y22UOf1qwCh 3uPTNLaxZB00cihl70cXZSEyiepl1wFz3DInhNOx70dehapkTO41F1utMz03yOVPAn2S hI8YEy8naoedaN7zQRYpWCo6TBfvahob7dk2/NeWOi5dRHbQk5D0FaHl0cr3gWmDzf/E 7bFqoxcank7axiQN1YGpDnlEBtKuUsa7+KtLDZAC+SpRmNw+ZY9lA0rndwGqct2ERsVH 1p5abnq9Pd8RDLl7/+ANnbdpI3cd1xOxbg33UHwZVscUGx39JBrdaDdsN9cSrxT5oxBp uzSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=GBZzgY4ZLSk52/A2tFG4VXwsbPZwxMCFSqQiHZgy41E=; fh=kmDcvSh8uThBAR68ZHrAaq9QBwJh2iMdzk4lD06AcfM=; b=rZHp+m0juEt6mYwmeVmGJcjJzTkrIq6kG5nV9IPJu4Q/frPMQganSCyBqM5PJRNMV5 0cAhdcdyEbIrUeZl5o2h0kO04OsmBZqEoyYQs4DmqK8gYKuY5R1gPP7N1X4xGQS8qoCe WdRZwv8/qiV5d0yCUfxq7MYN8JfbNy+BWCbg4kxGYDXZWef3Xdae/Z/S7sAKQccIQl2w jDPVVnWhgd8n+IYFuZCXQtgvV1h9lQtE9wXc79TjJ+FBnSncy0rGdwjk2EwuENj71/qZ 0HRoBBV3cHquEgTEmfDeS9AQpmeITtAhyk7AenptN3wzBm40slQtYr7Qa40LHZEUnv0B O/DA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZnuLyhNG; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y193-20020a638aca000000b0055b52ba0a00si10284140pgd.48.2023.07.04.03.11.02; Tue, 04 Jul 2023 03:11:19 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZnuLyhNG; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbjGDJ6c (ORCPT + 99 others); Tue, 4 Jul 2023 05:58:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231358AbjGDJ6a (ORCPT ); Tue, 4 Jul 2023 05:58:30 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2121.outbound.protection.outlook.com [40.107.255.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A0F4D8; Tue, 4 Jul 2023 02:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQEW+WGM9MwdR8oIWTNR7Y21O9vOz6/EDHO9Um2KQ2LdktOZtug+5L/eCKaTx/5nczAg4pjxiB6Q4ZcvulPPdx3Ev12MKkm2urbZQ14xDoZFOX8D/WYV7F03kQ2TNkjkKZl54QZWyso9QKt/DupZpRzvZKssB4LXnb/8RDDySjzUX2N5FwEup1IcTVCoTwSoiLFPzK+2H3jQBNBDST/eK0LxI8bbQN79ecYO+g+5zgeIgGPJhFOaGoV21btaWtJq6Od29RGh2zju4ko4ornKH4UaFmk+/Bpipz0r1kZdl85FHN4DtUHy4lmeeDa3SuaWTppzYnqS8rbMOH9BYIr1Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GBZzgY4ZLSk52/A2tFG4VXwsbPZwxMCFSqQiHZgy41E=; b=lWWqNXBYladuW3mxsM5wQNsW9mUwdQzUj+CCVyFy0XuoddmL4p569nNhNWXldfuVbKcUISMvZBlTrpZtMQU3GIF+zlZYYYUhvXjVvYZ9D9yg8DzyZIvpg2SAjPWAcIYex2Zmwaf03Vo6jgN7te0XQx32Wo/oi1mhUWfRXvskip/AcO2XK7ZLGkCl6Bebadjj3tN1vH8qZ5jKTWpm4G9Cobw8S8j+PbiiOsJwEPzUtbY/DQtkCO5X/71qM4SvisDeMNX23sbfx6+20GTpPch0cdn51ySmbEFh4WuvBszaXnug641D6ZJYQUEXljPwcaQn0rrPp0DyelDzAqDWX9tVRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GBZzgY4ZLSk52/A2tFG4VXwsbPZwxMCFSqQiHZgy41E=; b=ZnuLyhNG7tSE+ao/p4KAAVB0u/6fZ1NoSwYu7I6K0M0jreUefTUbt+Y3p/vTBn+65oKY1oYyYhYzPoDC+VnxDhx8yTiCDiVAx41RExTjb95qbmGftxeUZpDYdjaRTj7L0whSHOq/aVxIeU+G1rPGkdvft+rVJggdqrSq6S2s56R+ZxbKD70zcm9cxYjGqCM9XJY6O3ekHDF87vcQ2DnDmk9HBWJ/VSlRt9HUAfuISmKhzPqtl1kfnto1CTCWxMYNn29ZlBFZr8bJVQfzoWM8nDX8xk3UX4+KSW0aT0WzUxUYDk1Grx3Ag2/JDyMcDmaFaylhouNv7b74keHVE+ENkg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5501.apcprd06.prod.outlook.com (2603:1096:101:a1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Tue, 4 Jul 2023 09:58:26 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6544.024; Tue, 4 Jul 2023 09:58:25 +0000 From: Yangtao Li To: Jonathan Cameron , Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: adc: stm32-adc: Use devm_platform_get_and_ioremap_resource() Date: Tue, 4 Jul 2023 17:58:08 +0800 Message-Id: <20230704095808.33780-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR06CA0224.apcprd06.prod.outlook.com (2603:1096:4:68::32) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5501:EE_ X-MS-Office365-Filtering-Correlation-Id: 5aefb0a6-c523-446c-6e88-08db7c7535b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ac7TBf4EJuLC7I15Zq9VjFXmQJB8+Gi1P0xNwvVakhTfDfgp7xlDAv8+onwFW8RyMbZS+Lp3SRQbhO/2elz4o4jmAXcOcDmwUZ+FtAD6xR4gu36J7AczN86uEG5rog+MOPqnfDH7CpAOgSEPt7rEy1QmENkmpqP1fM2N8jZIhbC9Orjq4AKUHLqGRhLlMWAJWYkueAlrIZmtOf8kR/hFq7vE3l/p+iqWX9IISK2m0uk6GlVrrLX1Zzg3to9tV3p87nbCVK9uAmxyieYMik0Spxvzh5GiJIPnod2pgW4EN+66YsPPmnrPs1tdnNbsQMOQ6alMiLoOicFKS88x8LIfmlp4zZYcEJNs32FW2DTizha5QYGjAD0g4qzpmnxdmYuHJcadDF/L8zOWlDYz5cueom6OTOp/WMrj+GLOLGMwO+pNWQHHuUrA6buB8evQzDQpf/xpO56ru514CX8S6ldEQyuDMour2ccXheasQU4yAFEG3uLoGI+3F4RFEdv3WUc5vYj+dwnniOZIFFEYVgG+qxXD8/SUwUuZalyIrYdoxeZZjTSKp5meoGQ4nN+hd+1ex8xoES3ex2Is14QrYaS7b0P337bUOpq7piB92zjwj35wmOPBUKvJffBRTl+V0BSp X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(39860400002)(366004)(346002)(376002)(451199021)(66556008)(66946007)(4326008)(36756003)(66476007)(478600001)(316002)(2906002)(8676002)(8936002)(5660300002)(41300700001)(86362001)(6486002)(6512007)(110136005)(38350700002)(52116002)(4744005)(38100700002)(6666004)(1076003)(6506007)(26005)(186003)(2616005)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vXQesqVsfDY/J6EiK1YkyqRCougVdlcc7d9O0lKOA+STIFBJOOs6cLFPjkADkEjI7/oqJbYlWGpqxWvviA6V0cOb6Wt7Oyhg6fGZN/BNeN6X5mSC6fxmZGovcwVNrsuHXjXujiZQEtXwWssN9Pt4dr/bLZS8XP/qMA3C8fkeSqBeG+9ZFzi13h47SL8PmMBR+/FHowuH5QpUXhcRm8jSzsAyo7wPZUkry9aHrnP10/jMtqx71A772iWtUH1nzSpM6Xi7+sBCOFD6r2ZWZ2c5pH+P47TZcUB5tLV7ZumzvNk4jSdLDj/dYrzO22MBk44Cpn6w4ucvk3GnT0ePZ1uop+vjuWazLN4vUxrIjYhQMSs77muhgSPgdScNZICWPoKOqlWxA6rq9Le/rThUVhSl2r6dYJMYrpb/nyQaqrqs1N2trvRbWJgK1f/uCLdY0o4F1C8ElV/tN3mD8roxBXfSLvyk13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euWjADAH97rJMFTY/SqaEVhVizdYALrvWhjOc/3ZK X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5aefb0a6-c523-446c-6e88-08db7c7535b3 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2023 09:58:25.9089 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ixFlvSPJ2mj+lwpMA0NoDNTIFRuWgsrdNvJjI2TVezzlh89emnQVnvI7zrA1HklJrmNUDUO31LYFkYfW1tKc6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5501 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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?1770484379031517827?= X-GMAIL-MSGID: =?utf-8?q?1770484379031517827?= 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: Yangtao Li --- drivers/iio/adc/stm32-adc-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c index 48f02dcc81c1..99062a0ba1d9 100644 --- a/drivers/iio/adc/stm32-adc-core.c +++ b/drivers/iio/adc/stm32-adc-core.c @@ -723,8 +723,7 @@ static int stm32_adc_probe(struct platform_device *pdev) priv->nb_adc_max = priv->cfg->num_adcs; spin_lock_init(&priv->common.lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->common.base = devm_ioremap_resource(&pdev->dev, res); + priv->common.base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->common.base)) return PTR_ERR(priv->common.base); priv->common.phys_base = res->start;