From patchwork Wed Jul 5 12:26:39 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: 116110 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1834457vqx; Wed, 5 Jul 2023 05:32:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfRShKULoArtUDhrYGdhC7aq6fT7aLekPpv0JCTNWwRqkHeqJFELMdEFk0jROit6rBQhOs X-Received: by 2002:a05:6a20:7d82:b0:12e:49f3:88d4 with SMTP id v2-20020a056a207d8200b0012e49f388d4mr10330349pzj.1.1688560378136; Wed, 05 Jul 2023 05:32:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688560378; cv=pass; d=google.com; s=arc-20160816; b=MXIKnmw0LGYw+YR520kIIESkavudF7Ewk2HN08S0TUd02pGtNX596TJ5sA4Tkbm+4V qDSJHLWnkyrvBPIg7ncJEMVOVIPAVlVLjjWb3zrGLETQ178vE8Alq4YqWXy34CGeoLOF MzZtIp1Xcp7K8VDxFM/wY2cccDkuyFAv4AbPJXcnrWwV0OHTBaUXt8PACL6XifnXHr0U af5PvcMuSI83a4bqaxtv/VJUrZvW0fZfpsAEqIZVcdUhHo8Dac/Wds7+KWlrmCBiWVuj 5D0Xnjd4RPuYaVXbhAXsTTjtbQ48npgHEL3ZH/ZA5e2IlqFeFgVVSAEnJN7Zkau4SRSJ jiyQ== 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=TFxHYJR/4nXa4lOf8EylzoBGBV7GiyifWeeoPOewGLM=; fh=JXlW5duNIaxp5RJ86kbZFwU6Iw1TEvJB0Yeturn7zGE=; b=ar5CNtTeIyD21sfsyc+Li2/ZY6RJkuP1ZxlzbuKhqb2rSbAx9UbWdagnEMxSuEmXvS P7NW29JZW8Vvfghrsj3DjMVY9ImgR/A1rQHS19n2AWaRYBg6b9DndOw0cXgbAoa586QO hVvKcK6280iYgeIq5h6o7sbWcf7s1uBBU0emF7w8s+8+IHP56yQp4HZAAgJ1o48pG7oY qMWk+09Ww5T1Ercuq7aVd9wSstarLguGvxU36uBQuP4Sv7ka3c8FW1a2iJwfKScsElEH bTQsq6IGnLZJrgTopnVS9OiBuXgZSFOA9hG8nxs3ZjCGGTDqNV7P+PkZqwPCGbnfI0G6 0l7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NpqictLg; 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 x184-20020a6386c1000000b0054fd504e80asi5893650pgd.542.2023.07.05.05.32.44; Wed, 05 Jul 2023 05:32:58 -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=NpqictLg; 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 S231404AbjGEM1H (ORCPT + 99 others); Wed, 5 Jul 2023 08:27:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbjGEM1E (ORCPT ); Wed, 5 Jul 2023 08:27:04 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2123.outbound.protection.outlook.com [40.107.117.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 485ECBA for ; Wed, 5 Jul 2023 05:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cNKfpod5AOoUYft88SNNziIXHtT3ruM/RLB9iK07BmtDmtQHsgApTmvrIndYSnrx5GCgivzm09kUPqkpzDFhGbAtyb2L9xKkTjyWsFzIT+PDBMYvNutFZbx7q7gj+/UQsuUqTbZUOfQE0H2BYfU00YAxlaxkbm4lxqwXGrdpolaxAYzHoM384FEp67kmjwAZOlxDQPOa39hBsZgUI3Cdvf8MFXeS8AZ2vMccQfXEjVxJWdR+npVxVdamZWNazAFLH6Rwc92yXErW0KXyoEcy0Z/N619LjHI/1qLpednPMBHsNp5juEe2dGRh+OMb3dT3UMRcl4Ht2yUptfO5fde6lw== 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=TFxHYJR/4nXa4lOf8EylzoBGBV7GiyifWeeoPOewGLM=; b=L6Z19SchOdoPEB/nb994itO4BKpPZbrncuuKtK++9FA8EcGb+Juo4rWfaIrDveEvXq3vmcC/TXVd5bKGUNrPkA42LDhJAB8ExOQLc0h7S3lD5Fo3gGzR2zRQkpUIJFtDFgZw8f0qB8mK+1sdjbv9Etieaj9FBrB0gYmmZ3HnDvybtgw9LhESaJFE71vLDmCgXTvsQbwfzlXW0bd9h1t7xG8kWjfVpHsF5M6id9GM7i/sOJkSgDvaTAeD5i6FQXIvm3edRFuH5T007IvZ4/v8kFEs1ZiHuAIaAFPFknR/IKXtHvm1oXptcnFmb8+eVmqo19gKOs23hjQ6g3q2Gy+L8g== 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=TFxHYJR/4nXa4lOf8EylzoBGBV7GiyifWeeoPOewGLM=; b=NpqictLgMt+dcilr+SAyCxwUTPuelPwHj81JBNe8NRMAjFZmgpW2dF5XwIzDLdhrlzAkGWXtp9BZjmRzZyCaLdZJlBoy9hpbqNTeowB0tl3A93RnjEOaOLvFq1JVKZYWcUSg5iqEhlyG72H0oixpRq4Et2hjEwx80/j8V1qMuIxA6PrFal9ZOhLt1VFxBsj1yohe1Uqy0QT1G9bqINXd5wylr3bXb7Wg379icUD0wN5mYMnrpTcDD11DuFImnCZh6mC0LC6+M5YZ8rGJ6n66rNcjYCe5SMNtdXEb5Gfj4is2fBqVfjYnA80TjhFpk/2Ae8hEp+nPlrT4S8oHpb+Mew== 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 KL1PR0601MB5551.apcprd06.prod.outlook.com (2603:1096:820:c2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 12:26:53 +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.6565.016; Wed, 5 Jul 2023 12:26:53 +0000 From: Yangtao Li To: Nishanth Menon , Santosh Shilimkar Cc: Yangtao Li , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/6] soc: ti: omap-prm: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 20:26:39 +0800 Message-Id: <20230705122644.32236-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI2PR04CA0001.apcprd04.prod.outlook.com (2603:1096:4:197::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_|KL1PR0601MB5551:EE_ X-MS-Office365-Filtering-Correlation-Id: 3905f0a5-50cb-4d9f-524c-08db7d531d53 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F7Jd34oUih0LCrl7mUVGuJ0uQttoFIK8GMjWkjxT/pPJfxfg3s7yhAR6HI+uxVlgXXMNEa+Jl+s55X5tOxoV0UNaX2U6X4zgQpiE9tRAGI+AnYLo/rEd1C5awg03KIdWPCTga1Bh5b9HYyXCjaL1ytnk8s8plQfUIBEU05cz6uzJ97tp/H/h9YBR+LNThvO/PVCl9QEBxUzJ09lTaERV1AAo6HFpRtfEwvXK6279pU+EJFbWslYawi1t9Jhfxkv7SN1+aZpbpkLmfIN1vgbC3LsTOVtbTul8BfeXdlEqb6fPUkHOwm6hwqmxnQ5TLt3cv9XxLrEmCGhWE0olLJMGSJD0QLKZ6uljPtMslpVnONKwnS0tpdGvO1KdUfqvZ8aks9wU90GSMLVVdZwHXUVxe1admTNFqdIwOaYEY9dG5d7Li4A13JchmTFEPZ42vEpn5uLR8y3ung1HCJeCPN/ZcRXPRhy9VkPLk3aLOKUpQnDgSlBRmA6ZajXxZA8T4IoznlKBJVkD6r+VD8Wqb7lMLAUs6kLnkzxPuQvrk0xLIRmcz4MmC/4RWkwwm/R7ePdoEIPH+oIBXQoE27jJyFoYwUIyZf1NBxp6UXRaGqBWjkn5JEgDFYrFseuyhWbJXgou 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)(39860400002)(376002)(136003)(346002)(396003)(366004)(451199021)(5660300002)(8936002)(8676002)(41300700001)(316002)(2906002)(83380400001)(2616005)(66476007)(66556008)(4326008)(66946007)(6506007)(38350700002)(38100700002)(86362001)(186003)(478600001)(26005)(110136005)(6666004)(1076003)(6486002)(52116002)(36756003)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SZu3yCWxqQSDTdAQ3ITPSJhckcbhiMZmIvn+iLR0t0UYD9IWKJWXSpwrV0yE5nT673qg8/ApzberEzE9pJpzBUlNrNosXWjMxpRemDKZYyzpUdQqCIik+iDwklDyit8Jkrruk0LEXz3gBYYVJ7pMDhbPFrCSpUlV+JvzjRfSoi6XoohBYacaoVuDkIztBC+MoaqdpxBGVuUJY1dZD4tMLXQ1KZ18E7yGaJIZr3o5keuaY4IDFNc3FwrrqvROiAqzto3DdBZ5kaWevlEfwgOY3tPbro4mdI+QODG6+X3edoNKAJvMgQB8vKvXhgg2JRZ6W8TJ6+hOangOekPZClUKcAvG49iWdbDdDA1Raz+qdQ9Hp7NyQEOrifzWZksZlp4xZBxhTmT0zSRf1iNgGB/pOunhsF3IPdpz326jmk1fc+GNImhGD95QnLRZpChfSMVQGlH6e550SppLpYUSYLEr0oXjEOPDTLx5hnxjrrai03DfFcUA+TXS8oKWjDZaiweV6XYhmpkwG6nLteAPgx3imaj4tKj4DFW8N5BspE22JySFryIyM5UzXdmEV4NleO6CgXMn1qfLY6lbtEmrXbddC2kNtH1t4lrtsUV28GMtEsvLbNmHh7QBtff1uhikI5552Lbak/5HDxGesDyTy2TUYEmmjfWYTNftiAZwRcg08g22/EnzwrGdxQ68wC5ENOqxyxRTON1KgyrUU1OmbC2DstdCA0BDTv7wvwE91gK5tUIqcaGhd6LC/jKxOor8uxZ1eW6KLgfcLFe/iWuMYkpo8HqE8lij3dR27mp1WLOaudqmzDg/JHy+QbJ+IgXcUZvTKd25c4jHk00oRtMA7b2WgdI7x/cvQ5LgL1A678CPPWP4YZ5dWsu413u30vckj0uqDSnyWSajMqnfN5Yje6/JUwZzdo5d8lXf/BxiIDbErHqQ9ZW0YziJ07QpstDbEJAykc/hLQ6sLbL48koS4PXp9/seoObjWqMA1u18AVi8a7R3N2yuUD1zbwSvF95M9dtYyYEN7q/uwXfeausXkDvLt0MOSVJrb0bM8mcrLbB54ckp7G6zZgNU4X4EQMoNMESJKGncq1X/6ZwuqAdFEy0SgG3Ny1WLbIb/UVHKat8O/EdTw5MNJXrwDIV2NWeigxejchbp/VA385gsxwvqKqiKB00L4U4p2osG84g1oy91Q4K8YMoxFOLMKpj6PkqnhbQzIVjz5LCG3W/dhmTWkz+qEEWDmw4RRDFYRcpWOr8qFLQZSWePFzy1jQ/1Zv254hZSO7GH4TsF9STmP6y7D86wIDyX37IiPrk6aPMU0oJ7NjbZN4s0uB+1QUbC31g/NxKByDjp3KJj3pFA9Od4fZRtyYq+wretzm32dQ0MEdffmytzg7N7D5QwFYfnp/ZXxg2hweQI7ZEzWBudKkwmHihFP7LD+BCn53PLHw9bGPIMB3vJe9k3Lb4tyJfENiaMct78Wyt0lq09KvuGSYyzQ3WnbDSBxcknTsrOTD95B8Srttz5TNk2mQaBuxyJ9tGfSAK/PUvw0Ucp2Zibq1SU0F1slL4Q4aZDSHyCvFFoFDwDXrpGxqKZinQJJdZuX8iMtGAb X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3905f0a5-50cb-4d9f-524c-08db7d531d53 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 12:26:53.2357 (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: d8IEr/OmZIqsUBsSoil97Hw1rMItzaTedLQkLW0J1vIcitMvxKN03esv8zLp6NFlnLXbHrxOh0++cM85Nn5H9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5551 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?1770583887151116178?= X-GMAIL-MSGID: =?utf-8?q?1770583887151116178?= 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/soc/ti/omap_prm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index ecd9a8bdd7c0..b2cf0a1810b9 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -943,10 +943,6 @@ static int omap_prm_probe(struct platform_device *pdev) struct omap_prm *prm; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - data = of_device_get_match_data(&pdev->dev); if (!data) return -ENOTSUPP; @@ -955,6 +951,10 @@ static int omap_prm_probe(struct platform_device *pdev) if (!prm) return -ENOMEM; + prm->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); + if (IS_ERR(prm->base)) + return PTR_ERR(prm->base); + while (data->base != res->start) { if (!data->base) return -EINVAL; @@ -963,10 +963,6 @@ static int omap_prm_probe(struct platform_device *pdev) prm->data = data; - prm->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(prm->base)) - return PTR_ERR(prm->base); - ret = omap_prm_domain_init(&pdev->dev, prm); if (ret) return ret; From patchwork Wed Jul 5 12:26:40 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: 116108 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1831416vqx; Wed, 5 Jul 2023 05:28:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlEdcPagc9jJUFZbjz1DvC3Jx7JKyzPl25y0mSK+4JkKHlCGtweGBf8FGSTQoUDaKxlKQg4f X-Received: by 2002:a05:6a20:6a22:b0:106:9266:4448 with SMTP id p34-20020a056a206a2200b0010692664448mr2997507pzk.16.1688560089773; Wed, 05 Jul 2023 05:28:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688560089; cv=pass; d=google.com; s=arc-20160816; b=kfpGYB3hvByaM94jocrv8JWl+nsNK3grnHlG2wqGely0HICktmc8W2OhfNXnYJJXjR 1TIBjo402mRCNpNIwaqC1gR+Nk/tqOdO/LMM8wnjTsQtQVZT1jlj27IG8YiW7ocighXT Q73jTrX79hecDV8Vgv1Z16/w3+cfqF73V3lQ5YssfcLRINhBbG9zOqo2Z33Gun1AgsZi TSV0hkrI+FZAvlNDiwdQ5cY8rI5tQtLAbB70amRa55Q13a3gTXNRqyHABnl4r1LuJyoo 5YriHXpQCOWzSZg6a4Dl3U1Js7ZBORjhrGJn6efs6Jnp80U4lp9alnl9JG5/g+HF8Gmw M0Hg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9hDW4ykj5bPi2qKiSLnWOEALPOIdRubEXi8LqQYCLmA=; fh=4ScNB/bT4+17Z3kIeWKKNeuNeo7LMet4N5AfjjLnt28=; b=0l2xLNyFi4OUq7hOh/SzYGm7jrHwI4KYOTTgGo9fkKDnt0QThuIwZ4JIGXufiGArOI /EdK+wEsPPYTzkvYIiXh6HThjSWtZsSDCrbFwtUnjVoONVtjo98nBpjCsAEnQDkOsF9L RkOnp+1W2mTbx6G5Dsl4bZVu9ZjQgSi4dRoqGNyy8iHubWROAe25n1nZLeHkQuUF0KrP Q5RoQZb8u9how7EI6SUpgbCtOj/a/PLC77pvULPtpLwk/9RW2DaUmqoZ/tmLT16S3yCw c0Vt6gqRnjC9tBLOWgD4hl66/OgjYquIdTAV4NqkyhTG7G2672tpfC+Oc44zo7eiWVlA jzNA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=bxaBJxr7; 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 b13-20020a63d80d000000b005599cbfa258si21504401pgh.851.2023.07.05.05.27.52; Wed, 05 Jul 2023 05:28:09 -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=bxaBJxr7; 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 S231334AbjGEM1F (ORCPT + 99 others); Wed, 5 Jul 2023 08:27:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbjGEM1E (ORCPT ); Wed, 5 Jul 2023 08:27:04 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2123.outbound.protection.outlook.com [40.107.117.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53C73B0; Wed, 5 Jul 2023 05:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UCUasleyzLy8wKR14koojITIkJ47cdtw/j7EvXcffpp3F0BcrzXlKlxA4DVJNnxxpaRDT6tryz0NyH5SJV++XzRnY07jJq1kPw/uLmigKlYookaVbfJ4Yi870S1XPr6JUJKNcAcPzxs21os126icbZ52vObRPn4hbMS4ZapA5Pzbk+dT9aJSHrhTopszWOk143CiXJPuK/hxftauIFAE68d2PwYCLMOeOO/UhOMBOGXk0lOA/DjiaQhDP3mFpKFOwbQDHNuD92wELL/Z6XXKQ/PmsrgAg8iogOc+EgCLHLUvDqBdWyF96MBXRvSS6ewu+zUtlvKxX7tiFp+/dF0stA== 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=9hDW4ykj5bPi2qKiSLnWOEALPOIdRubEXi8LqQYCLmA=; b=YJdKFPJSOJIlR0oGZdEawY5Nyux7HlQXry6EQNRq+ZDfCd6XmZkzRFJJ1j2hp/MtqW/q0lYEqAP/5rzAbOfUhFEFd1cYHVhH3FzlyzuC4fFn4bauvklnMmPReTAG1wg12pK8aAqC1LuZlL2Y7ec+WVuljEeo5q3jLrZF/jVIvWPKPZ7fEyKjs4ZYjJNRDmHtb+aHE6tGg8VL3rMef1K3QaKY7Adfk57Qum0eJ+lYzijK/n6BMka7Nw/akK1JBC45LAB+sQxs1bHd+TUQdsFFhKK/EX1tVuJquXx9PlnMqlxa7WpkcVugYGfrUNm+D07phNxOXBVarjo+TcSei3bbYA== 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=9hDW4ykj5bPi2qKiSLnWOEALPOIdRubEXi8LqQYCLmA=; b=bxaBJxr7alXocmY0ohZqFfm5WA2TFhCrJAsHyv/YypKs6DsyeTaO0GV7v5z8qIsR6bcSIR8KqYnwPOcoGR+Qvk5GnpsXb0Vg3OdTSjgiVCTSbJKS0vXh66ZJclpSk22vuebC4nR3RImaYSSamNCFdNV8I0Ebj52kk+uz0Q3A/u7SXk7eLkXMUr+xvg8ZfoeOuzvmLAww0r7NStRvxek3DMBga8m23NeOv5jyrfqu/uFx7XoyOsUr/FzGI4FLugP85UF55TPy7APwlCOE48Mc+33vLDuAR8cDRQLatl8q2iz174/G9imhtmO/47szN/wJog2bP4ufieNo63dUDrWeFg== 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 KL1PR0601MB5551.apcprd06.prod.outlook.com (2603:1096:820:c2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 12:26:55 +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.6565.016; Wed, 5 Jul 2023 12:26:55 +0000 From: Yangtao Li To: Thierry Reding , Jonathan Hunter Cc: Yangtao Li , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] soc/tegra: fuse: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 20:26:40 +0800 Message-Id: <20230705122644.32236-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705122644.32236-1-frank.li@vivo.com> References: <20230705122644.32236-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0001.apcprd04.prod.outlook.com (2603:1096:4:197::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_|KL1PR0601MB5551:EE_ X-MS-Office365-Filtering-Correlation-Id: cedbd3fa-8f60-405f-ff5a-08db7d531e4f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o48KgybcstMno6e0JpBD0Yrb60+JzSiIiKaGhAzCiJrEvlltMYu6FvVWZddHV9p+WvbgHa64EFo4l2sKJR1hiKzP7psUAJwnqVu+XRzabM5HRdFyqPySbDSSo7uDtSLDoCEbVMsjDGQkkn0EyyQD1VpAaK+M2Ud9RhrDKTEFT8Iv4JRjshSl+2FPUJdTZz1hAt6gySvtGWddHDtYrf0AH/8gKZo41tW51zkdwz5iFbZbgxVMndmGY2MbYygUbom/R2l/32gRQKJG3hlOFWzJZLI8e8oqxon5bEmi9XEpDDkGOwY47ApRx92mc/GLsL7QJpqwWNuKnua7AW1UubMnd1qJ8FdFdKkjBP+IGFwNSOlm3yfBpClpRGMt0k+uDnZJ3X/AN8Sticn9jT/1qNFDNeSUVrcKg0yWZ5dLCUJL+06UQ2K+Y4EszAPnDg9fAnBqU8vvXuosgkb3kyL5QmFF/6QVydFaIeF199CEZwNK3bC/Y4URHVh6eVDF7mI6EuGWKi6uae5JAHIIriAPQRdfEfcdiLlFqDMs3zR7PB0ZdD/Z+/qli0AM7j3ZHPEtv83k8NMRuZBxBtfG06FVvJpQOHDZtc+Tbnjjfa1oCPhNRb5mQ8PHoE18zYoE5BgyiYgp 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)(39860400002)(376002)(136003)(346002)(396003)(366004)(451199021)(5660300002)(8936002)(8676002)(41300700001)(316002)(2906002)(83380400001)(2616005)(66476007)(66556008)(4326008)(66946007)(6506007)(38350700002)(38100700002)(86362001)(186003)(478600001)(26005)(110136005)(6666004)(1076003)(6486002)(52116002)(36756003)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: f/X6EUgrDD1lABn0JxDTJz/dwhX93QGkcZMB2lY5GG2/GYSpegXs5iKkE/1V2kwDQUR3Oa1kjt64BORNybm7FxeurtDOal6H9G8qb17mWhQfYjnwIyTJNTVyDeKrqZKmWck39EmhyvHaIGqCu8INbXOkqNO+gVLXW3panvuUkT4KUhCdgIiCrTiKxRHhmSf7CePbDl6S0p9mBI5cQ8xbUPXujrlMStN515NTICFjOqfM7JzjoCEMQvG2Brv5b/R/EcJRZMs8vuoumXUztTWch7If7MhOm70t+VwJuM04PyNv+xmnPJKrdLli9BAfIltnyNBgLX92cYNWjeE90uonwkVGezXHvJ4Xkm/3DSBxvF5+JMOsBw1lSrt3RhRAMYB3xqxKrtFjIPm4U+9tL8zAJL4uNz3UG8OnHczsU+iGFOS4KIm/s0RB4/cbCHDO2hls+3SAybmWCd8Yz/q9BH6i15JlVbQMFAEgpAS1Vxb63y2n1NfKNcPunyb1Bv37YpTw5ja5f8hOV1Wzq8D/vXb9rktk8g1837tmhjZCkMLUC/GaYeP1UdGQc891ueuVR1gT5Ov9wmGDMziePkedK9Q/xn472m7VDOKeuPcyn/GDJ2RxYK/WA7g8yUc8ITM1TZb917Qo61CRER1mm8lTx0+LytdnlQNvopCPRop/rsFP/B4nXRJ8U/2cMJjO+D9FNr+fOLf3SPJRe/oFkV8BmCiFYoBoXmW/FJiUN308FRBgj4N8fM3AX43olTsckWZvu67z/vswBooqLSAw8SHOG7uZAkbc2iEyhGTluzgW8ab8RldD4WzIp0XxDQl5AlBNb9zqrmu7kKKgV+5rUu4wpSUee/OYqxV1/VWPe3nx5GvoRZFdoHbNPTMUTegVutMZJTsYdsMgyyiboYqacidXsaSl6xESvRdPQJ/LUT23v2gXjEF3iru69emb+dR2BMvg8hhDt2WJFMH8SqnjfIDzSLnnBks+7mbvUvD5cuxThf4hs9sSk/7xFyJUtFfdeKmrpIouq5ItuJ7ZKwgiOZDsKpWBD3mtb5URXb0Uk2bOIbR9ddIKhTP7LF+IxFBdWoKPAfA3+axQXp2g/HZm+vYY8eQqXnQZkuC5SMjzs4ZU9UsCESAo08LYJGo5c7rb7znutMFxj8Atr2O3Knh8trkuZ9PKOD8xLP6pOcf7onpOUzB7bsIU86UDkZMBEwWhj15P9jbb9vjx6j3A1qxRzRxMdwrG0nUhy/j5D/Hx2HcFcUf1S3m0eA9e7KNfLE0gutThaj2C816cNHaaltFnT3nuwQJ+xrY2jnIKezRUFqmMRHSatzfBGy30vWSgbkyKVmMU6gasJtZiX70Jq4JJQeCiQY2pYn50FIWa0BTSXds7C+v2EUkZZisN6pJ45urOUtaYC/M89NRr8Pp7FbrJUX+U2CuAdY8wwZlGHzzeBiSZMjvFFYZ+u/TyMcOP1d2J5tc3yoC3bTI/InuixMg4PppAyMrQW5fZbaixJ20l0Htu0qta8drX3Nc98pRXrqeaUB+PVc50dOR/Q3ROeJ3u1ZDiJzvYawaIK3+euBDtl0hyCji40JAMuCYuQuAZc2bg1+A31Mwy X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cedbd3fa-8f60-405f-ff5a-08db7d531e4f X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 12:26:55.0025 (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: nP6wkJhsy+1WBjktKByhAZyYsiTmKZxds3qTWe7zVZeEWnBVAnpJcvWucCdmqJj+//e6NInS+VoEeE1+RqqMBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5551 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?1770583584751714805?= X-GMAIL-MSGID: =?utf-8?q?1770583584751714805?= 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/soc/tegra/fuse/fuse-tegra.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c index d7a37f5d4527..a2c28f493a75 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra.c +++ b/drivers/soc/tegra/fuse/fuse-tegra.c @@ -125,13 +125,10 @@ static int tegra_fuse_probe(struct platform_device *pdev) return err; /* take over the memory region from the early initialization */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + fuse->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); + if (IS_ERR(fuse->base)) + return PTR_ERR(fuse->base); fuse->phys = res->start; - fuse->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(fuse->base)) { - err = PTR_ERR(fuse->base); - return err; - } fuse->clk = devm_clk_get(&pdev->dev, "fuse"); if (IS_ERR(fuse->clk)) { From patchwork Wed Jul 5 12:26:41 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: 116113 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1835616vqx; Wed, 5 Jul 2023 05:34:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlEFfkumWywo+ojcekml8OP8xJRmMlJBobSvMXvMmxYQvZuByGZTC9Ejzp8iM5AaKlU7PwtM X-Received: by 2002:a17:903:22cd:b0:1b8:aef2:773e with SMTP id y13-20020a17090322cd00b001b8aef2773emr996312plg.46.1688560496591; Wed, 05 Jul 2023 05:34:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688560496; cv=pass; d=google.com; s=arc-20160816; b=UId5/qSf7PkmHl1F5HCjbrFD1AY5iOv2DyNu9QzfviGsuoMxF+Wrj+g3FjNICNAdbN wDhInVaGItlLU3SC3DauPSvDqA0KCOVC3Fxj595G977AeOqv62rLd+SQ7wmgY3as2Kkt bKJoogvUTgBR93hP/5mnRdIbLpw40f77/+FEQX7Q7ALwajH3pqZc3GJ+P7ClOayFlu9F r2eOG2hz9gRf448LwAfeUtoF8ZDQo6SERfJzGQYVxF6ZDjogynyCszxLtO4cmLUPBJUC Wmf8f0wSAdt5bxupCDLtn5VuTPcAmAAiLZQVxlaO3LuStp1iJ7WMvdxYGcvry73dbrl9 bFgQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sFvQx3P8o+i8altPGyA3RKgwDnQclR6Ck05iIl4UkLg=; fh=0QkiGQ1sZPHGM35k3miYyKA12EJ/lVhPf35Fcypzpvc=; b=U9JwrE8HPcfbgbZaErdQBKTWNF/XT7ZEqopeBKtDC8cExZyqoofWVfK4lqDBV+D7g1 Q8H2/p3ptxEL/tegoGOv3wNzkXMnoxI3dYL6tLMFh0tIYpuhLUcWwHxvX6MK7RZ9PjzI Be0UNJEsUNdLYo0qxvR6NzMEe+DsTr0VAR04PtwDQDYISDXDfYLwnVhY70yKw0+W1gPE auH7xaAybsqB2bT66AS/CbgMH03K58S9+9hsIsPYUedmXJ8AmqEPRLDOP242cuJARc9k ggidesa9wSNB5oDWVG1R6t49HSHuSrLPNJmQlQxV0Q7K/GhBn1tEI8VnH5e6zUmYZ2EW mSEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=DljxLrCa; 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 x18-20020a17090300d200b001b89b64c0a4si5399634plc.148.2023.07.05.05.34.43; Wed, 05 Jul 2023 05:34:56 -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=DljxLrCa; 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 S231521AbjGEM1J (ORCPT + 99 others); Wed, 5 Jul 2023 08:27:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjGEM1E (ORCPT ); Wed, 5 Jul 2023 08:27:04 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2123.outbound.protection.outlook.com [40.107.117.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BCADC9; Wed, 5 Jul 2023 05:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HLFmn2HAqDOxkSGNFbDBKlXrBw5kYi2E75i/oebAtG5bcAJunNiUB2rHO3QY0a4AMKq98gOFCasizE/WctTt/c8YThO+m46PsSPAzK9sdm8/gVohdqZwL5a0pmY2GgoH/DEX8EGANOq71rDXLL5+VYkAHpY6873b9p37QAj1BF04dbKifL0J3aQonDF1bkMvGfYegcp9VhGZfNQxXAhf6Oh8Mume1V3Lp8Ea7Va0s5ISi8Q0z/1GMWyHKobjJA0LHRjH8B4fXNBlMVpPO3za34HIwqzeIQhCPEmeP0v+U1SXfaq7hvYPXr/RDkB3KTgtl9JwxSqDw+05r30+P3+4+g== 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=sFvQx3P8o+i8altPGyA3RKgwDnQclR6Ck05iIl4UkLg=; b=jNef+xTCMEmh4IXRk3iFBOpEPO1m/+8l8VRgMZ9161USScTDA5/1TqrFkz0KwHnDmgy1M+E/uWYxScD6yBnbuVMfnpZwgzVzhBaDqOw/jHG5Mh7z42+TUVgMeBt0JW1DObJU5ayeLMZHjFx6LnpvUMEMAa1UuQSIu/EbqFzdTU6fsEZ51re2db/jUY4scXNThqUE6xxJ8qhWRwHCna3fB8W/YGpF4bKGZzCRzA2s877UyLxbM680wg6gi4//YMrG+DxJYUZwKuq6LKCIkk2kkKPpfMRP7oZWBBuEadc+4cNLw6HYaZIc0uP3AgAtVqyF4P1kwdm6ShTUyLy+p6r7nA== 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=sFvQx3P8o+i8altPGyA3RKgwDnQclR6Ck05iIl4UkLg=; b=DljxLrCaTJxF55K90Y5VgMKY49flg58Iz+kPVIc0UtRMCn0EXNS0s3cJ0jUqp5c46ATSAks/OI0Gf6qQF0KlKLgb+VSdQcnURbqAhTUibXUOs1aUCAg4rfpWzo0D2PacYObxmSVjyg0jibTi3dWutMyYYBhvviwKHkHpNvH1p/xSJ+rFhcXJs5492Vsj9CPcighX8n8W18EGJBIA3sB0qPja2ljoyOg3VZDm4firelS0Rw23gD8KiM3DVinPh8F8YPIEqy6ROQfBDR/mWOwGB/SggLkVcrm0OOfP68LtpdvF7mdPNmuTJv9T0A4zGdiaV7+Vg2QMrg2rbXMnVGnWFA== 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 KL1PR0601MB5551.apcprd06.prod.outlook.com (2603:1096:820:c2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 12:26:57 +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.6565.016; Wed, 5 Jul 2023 12:26:57 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: Yangtao Li , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] soc: qcom: spm: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 20:26:41 +0800 Message-Id: <20230705122644.32236-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705122644.32236-1-frank.li@vivo.com> References: <20230705122644.32236-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0001.apcprd04.prod.outlook.com (2603:1096:4:197::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_|KL1PR0601MB5551:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c5d897b-d067-4240-3e8b-08db7d531fc6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sapX0sVlegUFMQiMZOarm0jP7+m54h5bUkzur0S4oTntn6HBpQU++lyMLYMVHk31U3IlQRe4TQlfW9qHDzAFrgNlaGH4uumnagvbBlOAZpf1jZiF7CTe/btcgUi+GnLxiMf8o/+fz5YTfhk+OgxPlOgMAJ3H1tobFCM9t6Y5aNByXEzRTVZopnRLlKmXUzo2sVznexWtgC+fp4Z/7yKpkkS/UNjOrbgrHiHTsfoHHbqELWsQbye7Znsi/+X+PRvmn6NoC5y+kL5y5zbFeKjAQOWUkf5aX9Tui6GZcsJGl3xU5HHuhu136OTj8byGAyDIVnLqDnIVpwKLoK06ROYi9TbTYVgqKkekWO2fOE9Qn+3SbM4Hr942nb/mwgDF3w+iF1GJdllZRGQrB2nFmzVOdG4+EGAlH8fjk3AG+G8Rv5vOIdBYKP9WitwXVwuYtw433Ce+QKuPiYIsvm+atxtd5nnxN7zT7Nqo7xzIRwelxjkbTnoUu6C8PZSTn1ruB1krFrM9fcHD9zD7H3bhUru73PqYV0t1uldqu6fkxVqcAWbeKoaexTn7SnbRMg10zXRNP3gzJ2JLMHQZqq6OpYjm6YEYPMyU/HMZ6vyc0PYdHKbpk+SVflKrBfgbmHyxYqlu 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)(39860400002)(376002)(136003)(346002)(396003)(366004)(451199021)(4744005)(5660300002)(8936002)(8676002)(41300700001)(316002)(2906002)(83380400001)(2616005)(66476007)(66556008)(4326008)(66946007)(6506007)(38350700002)(38100700002)(86362001)(186003)(478600001)(26005)(110136005)(6666004)(1076003)(6486002)(52116002)(36756003)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T+WsshEpQYy3CLLa2pLGes9lqRuQfCQPBBuU/pjqfgexbJ02+Jodd7hYgKD75M3O4yRcxW4W2/jAd93wkEf+gg8m74E0ao0ctAJL2VEQeuQbAlZ39JmExEvyvCr21FEIsFs2peMZ3/e/Sr4B6vVHING0MHG5n+eXXu34wcV+0AIb+ppY/5N5Fet1nz6lmbAf7LCSktIat4PxU1ni6FmM5dCamXPKjRiZqF7NSmMBbEgv+n7kBpmMQtSTnVd1xbH43xpEuG1dZUuVtQS6seXOJ1beMOixBdWWRjgaeGWLNGuLHsDJ+AHA0E7Kbbwg/yveMrFLDIYkvrcivnSrQRQi6EqhA+G/Ml/WPAadHGmj1vdAJdkTbtS01KcvLiGRD9OBH4wE5p7xcSa9V9XR8X/jJwHWw+rAB1ikp9Ua8ogRAv8UGlvypFk+rDAQnB7MfFtS89NBQHobn6GcztYyeoPVotil26a3SDnnhzPOqQoOC5FNMSOIilz8fe/WU5gjh0JnW6Noz1fvtszNHfKZxTaSyNoNyqpj+/MGKdEpEYRQQgCVlde5P4B2+iHqLLDAAc4H2tdlsASLbJJJP8gcfveF/F3rFQ4TpfG//u7l6CsmkF0GXsU2jNliETUQMzjCOzrpXw3EI4oaKBG3rWUZxpdo81mUr6ubNed/kRHCfUbSMBO6+Usn1NLoUlOmBX49TN1GS+bgfdzEaXafqA7fwPfPK0B9Hk1lYbEIcIkrkCTSHfzCLghSd7+qJK5NwwSl8cH1CbLB83tBkI4YFVJ3YHxwAJQeU3sBYnC19/Yl9G+Bccgouz9th5CaOnSgdyq738C/I21F0OiCBRfYtLdTOMLjQGb/mkUukLZLFPzMcBtCca1kJs6RRVW8XJLmOrq4X4dBLsWdCUUW1256zPOCT9u6CB+f527+Isr629megfEXhVLer4JDwGnyuTcRttLzL1KFPreE+preE3Sdh1avGIokmLsLkwlf9lwRmVKhAqYWoZiUGXVAz6z89Ln9Uvqt1MMLgpVw5z20fOn2aIIVLHhTLOlym2MrDaxdCR5zbrz9P5aaXTZh6W7rjIkZYPzQ+Q45bZfWXVCNHUequpeQSNpVsEuZvYi0l0/BsN/vsCVHgvIg5NBnTp93yTMp6Ti9hxvC0WI0BibShZh4+Jx1dtOYqpQ2T2QLjfVdyR9X5xPIrY3eKAsuGUa5dngqq0vVsIIFlMjDKQP4zo7rrgRmAcbOCq3RePxUwRztLyTYEmNOXtaRe7p7MaXDa7WzaEDgcMacFm2hYOX9k9EfGdQc+CeXVYiR3RcJNSRajUCZos4QD+lXGsmnIujgvgi7umQ7uaRpAtBcNQ20LOX6IoJ3UpzXYb/Xc8BtskrwnoYXWNZp4qNCX/1cjyCA+4LJkUUhNQz6BrF9BJswzM1gpy325kilVJNec8ZCHtvtISDDHet95T0ZQzsP0cCPpvXd1rDip+QgGN8/A8voOE4WWAkpFE6fOrJKxtBwCF0FSAN6CXTHYamkV3darQm9oxSIX+feM+OtdVQ1KS6cgXXjFMWL6YOkFoHRmnnQmFDp1AbglllB149PrWgsFaNdC6zmqoXASSjP X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c5d897b-d067-4240-3e8b-08db7d531fc6 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 12:26:57.3844 (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: Q3Up4dcZIwATdOG30LTazUFdmiBauJb/waGuujPx1UH3FRidyhRC5ygIBqhV97K6sxuwsTUje3NQBzegrCKEJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5551 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?1770584011164054196?= X-GMAIL-MSGID: =?utf-8?q?1770584011164054196?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/soc/qcom/spm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c index a6cbeb40831b..bab4897267b9 100644 --- a/drivers/soc/qcom/spm.c +++ b/drivers/soc/qcom/spm.c @@ -275,15 +275,13 @@ static int spm_dev_probe(struct platform_device *pdev) { const struct of_device_id *match_id; struct spm_driver_data *drv; - struct resource *res; void __iomem *addr; drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); if (!drv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - drv->reg_base = devm_ioremap_resource(&pdev->dev, res); + drv->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(drv->reg_base)) return PTR_ERR(drv->reg_base); From patchwork Wed Jul 5 12:26:42 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: 116112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1835145vqx; Wed, 5 Jul 2023 05:34:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0c5c02yOel7Eq+Zk0IaT89r2n8AHUxPHJoDzxvBjREdIHJsaEJCgUPr23uDCjyJgHUwlj X-Received: by 2002:a17:902:e5cd:b0:1b8:2c2a:9629 with SMTP id u13-20020a170902e5cd00b001b82c2a9629mr2858092plf.19.1688560450734; Wed, 05 Jul 2023 05:34:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688560450; cv=pass; d=google.com; s=arc-20160816; b=pnonnAB05UcgXGnM0FX902ELERGXVuxP4pOHgvZ1wyCS/ZWDeC92rI3Qj1HHWzqwP9 WnsYhDMqpFccohhh9uM5H2F4gUKu87ftjlh4Q0u6Y+PkamsOTD2dmjaPbK1QXE6Hn6WG 8R2SPk8tg4DLyuSdHzJHZHOp6PEAiwVIJJF99K9oTbuq47ccGfEmTj5Yiv5sWl1Z3Lwc o0tXmEKQTeKGQvJS0w0Rsk0vRrUebJMukznOzPsoE7cqDS9x3JohHG2FUDA8+hK0Xzer CLMrzvme7goo/pv6NfQzyIM6iWx1lMjEwlA+6FlV3CuIwUKzFnFYfwG+4yh6frYlwdri 3O2g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u05gyCUOW398OdPt/Q3aD3BuXhHxCsPGGMQs1qlwebQ=; fh=QqyH01Mre2/K9LsbGqGlo6T9ERFX/zlgWLNRfBjjS4Y=; b=OpfXCpfMSB3nys4FQOBu7PULNfsFXbNBLDh4lAONvuHA36MVg5MYGuaklFRyLUo6jl dTtz5jSHAl2TjXSN9XDXkHXtzVuUjrdDShHlCkGhE18Oiqw6s5Kb4P7yjG0gTFLhf+eW VcaXY5i+tD3lj6lKwZBt2I0Nqx4QRPVaffFM07dle4424itM4RfdTnuuXTXSD+xraJZk +q8vjeYK7UKWWmU0Gm6Zo0h0S5gxKl1fvlVpPtO9HfArjgMeSyCKIGt4oZKLPPuWZ/C3 mxJVzMDxuCwXRXgG3HU4h+LcxnSgzA5nH8dpcmaiZR8UkxMkDhIrSOajFE3brRJYynOO vU/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=KIxVBIVt; 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 w4-20020a656944000000b0055b12486641si16338531pgq.186.2023.07.05.05.33.58; Wed, 05 Jul 2023 05:34:10 -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=KIxVBIVt; 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 S229697AbjGEM1M (ORCPT + 99 others); Wed, 5 Jul 2023 08:27:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjGEM1E (ORCPT ); Wed, 5 Jul 2023 08:27:04 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2123.outbound.protection.outlook.com [40.107.117.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4E97DC for ; Wed, 5 Jul 2023 05:27:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bZVOwBkHE7DUAZv4Q2uVnkxbGBHWOxbqN8xiwR1Fotk3E3Hjjw/805HD81bnbQ++/Q8T9an3jQMThg8wi81bHqVCMe2pR/nlw+aOwP23IoQVaoU1f8HITSxZRliOPK4WqUdf8OBtlZ99zqfTKbcCHB/FAz2MF8vMBwSuBvY8puQaodFqMLdSRcdx7fS2Jqs/MsLTXlBWiw6dLoxbMdcBR0NzNkzv4kJRHWFDSbLlydAdKs8nActhi6/kIilceUURYoR3q/FBUCJ/v0524pIzeb++smqFYBSoKMPDdNrJHk1/UucEf6r3bsh45qHtWWLGH1obtsZcsqcOhCi9dXCv4w== 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=u05gyCUOW398OdPt/Q3aD3BuXhHxCsPGGMQs1qlwebQ=; b=JgSBwm5sxpFQCT3AVLPP6V64EGUYbYO3L9l5lTfIPMZgXaLzQg3T9/mLbZ8jUsnUkDki/UpogM/gkbwyKwdbi0lgd0dQRiIKhCZwlAo7u8rp51NTfl8y/GToAj+Z7TT8+j3cLa1WoXVb+sHFqbqmlUEZDTbw+58ojtumeRW2NKzdpnUNrBF9iRaMVBkH9XHM5SrzOf6pzK72CGy/2P054maOisiVSkIJo/Bt/cOFWzfUNueDJg/UsiwKIVTfCUe924MHdTy/e2VZ7v7jpWVvmL8cqjF6LA+/0NV3g+8xjb79RyxFHQc6tHL+ysoo8Y/m2H8p2+miwNWc5X/bPtho8w== 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=u05gyCUOW398OdPt/Q3aD3BuXhHxCsPGGMQs1qlwebQ=; b=KIxVBIVtNh/LZIfIzxBWtDerGUZlFvmX+IzQjcr6e2Op4larsZGRxiZqmqaPio+YX+DeMOJqmUJwbZ1qDoPJAF2tbl0Kw47hoFXIdaIUFiWJAFVOOAIGOnh7LV9nPR7+qGLK3yF7hIp/w/NmG3HEd2+cbmDCgj2C8VeQFOCwpkct/uOj64k/R6yz66IDUCq7t4Qw6F6fsYtr28xbigZBcyuImRqbumfnbiALWsZDKcEjMy07Zdtw6/h/y+lZUhADOlvfL7ngYfRQ2q0QoE49I//JbUtNZRPnCVdwMQgTCSy/iioBGJmG8LBvcQKE/zpJj65iSx6mgap5+w+C531MNA== 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 KL1PR0601MB5551.apcprd06.prod.outlook.com (2603:1096:820:c2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 12:27:00 +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.6565.016; Wed, 5 Jul 2023 12:27:00 +0000 From: Yangtao Li To: Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 4/6] soc: mediatek: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 20:26:42 +0800 Message-Id: <20230705122644.32236-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705122644.32236-1-frank.li@vivo.com> References: <20230705122644.32236-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0001.apcprd04.prod.outlook.com (2603:1096:4:197::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_|KL1PR0601MB5551:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d4d442c-0109-428c-039b-08db7d532165 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HtSbna9pVfAcBL1Fm8yGYCntQzKNc1rQc1L4DV4Upp3xL1/rUwQOoPQwO4mCe+NpFUvl5SSeH/LsZ3aGi+rGLBs0S8CUkqBVG/7u+wH2pglBB6kIfUi2unQiO/I9oyxlSN+DZU9Or3LUefdPJDEHS4TW3GM0MK6fSxQyKiZaowGIUEsLC3JtDTvvcZWDLS3QOVa8ngxxLlRy3mLjVYCuW8MPDbeJ/apEBOmcmJ1PVju51DLs9ltpCUfWirqyzsu5evla9q4zgwiI2UjdjIkogEESGrfBFqUq523dHuJnBLCUbzHC9s+0xw1X4g4FDQGnQ3OsGhZQ+L4J4ygKvxTjkFf2w36Pn+nMrLtV3NrPNNR+SOJOmFHfSdle0+/9s/tnPk4QFwPR+fSjDqqL7CJkUs5MfEn29nfs5Xrlw/Xi/AyCxyNwUDI7U7/fLFzWAjcKkyL6IXh3zAx7zgDFV25eHJFpN/mG12ddtXWoYy5TgXnBTItButml0DVnDm7PKwznw6lj0jdvfjqFqJ7+Vuw2vU0DIfFA76VhWcBfLVOAUR+cVdcb5AAyltvTzTS9vqc9PMWrnRKIYilKuetVWnpwJVEekCpPxTuCu2zPimXDeIU4xicLXQmKTuiR5osZjmQu 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)(39860400002)(376002)(136003)(346002)(396003)(366004)(451199021)(4744005)(5660300002)(8936002)(8676002)(41300700001)(316002)(2906002)(83380400001)(2616005)(66476007)(66556008)(4326008)(66946007)(6506007)(38350700002)(38100700002)(86362001)(186003)(478600001)(26005)(110136005)(6666004)(1076003)(6486002)(52116002)(36756003)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AqQRwkdaTB/yTMP2lR8pOmGGOEXN5fzvlKt9c3M6PJlpf5QqfZgk2u5C7Y2xJfQ9Q4fTMfEapDqIR+TIFeDUhCS61ApnSLNsq3CI4z03GUD1koGzIL8IqPq7EyVprZs4Xs03LB6IkvfgQ1QA7KiKddEomhHlkSzNgKOVvXiHSY0Yw8J2K3liAERVxV7r1ueQFQXgTEpzSiladgxiX6EC40YQB/5uin7ySpyeeyH+T2JSyr5FstHmzRQO1eJVo3BxXhmjLkKNmKMIkhU8eznLbmbbnn+RjUm14SMug20H0frO+LkcXOW257YqJxzm+IvByg9RDqKQDSU7DqNqf5toZ7GeJBm5az1F9GwCiFuXmsyVjNLOEsMxq29ZYSPayuThcNKV+UdCF5zq+o4nOllSox0Use0HO8JV78zitBMknzEWEnLSsGJHz7KBMjcgQkjNI5y6bRt0lpL8AA+aIjf3cJISZYvFTxEECYb6rcDmc9WKV9K2zOOC+M6ahNGNXUodrXcdI7shAS4bMHai5+GnJI5UuwQAAIfsvkZwT8yWacwnlMnOrmDp+rg7aRI42/q/eX2st1oTrCKSTFlTslNFlhNUPpOuXzA6VwpjAG8AWQSgkWmZeDTm4D1mOeo7f6CiVKjqvRTfpkOX0Ga5wVewQKkCqel+8sclv4MMfdlqq3TYc4Kc/hzy+A0UXuon8QV3XXC0lmMpzXHPqwzI7wyV4oO6nO6za5tIXHLw/yvlA4ck17LqBmPjX/klyBZgCr8y2trAtCn23bncwooUi4EpGoc6/WBvJh3aoR+M8K9yQTMQPYsdZF1SMUS4ON34RiF9inUX5ogkbes1LsjEgjttKd8lf8UzTJr/q48ECZrGDWIine8vOnZAHlvKGHWuuPSQx3DzUpJ1MWckCL/XD+nMUC7lQKanEL29Fx3WL6717hgwaV1BUT9ijrgogREoDoeJBakgkyy9zC+zWQa0203hQN9yAl+9hqw9Qs+/KCC9eNoRgb9GR402Ol+eITQEe0H5IMPzzjWdFhxauCSf+Z9gz6bW4Xg7Uvde/xO65nqQyIwi6rBRKdrnWdCcXcLGpiTUboFqjfvzNKBC7NKrwmAzYxTC/sn3VF/scTKGBn/FXM30QUcjiTXE/zF7w0zQD0yZ7YfRZ1LxgJyoZVVrG2HwZlMbKVDeGO5RKLKx/xRRT5LoFpDB2v2MJkiT9lQWBA5TNzHx96DrIdl9WTNTf35j432BlasDkEIChR1T5lklMddLzJ8Lxj9x92vVlY6nRb2WRphjERDU4EENl/LIUgEC63uCMa7lDyWy/9zHlAhqkNhGA2U9ENisx8G4r/tMhVS2BGxcqOEDprrLtNLaTF5DK9A2dhqeFDczz/mZ/3IYMKr21jfuRDnDsJcDwZ4DZjueYXPFWI2a4DGipHnD+DSpLbNr77Nsza/xT97KqZDAXj5/aGVQbmhfp3V185XqCqNA+LWS1iWYlfXjRBviweCy5+VnTnzRu1PSmhHVQp0HjeV6UYLq/3pOsUnZq2zUTERwLBYQa1L00vllk6iOL8HSsUgjsQlpEuaa5y+u+Kg8xNl8ZI2fnxwQP7hwpFndDD0A X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d4d442c-0109-428c-039b-08db7d532165 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 12:27:00.1190 (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: 0ivNx2W6+5qkTd2mf/R3jFbHXg4HdcDLdLa1myTHkC8DqyHB2011k1iij7mjhIuV3oyqk7YIC0OUS4F3rhWFfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5551 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?1770583963011192309?= X-GMAIL-MSGID: =?utf-8?q?1770583963011192309?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/soc/mediatek/mtk-scpsys.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c index 7a668888111c..4b5b972a6b5a 100644 --- a/drivers/soc/mediatek/mtk-scpsys.c +++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -425,7 +425,6 @@ static struct scp *init_scp(struct platform_device *pdev, bool bus_prot_reg_update) { struct genpd_onecell_data *pd_data; - struct resource *res; int i, j; struct scp *scp; struct clk *clk[CLK_MAX]; @@ -441,8 +440,7 @@ static struct scp *init_scp(struct platform_device *pdev, scp->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - scp->base = devm_ioremap_resource(&pdev->dev, res); + scp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(scp->base)) return ERR_CAST(scp->base); From patchwork Wed Jul 5 12:26:43 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: 116109 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1832791vqx; Wed, 5 Jul 2023 05:30:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlHT/9W0SvzQT0taoQo61UTnmgUobV5UsIXpV4wvXNdrc5PgMU1spRQjJ+xzw5IbUFImy/8F X-Received: by 2002:a17:90a:5206:b0:25e:fb6d:ce68 with SMTP id v6-20020a17090a520600b0025efb6dce68mr3027963pjh.6.1688560228275; Wed, 05 Jul 2023 05:30:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688560228; cv=pass; d=google.com; s=arc-20160816; b=Tz9FHjGe7yVqr/BWbA3eRyth2gSBA0wBhGnH+SYXObIGeus9kkoCNmTjwpDuFLlRgn /97Ymo13trFjmFkxP765Rhn1iRFKiCNi0Gu+FOdsquyB49r3/bjcB//3s+00eL3LyICF ZWIbkkRZJ1SaCLhaJUQ0aPTccMGxfVIDLtMhv13itDPMFIrao9JoSLpfrBvA/SzCC0Wd VCyVqx5RqdAxwmQsYXYl6iv6sbeRuZITPup0m8PUtd+eUPi6L4tJSg47Qy0tMMOcm9dR GGqmgLBrc2gZ8QB7n2oVnrxC4Qy7Lw7SmEaGEIyH/8XJAwwisZT1gL4P3ijjlK/vPw33 sVUw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2owX08cTPpggMLaRweX3EiWumvtcP/OqGrR+fzbAIgo=; fh=8U+/1iWW32LZli/7k0f2SyRp/hBCKKMYCWN4nR3jmsU=; b=aE/0QGJdz7O0JBgQsCRr+DqlmYbfFYX3BI0AbxUdrE5s/zfcdlpypUZsQbbtgUN/uU boPaio4nRRRzYFmyUUaaMT21CEL2dFQTO9u+BhkupJVENTAVmguZ0cupm7AceiXM5+eT fHFmC0IBDMiKOWsUzPJcaU7xtkMjyLFUnru1R0MegzWW+4H1//LwsfuNAlEZ5A17Iz8r cSj1bVh0OSQKrOTE68micq4/+6y02dLZseRD3dD12iPtgrPr3rLGYHEFyqr1GCW9lTx3 UQJ+LwGkzz4aJkjAGL8tI3VmbtknvdnxYc384xEFLjo2pNDruOFKK5RPXNLESU25nchv I/Gw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fXtntZQZ; 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 s4-20020a17090a698400b002636433a84csi1491487pjj.29.2023.07.05.05.30.07; Wed, 05 Jul 2023 05:30:28 -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=fXtntZQZ; 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 S231626AbjGEM1O (ORCPT + 99 others); Wed, 5 Jul 2023 08:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231346AbjGEM1F (ORCPT ); Wed, 5 Jul 2023 08:27:05 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2123.outbound.protection.outlook.com [40.107.117.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6D5FAF for ; Wed, 5 Jul 2023 05:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mMb0QfrZNnMx1JykyF6nhJ1SZ4+6y4NVGpb1E+KgpRwcgtZjWxTLce0TW/3wgnKmp1NFE20ygefksJygk22wDst/WHkliltltSXBqvX0OUt6Y1Nh/ZEFue8Uh3LVPDV5lqmnU3OT8lgwek7w1sePYD09W9dgqwZB99LPuUdCwvtSWASNQSCrFYClj2iT0J5PanOAqh+FXeFKiDBWaHZYBTl9bl3wBU50RbYXMtxjthGph/h2bY0JBbx6r9hc2Xkw9rtHqc6CDWihyAO5X1ib1+tuwc4sSOiRrHqc4roK8zyCZt63bQ3VD/1SbxWsgDNU+HVSN/O6/w+Zdcv3gXfnIw== 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=2owX08cTPpggMLaRweX3EiWumvtcP/OqGrR+fzbAIgo=; b=dcihm0RNA9ZFncss2wWNcHT84Hw24iUpcdfRx9NWHR7OmgDxxqZZ/kNp2V1XuaUacrpoNnYHLlCOrWqvgviZ0pFr13o9aRkMovBS8Q7VoG2OQaQ/Xq4pjT5wxUMfdGEKpbROSQOfJENmRDDTsy3toINSkKxQ/wn9EY6DER2dcIUuM16AJ7+Z1coIY5JWki6viURDbq7+Z+ABzB5KGa2O+Kj+FT+uu3bHwNImImPfNgCmX/2T+LrRqE2vPBls8urlqyKm+o9tGM67fNjSOG8P533Ncg2rdxsVdw3ldgNhPK0Xbn/B8Z95Z5f8kcnFzzSEUMfUlDpGxetXxGN0M5dCaw== 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=2owX08cTPpggMLaRweX3EiWumvtcP/OqGrR+fzbAIgo=; b=fXtntZQZsT0P7pFrjumUnjfYxDzj5LgcIMElE5AYfBO8nQy0+t/YFZ1vuCq0yOK2hI4mXyik2YhVKZr59JA28o1loYxuiY1loUvPGNDWQ+z1KVOSTQmTRgN49X0xv0+DeUX+cRJQF/CHNNMsqBrOSs7XPjFeWjLnX/4FnZhoZlDvqU69xLS2ileYwB0rYXgJPHEYGfJoKyKdYkUbhBzhJfX4qspi/ZKecQ1rtSm+kCdONT6vuP5FweugvXcO4WDC5wnotGaBAgXYbNuV9pMVS1nViASujGgnUaGcQlZpJH3iKBlpWE73bLuUE774G6bKVx7JybDK/s/ahdme6z8dJg== 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 KL1PR0601MB5551.apcprd06.prod.outlook.com (2603:1096:820:c2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 12:27:02 +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.6565.016; Wed, 5 Jul 2023 12:27:02 +0000 From: Yangtao Li To: Krzysztof Halasa Cc: Yangtao Li , linux-kernel@vger.kernel.org Subject: [PATCH 5/6] soc: ixp4xx/qmgr:Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 20:26:43 +0800 Message-Id: <20230705122644.32236-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705122644.32236-1-frank.li@vivo.com> References: <20230705122644.32236-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0001.apcprd04.prod.outlook.com (2603:1096:4:197::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_|KL1PR0601MB5551:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f23b66d-f10f-4f09-e52f-08db7d5322b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: In9RHuZknBx9oxSA4IzVfKr2HEOeTeQl6GfD5ixR+1mgRn9LZ4x8gdK0hOOYyXOsg3a+/mcbvnpkqHz3f2DR0F9EeoZ6t5jy0+L9a5T0jcVpSVG82L+93LODq8aDfN7ylX7zjzaLrFIV8fWph7tZT+9W1ZHDvWF4GP01opmNmeq3WvlMnF0tha2PrvBAc2EQ79ekuVUgJxy+MJ23WaLvzo20mJVqDP6pcMF2uPVhY9c5bJSPHG97b6PH+5j4ilMkYoqoB93D06KgSXCUC9ewhgSYa3KdTMwEmsSxsoXj4jBhwqvGu7fN3K24WcU2u2IIIVPqVXIAsQivA9y7mgoQSnmYHMbCoD5jRUASoPJjzbcI9YhgFQEfBUmqph06vu8A5HtqMHR5g90EunwY+MieWspN9jN37CWce4ZAR54Yfr2vZ/yU5fidPVjIXUggNlnaCEAI2gQsltc1Xw3LvpR0lh2NcR7PTwX8/hSgDoOtF2OoAnWpt8Ouk761VOj0zcR0CMSXp4lr36JSyuDooycKuV/JhuMj6A1Jbian1U3OjdfMPab9Bkg/WlMz2kTjJgCe/jaTeTHq8G3JPAR5mTbDrUSivBs//5/K/Y2Go87Q+uIR4rJbu/hTB/y8DoQTnlgLOWpwDULBFi3+lpORmkCfWg== 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)(39860400002)(376002)(136003)(346002)(396003)(366004)(451199021)(5660300002)(8936002)(8676002)(41300700001)(316002)(2906002)(83380400001)(2616005)(66476007)(66556008)(6916009)(4326008)(66946007)(6506007)(38350700002)(38100700002)(86362001)(186003)(478600001)(26005)(6666004)(1076003)(6486002)(52116002)(36756003)(6512007)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2oJCvGU0l89yS2MZnOKBMahLMg5efu5g1IsSM+hCInJystilmphUDf3F7EMquCD3cv0vV5IUzL2asCPedvBSgz6m5CLGrcYowqxtPn5bmLLDFbHWSGTwjClvzuDKOQYmFw390COJNCFFGxeA+bYdBlM++SAyE6gsgNcABnYBYUBavHEweWZ3kMiHT+nN6uMq25JF41COCtX7rLOh8SpH0gZHQ4wW/fM7N50DL0zsNAABJ3EZSevodo4MNzffqOXKCAjDMwg3ilLpfvlaznI/O0gnTeutUNuz5aUA727JxpbsBEP9YpUNWbVmkipgDAioRsMluGi4O6mpsL5SI1c+sfhi3QdP7KGeuiSxQsU9V8iFxysLEItmzhfCAN0dS4kuXpaDheMEYqDDvtU1yaZj8a12LtlXbRr5x4OgP/A2LkUM/8IIWBf94X96mPOMIvzyd38tOu4pYizceTWNuccMaGdX/9b2B9Gd1qosPpGaFHeI08XZdDEeXFABrDZGVkTHCW8s2LHA6H8UWb3OkSAtL87/0fJ20lBpuTa1uRyUBYKch67Tq7uLkx90wWOQPTrKRsKlnIPOpJSobp4N2DeDhfjsXlvGDPVEljogOp+DJ7KvF9MaVtIp70iHAkBG+wPWUFrm1v9yviBSe39FCo6VBIY3B+Y0Ex5qxL/6Z+znsjcI8s2WptuO/oeH2EsZLeJMVB+YAjxBsCYM3geAghARBvlt5yFgwpSUWk+smGL9lUsocwkWqwyNC8uR8HXewx7Wxf6l2RksIEChdxr9iVg+prcbGPmrfOKsxbEiQzCt27MnQYHQr7YRkstl4veZd2Fc4mtsZu8q3mKWBMVZ1slwhNTY2laFjWl9kNKVWEfjBodGerowdJWTUfZxRcKxiOvEvQXcdR78pkLL5cvkReyqZnzfPff45fA02czQWrO/bV+PoOxc+8MTzx9B5gtCpPypO5C+Oc43i4lqngy0Rz352YSPKEE3qp2/w73MClp9m0q5lBRWb5/2ZKyXuu6wiRZVXMTyXb4BbnyECIlJluPifoO2ZVOFw0Zo15NR1xuFTOaJrhd/IbAtkk5a+G4114nK+h3cUjF5qiz3aDkvArmaGqWZBkoRvFxLhnbLi8eRN9SpQVdVSD72OUjmvs9vAyl3Hy9N3LchyNTIgLtDqa/0UEZnAaeJNw4ptRtoBmGXbhAWGasfNU16PxYO5Up/0G4wD9pVsMc/ahuB6KA49wVmL7MMWxvM8RBPe5fIGsjyjb4xIb2Nkfp6AY5lMWRjuf/dozaByxXYlkLTD77SiaVbT1sv1ajrdL8LtZ4EPnr/CFK/SFRKX/i7zKLBxXRw5E2x3zXRqxM6AYPiHNSw4ICKcVKHs8eSLN1yV4tvYbg87sa0ya5sdQiULZMgtDoEFVzJxnq2YJ/uLMIdIyKjGAXPmqxLBO/QQRQZsnWapl/ohPqO1fcJs5uEZpuEaVR6X5ZyyHKkI2/fCDjcc0UJY+peG00MzaZuqdpYf4Hp8jcNS/mL2pku4lsX9y4tFHP9zDRdC6GlcyecS5Y2IzW1+sHgMJsJ7yGWsTfL4WHCnmFStwAgNiRAJ9CHt0GEYXvzWk8z X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f23b66d-f10f-4f09-e52f-08db7d5322b9 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 12:27:02.3996 (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: rGG1/kDeXDevw1K/TreEJpni6stDQF3UkfP36hWo3M2llzRGaIZeJ+MVKewuN99AmpXcxthfH1tT9rDGgF5DDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5551 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?1770583729657067701?= X-GMAIL-MSGID: =?utf-8?q?1770583729657067701?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/soc/ixp4xx/ixp4xx-qmgr.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c index 291086bb9313..8d24f39ac326 100644 --- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c +++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c @@ -377,23 +377,19 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev) int i, err; irq_handler_t handler1, handler2; struct device *dev = &pdev->dev; - struct resource *res; int irq1, irq2; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - qmgr_regs = devm_ioremap_resource(dev, res); + qmgr_regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(qmgr_regs)) return PTR_ERR(qmgr_regs); irq1 = platform_get_irq(pdev, 0); - if (irq1 <= 0) - return irq1 ? irq1 : -EINVAL; + if (irq1 < 0) + return irq1; qmgr_irq_1 = irq1; irq2 = platform_get_irq(pdev, 1); - if (irq2 <= 0) - return irq2 ? irq2 : -EINVAL; + if (irq2 < 0) + return irq2; qmgr_irq_2 = irq2; /* reset qmgr registers */ From patchwork Wed Jul 5 12:26:44 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: 116111 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1834840vqx; Wed, 5 Jul 2023 05:33:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlHNzS7S4exYb7pG3V58XCfpsI5Nq1/sSmDh6kPPs7rnvxEONi9Ivre69NnHwnzb2uCYcW5L X-Received: by 2002:a05:6a20:3d22:b0:12e:79b0:e547 with SMTP id y34-20020a056a203d2200b0012e79b0e547mr12058365pzi.18.1688560424360; Wed, 05 Jul 2023 05:33:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688560424; cv=pass; d=google.com; s=arc-20160816; b=WXECWcZPx90xXd9pYeFoZo5YmlX8DhsCuEAbwZKlSdiGmVQZ1wrNbgJ7DKbIRI0WQa WI/6UJYUd+wGWFlebJex/n9iAO65KiSGHvy/4Ygv4j1FdodbAFZM4N+MznecZHOWBN7M FE2xbYooNCWvbpLhMBagIyOpzhd+4ez66Ex7Z8Rdy9oDrr6ix+PbZGMQ72lYtxiUBmy5 mEPd93+e2ZxJXypHNvUYvXucWWDZp5/0LClWvqlLMl/i2dQOmdg7vcASZq43lW6MyOZJ z1aKYRl2pNnR2oTe8RH/kdqoT5sq9USwzO2ojptzzvVcQgrdASwks7bKiLvQh/Y+EGN4 KHLA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=D7yRHhFC8dqC0HNG4GTCtBUNnB+/Jrxcu0ttfywWZQI=; fh=m3DBf62mOyXfJfhMucMikjbR2G1Xd5PbTP/1LJ4/0+g=; b=AF1ge8jeCiRNLkDrbQulGOFt6VOmSdRhXEfHhpPvkl5F72LiAgjuWkD1S+6pxynkW8 LiiFmtl1DMYwrc86jI08yBjUI2txtxXz9aeYMDYOpXc7MiP8Ow5Bw+K0P5pGpGkCdWES R3wXTQCgHq0ErS/Lzx37dZblrB3ECLqGDjRoCgMKrfD+Qdw8PB2v19pkzDy8VbwqILtb O3K86Mlf3zfzxrw+sVsh5jb/AdU/Hgr+vvXt03+ofAebjbzT+Bw9y/ya1Go1BpYsEBn6 zQMUrXq8ngMJVLvmyPYMYRC2EfDF9XnlHUwzuz32wsFkDCEJkkqOSVsx1hhUdY1w6xjF ccJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="ILYqc/Dg"; 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 d15-20020a056a00198f00b00682acfc5dacsi3155739pfl.53.2023.07.05.05.33.31; Wed, 05 Jul 2023 05:33:44 -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="ILYqc/Dg"; 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 S231628AbjGEM1S (ORCPT + 99 others); Wed, 5 Jul 2023 08:27:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231545AbjGEM1J (ORCPT ); Wed, 5 Jul 2023 08:27:09 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2090.outbound.protection.outlook.com [40.107.117.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66912B0 for ; Wed, 5 Jul 2023 05:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XLnDn5GxguLAtt5VlAI2HqYG0/gOvQDsszLgfit6YV3w0z26970XGkHG+I7CZme89P1SGW9Lpk9FgOaTLCicTHoWOq65uusRi2bTjhcbsovq86asX+XV3DOpv1YC7LxH2cFnhrTkFmRgdfWCFwKy0jAexHFO325jbnd1PC0dgt1shGKpKwYTTxtDxFv/5Cdz0DJnDxNv/4NehjKOFrzbG25LnYi8Qs9rut6obYEdEK1nS94WLB3pWF3HNprZwbnDCa+L3FpFtdAygIddm/UO5CuxaYvnVMWa85ZFcKuIK0mebv99/gxX3fI3w7/oimwdrrmC8vUOYKfw5c8dXRog0w== 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=D7yRHhFC8dqC0HNG4GTCtBUNnB+/Jrxcu0ttfywWZQI=; b=mxdP9Bdqm3gD3c4oc/cDthy2U8LiaVrpNm4+G3ytqkZq53ZkNG+uy3HyWAzRo8fsu17wXH8EfGDFKCEI+iTQv7ZJdb72ecKrR0s+F27LQk19iWHj4vxE1fsC8wFWmXlUxUSixCsO8oEGcXxaoLiuf24ZI02GhlMrFfWSCeEbUlP6+rtTh1u1AxaP6pA8bpsKHItWesqSy3SPx3eONu4SyuZnB2mr3cz8jmOhnKs+aFoQ6wdtWnk8uzXMp9jkf6UPsFlV/LQK7tkPJYSP95BsV3EVHoRYTzBOAsnOVUQAREvvKD6OhZa266DnfHNe+Q/L46Bn5zoTyTimCArNj308Cg== 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=D7yRHhFC8dqC0HNG4GTCtBUNnB+/Jrxcu0ttfywWZQI=; b=ILYqc/DgV2MyElWpNWRzHHlgLWzsSfIsJ5Wyep6B3VuJrApqsekcXeRP7vkUozZ6b+ivb9bNOAwm8IKcK4599eOJJYZmvdHq7er9lXvC23Bl7GZ2IBJC47GrY0Su9IFGNlfuc7KpCkBbJUi2Mzc3dpM7ychz28DWXx/J9mNkxFVURpYh6NJ5Xj+fM8rGa5o/NrMnOGiFLgBhW6okJdmvILJ5q0G6/vN/JxjA9kruhnYost7iBsqSugBjoSmA1NDESHb6RKsDVQBV0xyfAIup1/aDZq130fWX/uDO4IBDmndKprSrdSU0u5dP6scvVX27hft9aS5urlZY606scobP/g== 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 KL1PR0601MB5551.apcprd06.prod.outlook.com (2603:1096:820:c2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 12:27:05 +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.6565.016; Wed, 5 Jul 2023 12:27:05 +0000 From: Yangtao Li To: Krzysztof Halasa Cc: Yangtao Li , linux-kernel@vger.kernel.org Subject: [PATCH 6/6] soc: ixp4xx/npe: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 20:26:44 +0800 Message-Id: <20230705122644.32236-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705122644.32236-1-frank.li@vivo.com> References: <20230705122644.32236-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0001.apcprd04.prod.outlook.com (2603:1096:4:197::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_|KL1PR0601MB5551:EE_ X-MS-Office365-Filtering-Correlation-Id: f270f739-a8c1-450f-95a6-08db7d532464 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y52+RY0Ln1uTktqleOY04dzpeP4GflXp1Di78lykD4nNj7MN4TcToaXwrbdcmEWCP1wLCaFPnK4uhTsFBvcxX/+6qMySVKIi9A2FU8uFXb58JI+h6ekpd4eKZz6oK+DcR9tvx9TFwvxl2co6P+g/gwfLlvF6Gjk6bB/oFq3gtTv/4dMax89JRlOvH3drzWGE1Dy6WCeJNcpgBJ7d/qtuxB3guNgicc4Hh4czFceKaJW4/PIlribTAYEQnjTt/Ok4qWxUemrRKzV5ND/iwzpRV4sP7CeRwoLHJ/Qk5r2IuX8u8C3NqexzhAYBO6EduQrFdt9lhYZf+Nczbyh8n28+HXjIKZQm1/eu9vkH2qmzcjdEV8m1/t/p0o1CK1OC0CCA7cApm2LWljLLxpN8ET2iLC3Cpn+fJHsZIFv8w5R3BWC6nkNNC6SBt8Ii2akaxlylGy9lR1xPA8NEMY1Hz+255QmdILgdsTuDlwdTQ/z0LwgXUl/qUdNlI5D2e9BRvxNMCotPakZKMsw4alZHj8FPdvO3nL11wb+/G1mvs6VRaHJsgp+ERK4nYsTtRU2bC09tlOSl0lRXmVoxU+5WTn4Zi021SyES6UCnff8DETFHIWh9fYrYwcpNY6MhXsvlGfiB/JgKXeoQTYK6e12WIMV/PA== 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)(39860400002)(376002)(136003)(346002)(396003)(366004)(451199021)(5660300002)(8936002)(8676002)(41300700001)(316002)(2906002)(83380400001)(2616005)(66476007)(66556008)(6916009)(4326008)(66946007)(6506007)(38350700002)(38100700002)(86362001)(186003)(478600001)(26005)(6666004)(1076003)(6486002)(52116002)(36756003)(6512007)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MBrRsCTa1IH/4srV0nRXBOjJCMmwMWsz+EvqweLZ+z3N8jea9+0YFXio1iegczxiYQuvyuxQ53JaMva1rDBkbpmum0wr4b0cWkTLESW4c2K919B9IwVDpNOhknUBeHgWJLeHs2D2YfUjLs0E/VqF3SuCCwQsgOUXmhPcmL5rVfUVZKSkjWwjoH2OPLZxvtr1SjXH9vqQ5dT9d1zugXn1IEUVNQlidWe0kYquO5ngQpXcPhpvQ9O+b2skUvzh8r3xyQW7ipnIRuyr0HuOqowrHXa2H89d2HZjCBHw/5AMozsLX2+hnbCH1ESXfQgzOJiTgMCMFkxkQjem4HWLklgadifAwcZwBtsgCSQBWvE9BaBlEdgRBDNWwCWvgmjVdvanfB06JlcgioCx8roMhuDx1S6BW3QCZqgm1AyIjc5rVx6CloRBcgv+uzGMIjWzL5X55gm4RTyUvBNH0YrJJPep0VcNNeuJz4nUpDFdSjd5Ybz+Kbr5NB9zw4bkp6dcAMyjjpzEBZVzEsJcLBa2zrczafDv5+LKSwQRtdbAgA4NUCbMDjO8BoWRQN1ldu3pZP6i4L+lrIyOKzSYYzFrniqmO6ByHEcdNg4HuPOSqfgrW1XWapdhN6wMaKkG/p0dT6bHTr9hgwo4Idv9YXK4LqKjLH6fFXYKlQ5ZpcS2ZXxq2TZtYNkuuCD7HdU0EZEwzY2MudH8UytJ8p+zm5L03TG9jITnxWw+xaqkeJixQYAu0/WL3WzAg2oRRqSTlqx4LjfA5nmfm6QngVFS8ga/jYKtqq/Zc/WHcOY56MvjcDCzj26Vi4wINPz4YkWa4TFJAaHfJAPDYwt4cysp1Op1gQcVkUrGEYWoomGyFcK9BXsj4wCN600Xit0aDh9vwD/OcPf8Jx8onZwjb1udNV+x23Vosaav5SgofxDbT8sSeEKB/pQ9u2pMmMtm/5DVMBLBsZc7wwT3P8EHyuai/b42QXdVapSbUsJdyw9BWEtQUrFcTMvJITPBw0Z4e5sDTrT4NvDk0x0s9ZHwccrvU7GZAXFJMyLKWGxS0yNrx7jnYg02Avfv5gh7Q8g4yabXY9cmDaA+HiWFHjiiE0kPWZXQrDSxyUW7mP/Zsq0Qtj2PDM0Alr46PUqGeHLrSZqNDr7xmzdd5S1wcEfPjla6dS8Z28QLEOy/GKgDFY0IXfgjG9wm3fIAGUsSxEj73JmQ0ORiza8gCoZtPFbVD6A+Kv5NTo0SBcccjpvZhU3XiASrxyQZcGijvG9FTb3uHA9TNV70ORC6vZK2BTDZgnUJsZWBcl7igfpJHXHw26HfLdsvSuIacSyRwm44ya/2GAv+KYmPGHwBu1Z+f6NLhQ3NYNWBMIAVi+E6g6Kd2boD5CFJN0lqjhnuFHZPK7VvxpMldjUeaOkbGinzdfYqF2yKxE8OMzdMDf1EfqaCi95g45BP8jLSC8UbnKJGNtBEjq2owtRJBHip8f8ejyQDoUz2rWdkW8Rh2ZBOpeNhIKsQzaWYItisD+G2kIkagCieedZH3dBU4KMIEeasaT6sG+LPUy/7dUWpX0LwlAYhcHLaKilDu5e0n/T1UjsfLAMD45zSiwaZtopR X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f270f739-a8c1-450f-95a6-08db7d532464 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 12:27:05.1610 (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: J28JcNgggsBjR7tHOslkXKzE1luFptYTpuzqLF5ptW62avW9Zh32MBDzN3d74h2RTvUL4SO8FRcEI3jkI6KeYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5551 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?1770583935388121280?= X-GMAIL-MSGID: =?utf-8?q?1770583935388121280?= 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/soc/ixp4xx/ixp4xx-npe.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/soc/ixp4xx/ixp4xx-npe.c b/drivers/soc/ixp4xx/ixp4xx-npe.c index 5be9988f30ce..67384031ef97 100644 --- a/drivers/soc/ixp4xx/ixp4xx-npe.c +++ b/drivers/soc/ixp4xx/ixp4xx-npe.c @@ -700,9 +700,9 @@ static int ixp4xx_npe_probe(struct platform_device *pdev) for (i = 0; i < NPE_COUNT; i++) { struct npe *npe = &npe_tab[i]; - res = platform_get_resource(pdev, IORESOURCE_MEM, i); - if (!res) - return -ENODEV; + npe->regs = devm_platform_get_and_ioremap_resource(pdev, i, &res); + if (IS_ERR(npe->regs)) + return PTR_ERR(npe->regs); val = cpu_ixp4xx_features(rmap); @@ -711,9 +711,6 @@ static int ixp4xx_npe_probe(struct platform_device *pdev) i, res); continue; /* NPE already disabled or not present */ } - npe->regs = devm_ioremap_resource(dev, res); - if (IS_ERR(npe->regs)) - return PTR_ERR(npe->regs); npe->rmap = rmap; if (npe_reset(npe)) {