From patchwork Tue Jul 4 13:03:04 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: 699155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EFBDEB64DA for ; Tue, 4 Jul 2023 13:03:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229610AbjGDND2 (ORCPT ); Tue, 4 Jul 2023 09:03:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230486AbjGDND0 (ORCPT ); Tue, 4 Jul 2023 09:03:26 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2127.outbound.protection.outlook.com [40.107.215.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0051C10CE; Tue, 4 Jul 2023 06:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J6EbQR1Nt6C2E5SM0AUvk2HtvPFMsSip3SYUPjxc2z1bCA/qJG4sXlehFope27MpLmfCEVjCTIxf89QHfQyCTO2N8kYFrSevAN7aonwRD0lFCFXSB4hHnlIraKUDozn0r3KWfP6ewwfZmX9ClzaKMinWLL6ZvPLPgAPK0tDloGykIEovKX05NKILk5MgYRggxsQUPBKe/GEZU8R/E4YG3R1EbScLl3RKnnJgTVcqTphq06IqLZqQw0OXq6EpWKrUj8xb+G/N9WezCc8o9/s+RSCZGE1o0xz6YKeynHZPtboIonsbb+wTOgQt8Z0SuP/MIliC/rxj8jZCIZZUI08Zwg== 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=HZoaJ2ss0Ouf7T3wqe4Rjxy/uV5EQbGwn8UrA19tXs8=; b=LmdtPF50F31MXR97xUh/ZixNdW1G4Q+0iYwZ8gPTIeTNv5vZssyATlOod0JL2hdbjj6W3mxPm4qMRpsSOUOTofcqRFwQwgx1JsSA2GK6kdDOSNUXBnU4SdBA/IzJRgVygJIYIe02M8dQKTpTMyXLjY0lT5G+GpayAgdlta/byYBSGuvs5ZPtg0vd0RqXWAjXf4NzfWO7+NPwaKIUUqLsf8L8TLFTOYdPU9RxYdyC2UVulNTN0yOA0EVOZ5I6tnUlAsjv/bCVnFDSlETGtvXAC4Xd7b7cWOhvUebRCCv4MvaROXygrdLXHHHUz696CrQwwSxI0DyXrOBXPpnnth0+pQ== 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=HZoaJ2ss0Ouf7T3wqe4Rjxy/uV5EQbGwn8UrA19tXs8=; b=Ji/vCb7dRoqbjOqZ2JFV4rQXrF6p8CiVosPJ6TLZxqIco9ULRpwiBbdyRPwBtKFoKj/0iJCT5HheE5LiF7VVUR+ySNpO+tGbhUsknh1rk22dfxppUvli8d44mnM3F0Colf5pdEW7ViXdDwkpZGgD7eGXfI6KgcBGtG52Qscl/1wcPekkYqV7QtX5j3rAn+OpY5hPlyCJuzOd1LtRugH6uFo3Vul+p8io2i1+kgdqm9Es2GFKvfii8l/MASLnOFI6RBvTAtAYLlkhqpvvQ9xuq3lWk5ICEXSxBg6IiD1tO6dgiypZtuy4sPYAamnQcYD+wmxku3RlgWevbcwgbRfa8Q== 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 SEZPR06MB6198.apcprd06.prod.outlook.com (2603:1096:101:f1::14) 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 13:03:21 +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 13:03:20 +0000 From: Yangtao Li To: Claudiu Beznea , Sebastian Reichel , Nicolas Ferre , Alexandre Belloni Cc: Yangtao Li , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] power: reset: at91-sama5d2_shdwc: Convert to devm_platform_ioremap_resource() Date: Tue, 4 Jul 2023 21:03:04 +0800 Message-Id: <20230704130309.16444-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230704130309.16444-1-frank.li@vivo.com> References: <20230704130309.16444-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0209.apcprd04.prod.outlook.com (2603:1096:4:187::12) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6198:EE_ X-MS-Office365-Filtering-Correlation-Id: 12262d86-2072-4c24-8d7c-08db7c8f0ac6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: utuwIoNLW17DGW2AwOK57mwTP02sTCgS1ZK9l4+vpQo3IAZTy89Cno2YHFw0aSJH2PzNyU73G9qV2UMBzTEXpc6dC36Fa/fMidn18BFJW9cYSv2SmJWu6KAZ4/YdLAuJUI48BSD8oYbuz/rEpIwR7/C8fekIw1wHy7pmOEewW2jrvBzV5bIrLx1rmN7HOyRlP6ZzvPqpQVYNQ/qIB557GPL8rWKxlzV1659aFHvSWzThDEBZwVJ85+/5dk0bItJT1Q5GBPYlWmbA59eQMNl8Mlw/RmYW/KUiE9rYjYWjqgdcw4rjHlZYorXfwM2KFfkI/A2PHVFdNwqe+UclH6+0EZXvrGfeEBTRAabbapalJSw7a6lPi65pjtvSCyGp+S7NhbAhNLftFVS7lMK6LvoBC34eWAO45KGUPbGsZvsF8o+uAaYcZOiPm7s+1KIAh9qo9aPoL6Xi/dAKw8yxupl2Olv4ZX19+xQrWwWhRFMz1TRiNjbpDLmwBxKrAeK3NoZeG5MBqTEfiOMZYVmBYm04geogQ6Qy0wBaJVo/Gc3CXPNx4p4N/H8eB4AdbCTwWdfTIE5cQ22O3NLhJy4qHkODYs6V84RM1xW/GHkqOXItmKjI9b6aFJst6t41bqKf/ktL 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)(39850400004)(366004)(346002)(376002)(451199021)(66556008)(66946007)(4326008)(36756003)(66476007)(478600001)(316002)(2906002)(8676002)(8936002)(5660300002)(41300700001)(86362001)(6486002)(6512007)(110136005)(38350700002)(52116002)(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: GwXYccp8+7i90zDblaGW3Bh+Vnxo3W3fU3tsgLztDXhlTuDkzpf+YXU10ahQlSqDw/6Ooe4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/81w+XjGZfj6vT489NSOgsRIHPOTY8zFi8nL5lVZsXeaXrlhRpn2llo57H5zv0cXzOn2IyvgRCyiNxzlOCgiwSdZS8w7upVBPFLJh2Q/P0LW8XIIg9x+L8NCJhP40S91P4AdBDbNpz4Z6tWjyudaHf7nqfXMLGiwnj1OjeNoPhQrlbCdO9OO88s3hgbkULVh87mD+rTfdgCiZL1pJeAZAkxeEahI2HbNuwiUjcR8uVIVRKqXql5yUUFa+pSbsCwMTUfvbAoF7rnV6NZrFSZpUM4x0fpVsWTo3eeHGrhKnJRd2REXOPqHOfThHhfm1SiMcxwUCFyk0QC5A2hk27szS4pxtHo0P5+6A59MAfqku9pj6IHvsuLieq7wHepqBDvRGsypeK4XO1MymFz2eNuLBrqewFrqsIkx2iw+HmbvIG1f7B+CkmnQfVVOxkV7 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12262d86-2072-4c24-8d7c-08db7c8f0ac6 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2023 13:03:20.8291 (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: e7oqBqYkiUvD0T283Wlvh3098govvXz5NLvuUsjAyjPVIAbV0cP9NsJyjUyytkTMYWLjFgpGYZ/lNTX7ZGPCTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6198 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/power/reset/at91-sama5d2_shdwc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c index d8ecffe72f16..e76b102b57b1 100644 --- a/drivers/power/reset/at91-sama5d2_shdwc.c +++ b/drivers/power/reset/at91-sama5d2_shdwc.c @@ -331,7 +331,6 @@ static const struct of_device_id at91_pmc_ids[] = { static int __init at91_shdwc_probe(struct platform_device *pdev) { - struct resource *res; const struct of_device_id *match; struct device_node *np; u32 ddr_type; @@ -349,8 +348,7 @@ static int __init at91_shdwc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, at91_shdwc); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - at91_shdwc->shdwc_base = devm_ioremap_resource(&pdev->dev, res); + at91_shdwc->shdwc_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(at91_shdwc->shdwc_base)) return PTR_ERR(at91_shdwc->shdwc_base);