From patchwork Fri Jul 7 04:06:05 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: 116929 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3005847vqx; Thu, 6 Jul 2023 21:08:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlGuMicI1hVGPJd85GbRA4avmGPMEbx3/6uBzZXXthnCj88aKKAjvvPSJbFpG+vYH89n4XXP X-Received: by 2002:a17:90a:6808:b0:263:ac12:15cf with SMTP id p8-20020a17090a680800b00263ac1215cfmr3569474pjj.39.1688702889704; Thu, 06 Jul 2023 21:08:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688702889; cv=pass; d=google.com; s=arc-20160816; b=MgISY5+Bz1y4+X2W3Ne2RRhXciGTE73i66hTcTlUxfND1Egz98HcuD8SVaIK7htRIy s+LbmSJbvDBJkFJlEZqTPeZv/2n6cPSj/DDPgukbzoyfThI8LbAi18vd9HCtD9j1eUCa nBSm7mGwQf4+IkdlGuSXM6PZ+h2J91tzh9uP/LXUrPX/loM2NEJI+qGyH5pFEQldyD17 CkYicy9JiB7yLgptkeLMHb3IDGYyRgWybMHDP/o2LSdkOGZLIDukzOllo1d+OyX1dWCn bm8qG3DvPZ1EPOcdV2WH8/FEnFF4sPZ+t0twLcURjGfZcHOvnXZVuK1Xd9cLffwctDvQ HBxg== 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=RLIjEIDSi/Gt4CbhogrAqQEpSG4L/IDdFUD/+RxMDXM=; fh=q7VMgB9hqVU6Vtr6rouYs6i2tM4pCQjM5kl8bTfCZNQ=; b=0b0x25H6b+vSHv4BbAs8C0YudnbeH53kH8X4AOzUXwjnLqpFwefjLPRv+L/BuJhvDh zwSImvzEP/utiqouyvJ557AKXqMtiqnPnliuggBWUfO4HxF065KeBJYs2e3hyPvxhiwI rwVjdQhLTanL9+0ELFEBZfjoBBWRoYhMl5r1f5eSUpVvULp3sC25HLhH+Dd4hx4hr2SZ x9IpaR03v9030DEhCRaoS+MdD7tIJG9MpBVtDqEnL4NNMNncTedN/CUYFQweRvHc1Y0L rvgMi2czuZYD9ZN9X6HkIF2sgNcTzheITHSCTm3XwYlm6oCrUo/FwqdJRRjKLzcfiXqL KHJQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PAgW0rTH; 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 l4-20020a17090a72c400b00263dee6d04dsi1164321pjk.126.2023.07.06.21.07.55; Thu, 06 Jul 2023 21:08: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=PAgW0rTH; 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 S230123AbjGGEGl (ORCPT + 99 others); Fri, 7 Jul 2023 00:06:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjGGEGj (ORCPT ); Fri, 7 Jul 2023 00:06:39 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2103.outbound.protection.outlook.com [40.107.117.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43A841FD7 for ; Thu, 6 Jul 2023 21:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YsXkjT6REKY2c9b941TxU/mMeb6T5cKrPA+wNFWFESHHjSa4/Q5ehNcu5qy0fh+jE+sKv+xQdEx8kE4019LQhRDju6rejL17Y5bdAyOu0pWcQ3wp7HxNfXmZ7U6dyiZoAI1AxKbwoCzfBowbnJejiZuo/Xd2sUT/q8BecfnegN/+xviCmH7nAO1Gor6MMBjq/bLROQwrfsfy1fWsgb7fAwm9HIxiW7YsB/01nvFGUfelfk9FNgyhbD49m3e2zUqVMsABa9+1kQY/ws+uWU7l0UtOKW6JSzA5wnCEiht2ON3TuMhqonsBY4zDT0jWqOYFypShQkq/7yIR3BSy3aKpgA== 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=RLIjEIDSi/Gt4CbhogrAqQEpSG4L/IDdFUD/+RxMDXM=; b=kTZWl/jJQWJUbClz7YU0CVFMJqeLK71bwp8QD8MHJUfcY5bqmQMZHQ1JN5joAn3NW4U8VD4U+x5rxBSs8o7ssBZ1WA29BIznoqld9cfQrHelLx61oY1fYmyaT9vxmkyVXvGgXyAUCcTVft+n47zIyT5dgYQTKfIPcktXZFZCV1/69phsY0FEElMCnbnN3VREJN5hl4E49jZg9Im0LBSEv0Qjbg3sQelQBvPTWUYZ5ecXkzt9RJ4zkXEhz/kTvTF1cgxeV4G4Ps0hyUDg0AD9pvShxgwWPcNCaWKJ+Z98jBShooauHnbRt7zacSfEO1shptn3QHRntwpox8n2E1gTrA== 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=RLIjEIDSi/Gt4CbhogrAqQEpSG4L/IDdFUD/+RxMDXM=; b=PAgW0rTHR86PZsTq4n9ZIS7fOxvi+eEgDvTF7SmXvnOrss6FyOBnhat0ihyWY6Lqg2Eq0HF/D+LndrcUWl43H2HMhDlvRXnEbkCQQceEGdKDmvHpqcSt2BzGABBBZ1StLDx6uqVxEc9LALns+tc0OKWebTEAUoE1TIEpQdjSa3Zx0DUXn4sD6Ug6c/rY/AX7aINTlcGFrC+9rfhS3+95ScmWuRWUMFBJMhxpja9qjf/+Ek0jYrmx/PX2qFlrC6XI9aUJMu6C2wenNZ7VnoAknk1atORryeVzPLlWiUZ1KR0KzavIk8+ZkW3iAtnxcFXnrPGFf1OZg8NY2AIkWvfZ3Q== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:34 +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.025; Fri, 7 Jul 2023 04:06:34 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 01/18] mtd: rawnand: sunxi: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:05 +0800 Message-Id: <20230707040622.78174-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b6d8d70-e1bf-4ec9-acf2-08db7e9f8d5b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ove5HzqVHf4+ZMTX9g0aJ7dPKdAwHWjAHTf5b3hrbicUD7g6KsLt53ghh84jLbt2v4YoSA0UYaMYbTtyIfpEmABzT1/8d82892RUtora31I5n4+zEW6uCuNMsuL7zTF+Dl+KwVi7dzFPQtkKGO29qFNtHyFyPjmvEPGPE55zKZj9g9HmHTPH+k6USiGWjh08Jwtk4QwDLMvyT5Pv0ENUGy7VkGLp0BV9pjLnIq8+2s5tc1w1prNJTT7Rv1seYneoXfmKTy7JldP88xDsMIWcxRpP+3tQ8ZD2Sy96KlUPQIJ1t4nt88Bl78AjrHyOpUmXjpRibXUyEYXjsB2X6PUuWfvZoGsHYI+WROYwKpvIL+eN6z6oJ8FjSDQz6y1QYWIcnXDD0j7qi8Au4xVuFNcky8uGxiaHM/ejgczASrgRfVM1k05mfu2aVWas16HBihXJbVcf5CdLarklKrMymRBwpzfnAyDAaAF4B8niwdw4IwBSbLTVrMucmLHohBjCo7qyyruyhOoLjG/55kdXgCHc4jf+7SHBbkKpejFVZoK878gQo+pyg1VQOgD2ZqYFzpiuq3vbmTfp1aWxWuiJxoSZrhEc14eDBU9u9+vG8pVmV9zsgkN+3nws0oSdnYYPxvOU 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(7416002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: o5hfJDDmkBYVACJ1BHVV054tj9mkbxvdrvU+G3XVc9aJdxO2HArVCh1ehVOF3PhDIE7HONeBAvLrqAlN+RAsSJs16O9C7RNQswWHyAJ9qXahi4qEDRy26tgKA8OKk97aHmPoovRZUTzk0V8TVaMZbFlLAHkh7hohC852H1A7RrqfLlWTimz0UC6v90LJE9DFc+aY24Do96i2/VKTFUpMf3wS/PpJePaPmjZqxKwNuGvXRj3Y52fU+KcSJFxigfCK8ohvqT4yCplBIvf9Afil9ao+SVAjn3fl3H160kyy008Xh5GxlM0j4EwXRqRG4IGV/UkPIG1TLbkTfZokJk27KJmwKd/YNAaMfqKpf274pXhslEzWSoCYJFn1pl96HEojSIkqEAqKneY5LUe4P675LL3YyUD2mLC3+m9CO+tjL0yVLZ02AgEiJbH1l3U1dLNtEmDtAr3886iLQ+XQznoRfBbOY+lMSpBgD+jehkq/Tb3aag2dD2jRD8cznewWzr1SwwEtN82EIK382cMdAYiFRw6QDj3NAPJ18weXq7jY7LbAEsGZRp4H/aEZ7UNbznptj/AlRe61x/2ML31iiGptRJk2xg78L815TKNeiUlpFvg24O3IuBeu7DISq0Gbb6BIYPrQDYwgLnw5UUB1swTfJwhivlD1gssO/CnPuSRz20ReVcIf+5UTO1RzlzQgTyPvzwCcJhDAEVszn1ZlucwgRoBSaONsg7x4DN6Jp6w0btH/MCsUGrLDemOAi5stiBAk6IJZJi8KFs/lJ54MnrTV8ysHmzbIvrMqOjZTm0o/T/wa2UlyOScgGWxnWVZY5muWl1Y9Ejd8z4V37qhohRde0SNydYWoLEwDWE/glxQstSqiLHrdu+Q+4xFlRfCZJiRmsXjDP7LHRwUpqu8O86f6V7QVc9bv/66KAAdtR8yb4tsCu05ClqoGT6vE8rNRJAjxxrdr+pbIyFNMlaCfCuWQ5cTG41MY8lcFfWgUmLgPczwwXVKPJxGQPmR467mUfC4E7dvZ38e/ZzjpV/qvNfMDz7kJbQALyKFsFuxlwbBxAg26+58RK8deAGD9pcFx+HwbFzXuIRM+sK6AFLf1MgPufBnT3j2qiyro1DRPGNUy6fhe+o0uWSSmdIgHuS9N4EGQfW3OhLTzbZcqsDPlWYD5GPAuHtPC39b40rGFd9YAQ9f13EevR1xZjPYXZ6fLYzWM1UDwBsBddxdlxcLpUqL6kaQsZwq1YWf63ShVuDx1QAezINiPmMw6XYJJiJ8s1EqA3ZZ1IQ0WDSoyi2cGYL4FLpKkV0vN+JVPq6MyzUbOCG7itdzMvJbvRKCfrVItKDIOFcAJ2VZQnoDeD9ahfDFzOCkK0mB+GDQyCMvMcLPK6Y9PARrN1/KNEy+zmInriz/YxYJtRqxmN4cxwzI8sMlVx0+nUDI/cz/CAVuwhsgyP2jLNFbXjH6/6wkde4KgtdghMwRUjTkb4Zcu/vV304k+dIVq1YjcUpHZmR30vRre9USB0LjCjtXdqv10K4dNRv3aeuoVheN7FMY94A64xWtmXfQyaSChySKqu1d3vxxTXwZzcD2C2teuSW1kG/uz0sAd X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b6d8d70-e1bf-4ec9-acf2-08db7e9f8d5b X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:34.1885 (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: 509JWL/kZ4gSjjIIzydOhzv7rzqQMbbdEFABGjay+zgsXDHRHZypav1AbFxIrsnTPicarLNAuAoir1rHHHvoCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770733321518793657?= X-GMAIL-MSGID: =?utf-8?q?1770733321518793657?= 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 Acked-by: Jernej Skrabec --- drivers/mtd/nand/raw/sunxi_nand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 9884304634f6..db36bd755b8d 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -2087,8 +2087,7 @@ static int sunxi_nfc_probe(struct platform_device *pdev) nand_controller_init(&nfc->controller); INIT_LIST_HEAD(&nfc->chips); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - nfc->regs = devm_ioremap_resource(dev, r); + nfc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(nfc->regs)) return PTR_ERR(nfc->regs); From patchwork Fri Jul 7 04:06:06 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: 116935 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3015057vqx; Thu, 6 Jul 2023 21:32:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlHP5CTAO/DEyWZOzg+WNm7nC1Qy7wbgEysvqHeE7LZvvd8EQpjIjIRXa8XM1HcOmNlaUsiA X-Received: by 2002:a17:90a:201:b0:262:cef9:84f6 with SMTP id c1-20020a17090a020100b00262cef984f6mr3440940pjc.22.1688704355228; Thu, 06 Jul 2023 21:32:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704355; cv=pass; d=google.com; s=arc-20160816; b=tUhyS5n3VfOldkMoyvZqjHmn3pIzF1cojbNkLgtG0acRzZLk7Wb8jIRtGWZT8oG9eE 56yNAJinXjza7AQOvSRfOPtMvdiKJdKQ8fPn7p/5J3ZhiNFwecTIYsre+7ZRmbW2VrNW uuqBARzepQpRLGPS6R851n02VOW4YyPdYL/ysjnSRYAb4bJhjvrXA2z3//CsjGqZ7Jrl sEgDFCcsViWoxQW5rBETpwDi6qoPHQeVRCWRgk8Sk3yLocrxwv//oBlOVNU7Um5O0zcF G+tp/hamgG/j+3ZlkwvqGq7NnI2ojH8o3B8QflsCzySNaFhmZQgRLCbktfM9Pp8oOL83 bLAw== 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=uOPiujfmumy5qPnC+xECA6xjofv/nI/7adzc/RmsMGE=; fh=hnQpBVcWUEb9AXS5zjxmGE+kSUiXVuFfrU2Axpgy4lA=; b=oNiliQ7kTu9ZHGLJVyKDlRI4kcamBOMH8kMKIxACc3Cy+Aa3TsYDKYNBft6f3ZrypB 3fNEJqyX5ntlAk+n0iYyUtL80OjcHxtKkdgKfcXEZvAUJ7KKolv1/f3Wl4Ek9Sr6w5kl 84VHpA2zcYYfpP0O+VyPNO2/JIh3y2bBSZ5xwl/EYBtghY448gPyyDF/mtU9/foP9hO0 Kb3Hwl53P/ByX4K88n5yyqBXR3IPsY0Ef7zqPyZ46gA3+MuqlgdLZPXQwjo8mdTJzAw+ PHJEYuql/ET6rHbe5f9FSMkahzO4jbWi4OfLuhvS5Yn37oYF/53BKVoTDxgBifjLE6GY q/MQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RCcivcgy; 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 e1-20020a17090a728100b002631f72d2d1si1186555pjg.173.2023.07.06.21.32.19; Thu, 06 Jul 2023 21:32:35 -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=RCcivcgy; 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 S231467AbjGGEGp (ORCPT + 99 others); Fri, 7 Jul 2023 00:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbjGGEGk (ORCPT ); Fri, 7 Jul 2023 00:06:40 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2103.outbound.protection.outlook.com [40.107.117.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5D4B1FD8 for ; Thu, 6 Jul 2023 21:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fWLzjXQOLzG83xsxTOMmtdU+ByBDhg6qcKE0Hd5jmx99AWQqgj2VCkHt4e/sVwbEdH+pbbPRgS0CSlYX1MJ95ztDMo8jLMZe8I26DN2fDfvHjyU9SSnP1Ek1HZU3A8RgcoxsOuz8YViirnJhHBSeojZy/TNOLqjERQQZ3rIwO9BLoB2R3Pq+sMtWJvUgEM9GZbuUamsGVIXvHmyc/9Kzr7fONl3yKvgSHiPq8Me0AE/92QDFfWiMQSfT7bHvGd000qSyPrEWEFabJuDGgdwaZx7OWZvlrp8UiefNP5TsV+ghVq6+Iz9Ta3zlTpUAu4sZpBCX7V36gXohyfoBE74xmg== 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=uOPiujfmumy5qPnC+xECA6xjofv/nI/7adzc/RmsMGE=; b=QhdM0Ph4IxNL7aUuCcMLi2/Vf//4PuG/Lib3E8hamUoe7xLUJw3CeT1i5dFrae8gdS7czw18Fm4FQkTIkI42f2zpQa/XQ+bcAblYmeJ4pnddRFugB8WuQwnEvVxAL8HfD49URSHDrP2Form2PBHE/a8vb+xo/1lxCBTu1UbnT2LQr8e/mcmJW3ayvvKudVsZN2X2VNj170LVmyhvqCca9qddK9Io7sGllBfqs5A+k21WXQMlxHnzXEWKF+dmyzbRqPYyyPTRAGVonJy31J/xktyw0tO9XGKE0PpQvOtH/YUxwifDDOXFqTzQcJk13ECU9AISvXiYGzF/2QbdtkYjQQ== 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=uOPiujfmumy5qPnC+xECA6xjofv/nI/7adzc/RmsMGE=; b=RCcivcgyf3sTtJWCVaU8lLK3c60rPeRb/QSWTqcfEIOyKAIJAhp/N4OLJVMOdWQBacJRfnc9ltmJMsDDJVcyhdQv6Sk00orGeH63EYS17AdHi3GXZfn7k35zbC1qeUCJfpIBuxSH9R8OboV7lfpsYqNHq7zep+7gIW/KORkncuWErkxvbiFlrqK7wu3SfJRJQ+a5XeEgID/+FWdwg9ZGJ7QiCQf8uQoh6OlgoKH3wSRJeLDUfCjh5WfzbxwSnIbNG91HT3u9vAt1HKGoRksbM3H4QswCuQAIgHxPME4OmexKIiWjPWxC53VGWjvCaiCM3FzT/RhY38a6wtR2Ypw+ug== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:36 +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.025; Fri, 7 Jul 2023 04:06:36 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Vladimir Zapolskiy Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/18] mtd: rawnand: lpc32xx_slc: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:06 +0800 Message-Id: <20230707040622.78174-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: f96051dc-f48e-4d5f-7ad0-08db7e9f8e9d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iiumK/UmRsYh6OG8V04MV3N/S2lN6yh+biyfMG3hfqt4/YkRR5CXa0q5qTKvhG+qg9cz2VvZyUWv8mpdmHfil03SXtfkfGWSqjpuKmH2LyYuqij5uqetVp31QR0h46QY2xKmADpDPAciH1g4JFHjws8ZC4pIb6vSphBO7KWtCLFHqW4v7GntYUZP3V/oAFmxq96QCCkavEQXLuNM5HHd12vg5qBROGJl5NPMh1gHj4R8z3EN8zqaVeDWoiQEIi/yxV5ptxMP8t0zFqG2spxePh49j5ov4dwCZVqfcyZnt1RCVzZLYjpwhVDrNtx+6OQgh3NI7lG6U8BhTSq8OM3/c6RYU4F5I0OMMF3BzeM+30/2ndAUWsf2cc3gnrR3rYYJE0n1ylaXDwR6ve6x+49+tKFZGm8/cdGbtVN09d0iDx+deo89P0ImeSG+aWbmBr7+EpDpayj9S+oTFiiAfHUQVwfWVykR9tSXLpRKMHXeG2qpFbonLuOV9cs5r1OkOLAGIVNU7+peFO6eSo9VItEZuqp4kIQSO+GJZ5a3P6RlCPjpLjYs3xmfcSjwwPloTkEURS+04AilIXL4lRyo2SRHvSQKCfDZgV8FmkoFOMyAVfqeQUcKgcU8zJdbyMJyTQxq 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TuLGR4rCjEWuU/sToyXSnXkoZh36krdI35iI0CqeXR3/fQNupzwB9JJdg7fhQ88ExzNxby6eZkDb4w3ThXZCMIV7XL/wTpXt44oRqDModl2XJNXut7zWQ2u/Roe3VJGa4LerQCIVYdZSX55vLSVOAfut698XFJB0y4qb6YWxFmgjTaCxYLMDRenTvl0PH+hfEWcexdKSTv94XgdnZJFiNvUZH5PpWJHGXJkJnLMiWLzgDjpcFRjHK+Sy3HISWK7OwVLGnZ2+B1VVD04YbOgi7Qh95MtamutB0uWkNYE/hBkTagEVfhYwr3iKAABzaNYLDs0EHUzqK3eh6oOxSUu2IfwUrflxpsCZigcReLol1gPFC6m4NDjvBDLQPjpMkwlmIyb+pt/mPwQgXNfM6VIkX59Tn6TqSFJP4phW1cZUxSJ+0QyFL+hmN9UtDEd/ebOmBYf/r7BZ5SN4Hvov2coeGZbfZhKSE8PjOWNkHV1iI53cgDRDRAloUY/3IE97P7MIBpxredAs0QBpyZ1sjeWyF3v6047nFEP+AV0Fbs9Dq61j+A1PXA6QkxsBQic5HgfurQkgCKpnM/bdJ/mnENDxSjE00i96P56nW5nEuWeopp74jcBPoRaXmITRrrARqJ29IZPihGP2T/neBkqcvavMDMdisu3t002tYlPzYT7B5+NKpAK+VYK1kmpHqzrwFYAFrVekLCo8nHhYxbsrXmI36MHJTErJkrnHO6Hd/MNekXC1wA5tk+3p/Q+TKfCjYfAtDJauLh+ec42tQlbNEOlaxy5IbEHyXjdI/GCgtl/YLpZ4GpI2uVz7AUpmXn+I5Axtnp/iDBsVmJ9MtBseV/h7No7hxhkrECfLVSr+wiKYP3QQhqTmKnC41Mx8trBScg31Xf4VjgrMFd85bYzSU5ptyoKLlL+CwvvxE4uDplGDHLJoaQYNLPJlWN82r6j9Ue9vB6f6qH559xG2icNMQc/jXrX1r7Ek3VjMvMBGLP75lUp4lCiXxvg+WfsafdIOx7y4Afv+bbjj7lG7v6HqiXgE/UQeqH/W1fyoj3cGbx9ccQxnv9Mn2xP7s3KKhg9yVNV6u1LxOYSGXa3hEKPj/OuyOdIazDfqXxOxfMnAUZIDV5pUAi7NOG0/mhizdBqXmYPUT4aMwZxuaJVxOLDVXZ5J8reOFw5sr2j4XPNeqQ/x7gveR6Hq+Datw3hhTj8YrBP2ylVvVOOqGu1egJjZdHvZOhlEepEo+YzlqOcO+Pzj9lR+dvKkuR1Dsucrom0aSRMbBXjjomBG7jlOFpnIbgSUuxffDLk6zTBESgHISnDS4zXI+F17ql+UzU/f8d7AuoxKU7Ojvot9tQBS7BdIuajEsXF28+nrySGMBhtSqwZdIcSiHZTuIfFLAIHDwADnWxciq0ym58yEc+Gx5v3KBoOs2kvb718hwx8/CPiDcjBz2mOPHKSsURrAdvdsYiLntyt+f+olQ/1x9XKB9eeLQ9esU2QdhMeUdeHsF0kHtxg8X6za4IxzQmLqBnvQ79wQcOS0Tl3EaNCWwb0zb0AOY0mAwLqlVaPaVLCMnamjrkUsRjs2wO1EMPPD/0bV/a3mGL0y X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f96051dc-f48e-4d5f-7ad0-08db7e9f8e9d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:36.2711 (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: eMV9aq+JgPF/ioFF/rsFrA+zhRdupc4FBJ/sryIhe3erspANf3EbsyHuBQ+Sg0X+XOJM23gEK39Ma6ObHUE0XQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770734858030427705?= X-GMAIL-MSGID: =?utf-8?q?1770734858030427705?= 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/mtd/nand/raw/lpc32xx_slc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/lpc32xx_slc.c b/drivers/mtd/nand/raw/lpc32xx_slc.c index 3139b6107660..2201264d3c37 100644 --- a/drivers/mtd/nand/raw/lpc32xx_slc.c +++ b/drivers/mtd/nand/raw/lpc32xx_slc.c @@ -836,8 +836,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) if (!host) return -ENOMEM; - rc = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->io_base = devm_ioremap_resource(&pdev->dev, rc); + host->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &rc); if (IS_ERR(host->io_base)) return PTR_ERR(host->io_base); From patchwork Fri Jul 7 04:06:07 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: 116936 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3017048vqx; Thu, 6 Jul 2023 21:37:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZX620sOSgzj3DOKmodDPUn0iLfODlgQJVVPywdjVaiCc6bxvL7ruaFHZ6ysckA1/Vcih0 X-Received: by 2002:aa7:888f:0:b0:681:919f:bf69 with SMTP id z15-20020aa7888f000000b00681919fbf69mr5462930pfe.0.1688704670732; Thu, 06 Jul 2023 21:37:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704670; cv=pass; d=google.com; s=arc-20160816; b=YuvsxdqK1qd1cYo5Aw577pkF8Dxv0fzGLYtHUZ2nELSjAoraQa8no3tIKhYojCCG5y ymDqoEeph9Jx1l20GcEpQdeHET7QCveNYyI+aWtg94652QQfDD3CLOb5/5X+hajDuv8C jDLb8dYvYuS69XnQfGti4X3kD+Zxa6470Sc0Uxqw2h7tUm5Aw4t0qvmIX6Z8ScXnH0St +scSEmfek1D6KCvMrQjq59S4F41QKIKk/yvKUjgWeerUhn1YSV7MYE934SCrbzToVWGU auo7KofKRAnsH1tQE5qB+2A2EmuaMUE+HWzEfBVRvL+2htE5pI/5QSmWT4fJe17Qzawq cQ4Q== 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=ipUKdMlVF+i+Cwge672wAT5nGsYk9M+cH8Qu2fYtoc8=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=yqCt+a1GRve+H/NtoOF+vXiXLaGr1J5/tz0FAWyDY26H4vdsVuURc2eWG1tREV4B0K c6jgCp6w9ClcGq+fEBULD6GLudYR7NkcmDGAbewleCeNazd9TPDwNiCPJ19J2837QLvO xxshxlMJYxsS31UncfmlTouKMp3qp2V9pW6/yC7DuecD5O0YfhN5+S2jn5GKihKCObyh jt391XzcIenKNojwJlTZjnuG7jApmDcufGoMs45z/W3A0TZv3Gf6ZcRZRHDphH3NFFMC GqmsfHOMpK/VgfSC5u3ldThjGlOcPT79HZgzGXzpUJoCvwyGf1D7MRTo+mZji3SoQi6E Hj1w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="Y617a9/n"; 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 cu9-20020a056a00448900b00666c9148d03si2922530pfb.6.2023.07.06.21.37.34; Thu, 06 Jul 2023 21:37:50 -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="Y617a9/n"; 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 S231773AbjGGEGv (ORCPT + 99 others); Fri, 7 Jul 2023 00:06:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230130AbjGGEGl (ORCPT ); Fri, 7 Jul 2023 00:06:41 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2103.outbound.protection.outlook.com [40.107.117.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBB2B1FD7 for ; Thu, 6 Jul 2023 21:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iq6ZUCQ6KzGF1jUOdO3UB3fzUE+ltEdAGYLzLgraTL/E8FCe5rR6bQ5B14hJlmnXHD1Zl6rzg6iKHg5Yhv+9lI/l72dh4M5xW5+p3mmuC/dvSmr+LvQOhbUsTFsPzfhLXI/AV2b8QkYwRJbEaO2FAf8uqggx43f+SeUEsXIgFI4/VXrbeSp6ZCc+41gAWt6dPjyg0Ov0/ZONVYqAMJAvdVpsp5S19d8fBa/xv8BcU7uVyooJVc+7Ud2QnUANfm2zSvU34j7+swi6KwOHB2J7HEau9HMoNqZNGws40cKqxfH5+DBrhT9qcKppAelzElUkXEj5RZhKX8T19lLrG1vIHw== 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=ipUKdMlVF+i+Cwge672wAT5nGsYk9M+cH8Qu2fYtoc8=; b=L/141FFx+/xbBpbpmuplMxpDb48l5esBDlR469Vzis5ZXOU2Lf87KXOc1kuTysy7tbYdr+2mCwKmHOn+wbCtIRcavyQwiLW5KpzfZMs7rlyyq6vJvaPAfh9cDjHll4afpNrCSupftrDr8sp3hsL3iBHKSG/Enyrjp8jcZmAfIyvSqhZRoXLp9hdcP2cHSaMfNWPOpc7OqhaqgN0oIgIQf6BX8fofBkseDv6J+wXCmyk6dV96KLc7nQKpjy4kJEOa/Yrmct7mgHXr5xsA98SB+qRfXbQwdGcG3FitCw0KYTY/fVWkGVCpEXCJwkdu3IUISOxArhug9hJqvii3T5xzpg== 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=ipUKdMlVF+i+Cwge672wAT5nGsYk9M+cH8Qu2fYtoc8=; b=Y617a9/nMhE+p7J+PViNEyBBuxAOhG5wgYdbvekle262Zdv5f8O9E/rKF/OTWTv/492ntyVDfJQgmh08Kh0C5V2Ua34AcYPoiImIHahrz0BbcGQLOk/fo2WqT8lIRnKw+jBQ4EHmHDVCPP7YZ+nPM3B7CUsW5Onm12gTkSoC7R777qZZJQ60xJG3bJHeSWv+Csg2bvdqkhaTW/Vlm52pluwfjLYCCYZwyLMnpZ1fhr/zfcVuyg6E8pvM5DcwRvPO7FF/ek/UxtCsWaGQZ8af+66Ntc2yvRnyL/fL1XGpmpb4oUKEou+ANBRDdmrKOPrRQStbsOSmo43KcLxvK68D1w== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:38 +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.025; Fri, 7 Jul 2023 04:06:38 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/18] mtd: rawnand: mxc: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:07 +0800 Message-Id: <20230707040622.78174-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 29b62914-ffa7-4811-7434-08db7e9f8fc7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BXcewIYhCT5SBdGXf7eTrqDHtmqXZdCrL8cn1cGUwJCv6oNTt2tHY+He2Y0QzwOVDCsk7Oqc19OlqBXlw46Pn48SNBND/vtcrLomTwexpOyjYfnF7344P4NLfKFsKPQqzFpRt3kuju7XktXQkB6iACUXrDwIK1ag+j6H3A5GzHnA+nOwlClP+sJ8YJETgo+gf9+pA2WR2MTHsaAFAxYhvwASM7x25JFyrLCkPuV0FkqhJhfAPNaZ71n2FmoKmnCZ5w3x5EAGrWN31aTvNXKjQxhZxElU3ULYmJ9jUECyWYuF+jmaK5m79HpHTS+EGzzRDpnAWjc6K+tghg12IXi48MYDXcBKKekMn0v5UNv+uMRtJmUQEP1zBt6b7TNvfwwk5MUG6GQ68zTtdxDfNLFDzwS2dkURpjNyaLuA48uOsKXuqFMVKvXV7Drf/Vp2qTyuMKcy9vn+qbs3odHPcNdJ55Qu4ll+l7fwg5cksOrkIJO6yx4lFHn2V/qy7GgP2HOLFJVavCxZxrumGc87W8F29JbZlqx604L8MarqLhcLrBZoSE1WElNSOPWObNWnSgu1CtTtgEyCZUpWH252789bsHsb+QaCa9SmBjgDczfj7m5+dEvLlY0tOsJ/O1DP7up1 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uD53sLu830oollqJIbL/ItoltrZiWGz3EHwgc5MuE/Vm1UiWn2ZIPRECc+kcLKg/wPQXLWmR6JAF5P4CoF30jKNQt4/xlJIxfJJSusksiCWcyPexj+T3YwsPZxBGHSivYVaqAJpPVsMM+NH8wCZUxVSSfnzO8xRZ+9NMzmMkIzsx0lsTlfucTt6V5N1RTpOvJ86OZ151RFeA78yT21eriP7Aw8jjlpU4SSmgvDVH2WfArH3TtKDK8rJyidEbatUXfktUvDG6fbkkOJ6hOdgMkUs0DpdYKoPkKH+rCeMBBBfPO+/mn0ZArqiE3KMjtYLL+TysfsjuSGt9odiFAEf11eU2mQa9mi7kt9hO35gBQ+/76VriTF18ZlGcodtNTnblELdaFksmKF/U/hFxzwQRetZofKpVCBPAXoMfsvkuQPmP2ocKO4OqU/V8Yv9rhUfqzg1kRPhYHGs877jFZ254rQrPrjcgCVxurpGYEjAyajkXhaiTWb4lCytN32ci6w11KowYBh7snVID5psAtf8pW4qTPjjHMF9FcCC4FeI2dPFyMNtsYJsCPrPlwE5k4MyZnZvavO9Jyb55tQYNGSEHjdrtBV4W3lDJH+EYY0WzGJvZjbeNTz4oKfNkfAVbwtHw5jAZp8vDsTI6DiXjTsR8NZncTxn8Y+IdWeDBdkyXhcuc51u9gV6BpLjWrPIXIGtB/LQLnV1oYy2Fczeuipix+KSToGjsq8/99mp5DwWxpjRSdGBSUR2681wUauAu/YvnHVV0ftN/qMx/VmOQVn4ptyqUBA+v5psyMHzicxdUnMdpoPJH+H9kMxbfw1qEUS+aQtiIMT4Y69jokWaz8/TVNAoEj2oYK7+4pnaLrMTZVZKowjVO7etK2CebVLv8qK4DKb1tadXU86BxXTWMo6FNdPSk1fGL1gHR4uNolwOQGc2KqsCIl7k2AGcfqcUc7Iqc7rAZpZ40OZ04eD4y1o1SP7gfAi7oXVXFZHMCVMLeHMlNSlg0IY7zcNqX4rWEjUpBrMN+WjPWM38ywgMLq3aLMPhw1xM+KrThTeaNiPthwbsybP1MV1k9YC+aeCBOuowOanciu6kGTwl2GT9XglDuvvAF4VFAlQB9uCWTbdyzQ8wlTSReNl72IkpU0UFZJpOM7pZzFOiKgMKABD7srb6n4fB6gzo/oWeYhiJDiRVXcTsSBKQls11OFF9Vk4G+x4XfaVS9eVIyovZoh1QvenOeyTXjbr12SrDbyn6YpADeN5MlqMTfwvx/d4mS1CeEP9XwqPhr9OdBNI6pUnv9on8omLpNJumvVrx4DlCldnaS+R+4b15OUHPghG/URQP7Ct3gSdp/LLJPgF6oVKXiogE1WO+cOU6Ylngvk0NpmZ4YM/JvcLBmrT3c2qgQQwHvsQ8CxdsGDPlOv+HtWKk15BSdIoh9KuuuBcsgInv7urgoxm2Trdf45opxWuNNoS8zHoXJg0ELxJcKgT9t3XjwoELbyEAs5kIPju6GcfXvS2BRE4kgLnKNZnxoSA7NCmRdYuk8BMV5TWA9S3NUxT/SjiJY1m0SCs4KtdovzS01veUIC9R4mRtQHAJ6DMjslLb23dQb X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29b62914-ffa7-4811-7434-08db7e9f8fc7 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:38.2013 (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: rwLne7y8IAW4KsMaQ7Frynd5BQ0YdST44/ZM16tWUXEQFID07u9UKq+vetsQt7uuGddTFrnCkXkO+miBxFg9Rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770735188723200692?= X-GMAIL-MSGID: =?utf-8?q?1770735188723200692?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/mxc_nand.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c index 3d4b2e8294ea..2f8dcda0f435 100644 --- a/drivers/mtd/nand/raw/mxc_nand.c +++ b/drivers/mtd/nand/raw/mxc_nand.c @@ -1696,7 +1696,6 @@ static int mxcnd_probe(struct platform_device *pdev) struct nand_chip *this; struct mtd_info *mtd; struct mxc_nand_host *host; - struct resource *res; int err = 0; /* Allocate memory for MTD device structure and private data */ @@ -1740,17 +1739,15 @@ static int mxcnd_probe(struct platform_device *pdev) this->options |= NAND_KEEP_TIMINGS; if (host->devtype_data->needs_ip) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->regs_ip = devm_ioremap_resource(&pdev->dev, res); + host->regs_ip = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(host->regs_ip)) return PTR_ERR(host->regs_ip); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + host->base = devm_platform_ioremap_resource(pdev, 1); } else { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + host->base = devm_platform_ioremap_resource(pdev, 0); } - host->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(host->base)) return PTR_ERR(host->base); From patchwork Fri Jul 7 04:06: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: 116940 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3018139vqx; Thu, 6 Jul 2023 21:40:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCqn84KJLofyBiTLyNVgssKAn6O5V2LtQ+BRCZwthFpcA1ixOVFVfguMVxbMSqVXifKH33 X-Received: by 2002:a05:6a20:8c1a:b0:12e:7fc9:5c44 with SMTP id j26-20020a056a208c1a00b0012e7fc95c44mr3157517pzh.14.1688704844609; Thu, 06 Jul 2023 21:40:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704844; cv=pass; d=google.com; s=arc-20160816; b=j9fYId8hHb02gUOoOeERz/QkCjW8zzShFW+hNSS4CA17h40bt9zwMRD2WTefWlRdZM d2JPf491IAOjgrMf4McKleg4TloxbysHZ5s402J5bBNan2+/BfKmk1zcxzpMzoWgWqq/ CWgXGqWZjuh7K13OUrIPeL0Lu3dfWXaJPQL6hwhM+2TLMTUwPHjzSRKsJ1sz3hc0PZZH 1P+9QgY7X7OHYKeEIpUxuwNLJNFKogRUIXadqBK1UlM1Q/5MOYu92DoIkdjBR0DP/qza WFvf+eG4s7gd+0EoAmdPrW4bBH0RIpzNh8MVnlpp3f8AVcp0apCWdFn55oJH2suxjoxd uYRQ== 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=KW9CPVjpjNwBilYdO7l2jc/rsyVj9Yu4udnRwh901K8=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=bAchtt39zrBJj5d1QKLWg8zonzYUrjEDrocJ/YKvwvhfFjfJMvg6x2hQGN96jvyrfv a38HGKLsSZSKhRuUhczHTVsSHfb6/Wt3J3wQe4gYEfNx+q3JYwE2NsthjVqw05vHyqhe GZDiQmZwz0ISPmcsNLE/UT4ZH9saz81dA1kMGNBPWHYeCCcs609G3Bcnq/VuVNPsF2IH 180auwWv93RUaDpemaZC79Clk8Ik8ax2Mc7CyRFt6Em5+pkgF+Feq0dpWQrFiXoixJRF PRk1FdCZapj1SOq7Y9jTYJVlpadJN9VHcyRwmU6QEOju0EH7FZ7LpyvdBSfgifQw23KS vXdw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=D+cwlUNi; 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 m12-20020a170902db0c00b001b9c3498510si656543plx.469.2023.07.06.21.40.29; Thu, 06 Jul 2023 21:40: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=D+cwlUNi; 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 S232025AbjGGEGy (ORCPT + 99 others); Fri, 7 Jul 2023 00:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbjGGEGm (ORCPT ); Fri, 7 Jul 2023 00:06:42 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2103.outbound.protection.outlook.com [40.107.117.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BA831FD8 for ; Thu, 6 Jul 2023 21:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H2iK9HNCwYIWZthKbeOZ07NRiL6ZgkntfebdqAQJf9YM76VueRIKQD0OcbPUuEV6m6IC+1Tx2DfUGwqpK6RLC9Y2X9axrw1a9q7NI58xOcG4dOrp4TLpuAubbljCwQ4IOM2OMBjmaeEzJQEpYTMaX07lfFFt7N5W8LFwgCgnPTK4PSOc1wVw44w+m7kSbjkIjHa16wkVa8tdbl3nVoP2C2zSzJTqywXi3MImi3b1Z8HVqCGsEhj1pJgI71DE959Lq44m060o/D99oTaLYjQ5+MSS+5lM4sah6vIVQoSMlWn91sjNG855mw3/McDJg4s4BpffkqfwfDFnQQBDKdXXTw== 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=KW9CPVjpjNwBilYdO7l2jc/rsyVj9Yu4udnRwh901K8=; b=gDWDltraHIJE+mwMB3votALiII4gVOFxb0HQZrQwJFRMlhoTAZWbuxiNL+/9UTxLkBS+WOqABu53WKWXBJZ5eVOek6xv7EnSp92eAUV6A6+HLoSdZ8FOTFfASY/L0beTxwaHgDygBhAZESMYpGfdHWMTlLu/PjjYn4EeVIg1H3058O54qXf6I9GX7AKsBq0G8qW2QdSy0zemiHMm4zVt8oMhz8gWaEPvXZ+iSu0GAc7gwinkFKg42kiLZ3fNBvnsjNA4yYHt9HL43+g91wb+uH+xAQRe3hhze+d3xNS4835H6dklmFgGW38HrVVQcTibcV/cj4YzRILanwyE0SEYPw== 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=KW9CPVjpjNwBilYdO7l2jc/rsyVj9Yu4udnRwh901K8=; b=D+cwlUNiiex2VDTZyaSSZz0riX4eWoXoctPouBzwT7P91qH+QlnGfNTXKGSMDs6pY/ocYpyqmXxJfJBWu/MIUj7O6too+pkeSQjbFe9mryu0EEH1W3BL95AioF07bxa93OXXKBFsH0Tb2KfZys/usx55pCSefCnZ1aWMnzkGR7Z8WzSjxMPmJ++F2miKOqi2lefVpeYJmgQlN41v4Xvskk0ndaRg4jH/1R8MTzXIN3CootT7Z33z2b32YyTWkLlUYVM/Nfo/+gjjqZTUwBSzRFERcYOb3ufF/1y8+9fJps/IXDerk9GIZ780d/1IzSOpvwdM7F+xF2qdmLg6jp4F/Q== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:40 +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.025; Fri, 7 Jul 2023 04:06:40 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/18] mtd: rawnand: sh_flctl: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:08 +0800 Message-Id: <20230707040622.78174-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 86bea49a-1b09-40a2-641e-08db7e9f912f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nbv/acj9YWepplY9C2KwWfnHUoK3lhU2JPX1rV4etAsDPJXcnUO6uy8q/4tarjPOlKTRvTfIsr5YTlnGnZb1zEO+marsKvYJm6lXPDNORVMB/TMv5rXf6RBjgnn+5ox2ixjTHScsJUfvH7ratWE2zY57ASDLQIwIlf6adl9bLVA9l/4Qk6/vxU0uBy/4HibtwQKtF6410xCtZsTbiP9f9tlQw+NSH+HywUX7x3TOEJeAYxFIEpkQ4YXH3pvN0EArJXkaHsD+uN0P97fw5c+U27xLOez6AvXMaxu/zyYFVQCgibuUJE/cCJ2BuHEbmirKlQ7zRr0xjwZTCt8jLRCNpCxTxTCRgyLd0h5juUB4lX+K3QlGsajdRKOwcNEAormzLr1D2GA0GCuKR681wy9EweBTSnv4jAHPjMYFDFes+c/Eq0oCg0vChjAyVCt1QDhQaAaPCmd9Jqr/kehdvQog020QjpY/+t8Td2s0PLTHFZOZzGQNu6tp5b8RY2scfU06x15Fmv2UKrEWKHXY0lRiYl6nH8e54U1yrjKeOiM4bxMlLG2QcaYFKAhCb2y2DxVJihFvOmgZiBgWQKaAwppOQ+4SrajsSMaKg2s3GQG0m45KPC0UG37v4jC2IJ55xkbv 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: e2gCSOcOk9OFJRJyVWD7mMn1FWp356IN3SLAwZUVW6mN5uvLWYVNmkMSmq4uRGfyQCbo9hnIZ6hESRXvMEpT7JR9J6EMehqnLfJPMJZ3hzoWeeSECCU8ttECsvPPSDdp5Nz8c8DaEhZ0jrOQW6kjjpvr8iWx5COkhp9JFj1b/iOSw7mJAITGs1LBEmdSGcWboF1CG6sTxGUqJlrn7rMQUAI0VE25JMBr6s6EyXbNOhWshTMgH6MWjSBVIIjJbrVgdrrSPhO/451QgltCfU8bhiqX+/+vT35c0xomODgjN2CUn0/XrNOxs2W2H5vZF90KwS8UTYisFOLPLIZ/TOPoDc0/Pyb98EMDDEV9honAA2j9BY/JilWqGCXyfQ5mR8TrxBgIDW7XJCUZ/KpJR8X70ySzoAZhy07IgGChUQQ8ubRGBXn9e6BKWvncF2Al4mNsupiE34H4E5LB8oSPtrs2NPwPDWjG456dXDVY19XXottU39Ly95oJCjbAMlJzLKZbfYCURb9XSGEk0V846qrQqyO3+6iNYUYf6ubeJRxqbd2jlPUhFnBA8uz+K1rZ69X6wnyMu1MkUYQoVoH4fFZjxZBdvG09G/4sOTjisJl5/jDJ9d0G/QuzqZ2JPX84AiKuCIq5CArNdCw6JyfMPpIC8HJZgAPBcNHOMmdZnuTX0F7lf2XxuNvkmlRdKtk/z1KUoXeGblxDtEPXN5c39SccRXwnFRKMHvKzb8v0HJ+sWKdRaAqQxEGalsJ09UPHQEcdRzsRbpZpEMTkRAsb2c/m9/hK76Su8yJ/HNhC6OWRs+KClOTf/orhoLn0i3Z5Oy/1ng8ajIfTe0Bm0+HuxBAV9rrQ/3ieoqGW7BpMcnYI3EcPShPVN0wGek00Ouk/UTh7uJKslZ8Pk5zclxuagVlGGPg8+2gPUZlJdAVfTrnTs7E9DrlDZBdJnxu8DLON3YorJEKkxJAxRh9JxmO00QMsNF9yUc3VhJlctnhH+rLr6nQlNG3egY5/ymNah/R8vLgehn85x7H75k+S2bQSpnL9lUg/5Hv7+MJu13ZHY9Ki6o2u1EvjN+XIt0Dc6xZ/M1xm09LnGyN+4d8s2hItqi3CBwN+GNUurnR89gMlm0fBpkeVSZypmbK4cK7UiMVRKfGgI8m495QoYg4liEXgCyftQ5KQDBtS3bGutWAD4D+1IORdGKWZNwKZk+ZNZo2cROZM8PcNOyqsqu9MRw7eSeENrSysvxR6Ugi591Uh58CpkyVmFkdYtER2H5Om7HZKLSQ7FYaz2om6zLuBIr7wNHBd0EEOeoyqFKHHzjKmXGxgl2h9GpzpW5Zl12d3W6qqLlUpA2S6ztZsY9vBwF8AdDXzZL2Mu4jbruYV06sdnBIk4nsdkJUgy/2+xN1K1zkGNuYPLmHzbdN1GA052zVen71Y/uHK1YTgaUVpfG0VXxsh/OCaG7zXGqwwCnd31gfCYbqnqzqWTUwBOJoMVEeAPOsu2nYZPj3EGuMNU3LByOyk5hOe8u8xXR6DEaHc41xPPa9HwEsSOddl80X4r+DqhP9k60Mr48vIVyYYNnm7Nw03t2WOCW5t4++wjnhm2BOcBBw/ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86bea49a-1b09-40a2-641e-08db7e9f912f X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:40.6125 (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: p8xtbfpc+FHtaisDWqWJ9o6K11LWdemr05UP6cc3EtjTWECtwguM05VHAt4/iHhlnoNWysyg6cT/5f5KkZAbPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770735370966310150?= X-GMAIL-MSGID: =?utf-8?q?1770735370966310150?= 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/mtd/nand/raw/sh_flctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/sh_flctl.c b/drivers/mtd/nand/raw/sh_flctl.c index 63bf20c41719..db243b54c953 100644 --- a/drivers/mtd/nand/raw/sh_flctl.c +++ b/drivers/mtd/nand/raw/sh_flctl.c @@ -1124,8 +1124,7 @@ static int flctl_probe(struct platform_device *pdev) if (!flctl) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - flctl->reg = devm_ioremap_resource(&pdev->dev, res); + flctl->reg = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(flctl->reg)) return PTR_ERR(flctl->reg); flctl->fifo = res->start + 0x24; /* FLDTFIFO */ From patchwork Fri Jul 7 04:06:09 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: 116938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3017799vqx; Thu, 6 Jul 2023 21:39:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlEFCJyv3hueEiXWNEC4Q6XtEwKeGgibWTBWmx7MkXw6fxFmeZkYC0ywhRw+WX9Zn7ZIsW4O X-Received: by 2002:a05:620a:4555:b0:765:4330:6e6c with SMTP id u21-20020a05620a455500b0076543306e6cmr4959803qkp.55.1688704789162; Thu, 06 Jul 2023 21:39:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704789; cv=pass; d=google.com; s=arc-20160816; b=kM9zCvohrmduauXsZ4Vl+IWMTaUxOyiEsCyBV4OVKQeuVXdRCZVr71tu2AR3pJadTS SBOC0terzU+MxEQv+leGATC+lDeTjCAGOrrVU5J5F344fLBMoPnvbXA8F+QLh85qo7C3 /kqd6qsdEYqiW9FdU6mU10S0XBo3Tw4msHKIlDVoPIdTeBeZHY/ZVAjQynqgufip3wlh CX+5HSsMXIsjhzWAfRwiNz22S8JhQ4dlyFKbo9kEM60MokS0Z8+BjKcsn7/HbEB0BLY+ 2YpZRHCy/Rjxmoe62r3WwAn4ubTkPS4rQXIyzC5LR7D1kT5zPCVUbnonMj249ArehYbX tFBg== 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=udgfQd6/i/Jnf6563xx3A7VKmqOwhDuQSXcGbPkVVAI=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=pohGj+sG/AsQj7z0ITa3arxqESThNE2ca/+YZMB65xXMHdVDerblDiHssqjFa2rJCU SNhOEq19Qhkx54WvB/DhQj0NK/3u1gRAcNX1klfDYgZN223gfIjmPfE6ltKZpJN9zM1z rKforDRC1VBuFDory8jbJc6404G2z7fszUGMogMpQTdCXO2PBetqx+MS4waBBTXywCRd DtXcG6N2ktU7OYSKw4AYOussnlNtvLXd+RXALbOlGRNih/5L9zKhgof3MWOQMu10xIsH mmu+j0I+W9pcx2XA49q2wmL8kWEwHXm4VF5PycLtpdMHBTBCpSC8l+MpJaHLH8SvJhVL y8uQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nBzAi1q8; 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 1-20020a630201000000b00553800fe4dcsi3029596pgc.583.2023.07.06.21.39.34; Thu, 06 Jul 2023 21:39:49 -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=nBzAi1q8; 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 S231921AbjGGEG6 (ORCPT + 99 others); Fri, 7 Jul 2023 00:06:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231636AbjGGEGq (ORCPT ); Fri, 7 Jul 2023 00:06:46 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2136.outbound.protection.outlook.com [40.107.117.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 697431FD8 for ; Thu, 6 Jul 2023 21:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TaIWcN2YVClXp/ssjUJ9aPnigs/9f/CgOGi1mid/iKkytQsuh4NF5XbCyRvLwKcfKZvD1CMZ93Y76ewf8e/Dk2zx9shf9nfQF8a+V2xa3dj8KT9eCL5CpI6djMQ6MfleVcUlit3auprv11zlJDZrIod22K4BkFytkatYJJ4xUdiml8tCeNfbNYbXxamDA0n4rPcrjDcg3B06yxeZ7JZt3pbT4hD0De1oSSRIHd+yQLlbbWUxQvKIpJWn+roYTb9rIUb6QSONzgPzzaSFH10buvwl/j7rOcstt5bEaLJqmATxQ25f8F2od6mOFQ8tqOii+YW83JX5qjP7abojNziCqA== 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=udgfQd6/i/Jnf6563xx3A7VKmqOwhDuQSXcGbPkVVAI=; b=EkYw02CP5TWyE0W9jcI3Pp2xcCPoo7ifiQZnOXGPkovbJFS6f9GubYMIdEZkmcLGogXtsHNvRoLAZ87eEqnFlScnxrlK9c98+Y0n6wqcO1ZMPrbS7PjE9dDc0CdTWEzkTd6Y5o0DdmYi8Q7vD9E/jvCboLZb3dnzkwVMavscbEQOi6Ig/mhnmq4yyLAn77kyYBuXbMgG1YWBNPdv4ZweIFxKMZCgdUctgXLnvP3GJWMd3B1VVz5N13qfontkCcZ51HgRaNgGNLvpT9EN+hqxByJjVLIgs/R9Vg0y2X6ufJXmPuVo52ic0oElvBJ5L58/emrEuDczZUKpj5W13a/1cA== 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=udgfQd6/i/Jnf6563xx3A7VKmqOwhDuQSXcGbPkVVAI=; b=nBzAi1q8C35kdC38wcxPy6LHsTiKupiNG3gPfEIz7o+aSyKuvcdYx1B/+8CM7aVol5qTtAYTbK8vKTP8gkxOGnS7i/BrZHrVoGuv3noSnyGl7/zt9AqpyGLh8simOjHsICQ3YdCkbddxSepm+K5qD8WV5JtiFLlsC4qiDrD8UUA6axj92P67BCjQ0B8JVhZjAgDasXzozz6Yk+YK/3q1/z9ZMQPKCPlOJK+n6QaxfMcTSxoZ2NFTpivpbNGYuCv+ndf/kSHTpaYbmPKpDu7xZqffu8JgBhJk1tCCETW9jVkmegVwYUmhjshWsHfnzBRPrRDyziKJ3ev3w3LyoCFx+Q== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:42 +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.025; Fri, 7 Jul 2023 04:06:42 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/18] mtd: rawnand: omap2: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:09 +0800 Message-Id: <20230707040622.78174-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 10b3e078-afe3-4448-ac0e-08db7e9f9248 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q6xP5/ek3yYfYK2KUr0dFrXGWzG6biQT3X90pMISYr/jutme9fHLpPXedXmxhMjAv+f/vRcNFl29ktFyc6Mq/9ZZ+icJ3PA4sBnN5HRO6NCSqy4xp1YWiUse+J9l9kJQvTxbRhzFENvPVDe3p+eG5g21zQXJstqxQAnlC8QiFli5QjuVuEF0P6uHSbtO4Nbj0bcMwXjJpQn0ZXk/EQw/+z7uQ4FXOD7EIkXypc6zw7OQB1lh9kOl+qkL4RWAxUjB9Gk3dDtCq35C857hJHrZfy5CxqdhzD6MRE9EmHbXN8RS4U+mls2a8X/ctyZ8RzoVHVtR4b/E7s8a9YUrVYFymjItbCEWApL/E1/IFZWVIWtH7pFWZd0HBmkaCRHAo7Vkj5NgLOEvVlseVPJcl5DyhdBm9DQTK4vOKZrrpXYOLeVzXJte3QZy4lvplMGTOj8xMvo7MESnz4Ijs6Ff4nPaChx/54sk5DBF0qY61L++XChuEmHTBVjGPSaFJ1mDI6K9CrcnMhSXP/+1z7U5WwR4smW1w8mhM4kXnxPWCIn/gSM3yri2I3t4mBvOtr6hDsyK/nl/4iuiJMS0Ad0oAK1N05RTRJhjz7uZDqY7lGlGvosiGt8f995pkh9X51NZ05xK 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Qv2EKrlOvEwW1tWIMbZ3oiqeq6+mCKv9uIENu2RlQpJvL2osa+H5U45J4nxMAo1eHuWZ08Le0cGEy2GRHCAMu0A0FRaSFwRNtg2A//gFO/jLML/RacSmf1pZ0C9ZHY8G1lzrrovXNc+WgMSR2Ozjd9mxyw7mbLeTRkVKJF7cVBRkU0FlIUqS62BdusYBRWRWjh+qKj3wTKHLyxEuEAdvjgmP/VnMltCG3XfB2WhjDLUjmCeRjb5VFFHaAKVeiota3pGl+q5GH0IzUsLvQYutvv+cnEvNrOGASIXJoijVrbR2WBdV6zeQALj88WAyoYzKJZS7u5zKC0Bu+DJD04dsjt6DRLpxnGQFmoUjfc4KATv+m+TZn/5EN8agU7/YLlyC3Xk1YD4ZTpfDwbVMGr/yOFEH8AQzXjOa8KADtC8xIQbo46050dgTy+m4Rq76nazPPB353MnWZ/IvMQREjo2zKF8Gp2XtMqxbUdRDy67ecA7U8A2ixnd457jVXYhBEKZo9+rTemNZN5pLpoY0ZNTm8dxtaKAOW475o6VFIjGAqkEj/tgrEbCZ2RG0gE/4788b+eu2FxHFVYIT+fJQIhKoxujwB4PoPzcGMr+kG2bW+6JwM/8Eg+c66152gkDDEa12lgYVhV7WJBYdGtmYqgwOOvrOCL0efaRNx84sp5ZESlqENGsY6yHMsU74WinZ2abtBxw+KeRuHZXFyfaHYVutEgo5eRcqF5o4tGP40cA2dwSSS/9z2njzqaUiY9T66wzvDeiTWqJFl9/BD067Llh5ND/u9x8JXFsHD5vOijMzVHnPkDtLrokeUFP/5y8OFRC46VwT+M7c8OSDMeI+wtIBkYu2P1xtaO2FVycxTasjqV5lUeV/e1HEpVIOaBKcyA/tcaIwKlENEteNa8antZ1+Ozvi2UebHbkUGswX4EySH+ZuSQQ3FzftZxo2rFmvaIk52b42DjcOgDvkuNQbU+wy/asHbfUK6/0+823FzBoR55mIuPLOyRbEifcMjUFKdjWKYFXLLXiNLGZ/G5BnoVgETV0ZdGxawg5VxltiWexzYlHEYVZ/YC1lrVSj+VlsYQLtsqSqA9N9mNKOvHEMs3PIAoTUNj6YTiWPMntGFwJP5Zijt0/msPxJVgiocLLgOfRApgWUv3dazynQMQphonPu4Ukiu6DtJrvHVsF7C15tBKXuTADHfA1h/kOn1t85dS6Fy4yQai7+JH0OERNc+E81C7Zhy4iCNTdp7Hg7TjEatPhE5SyF00T+Nfwpw0Y0C6+s/GFNbpC+DRaOBKDFWCI2H5+VGucuyaEqPHomIav4tJbaslu6C6xO600kN9Ax9ywolVwxiJwxJa3vMr0+67qTrV6GMHiWiUJOgoSE60xawH8/aU1qnlHbgXcyBBWnuWfD4yDYT3JAB3hqxRWO0HMPg7Qy8vcxL7MSlOSm+AcDEKkFnIl5aJbE3Htqrb6yRk3LAlfwEQs0wSI9hCd2osOCu2sfT+i2EBSgiVtImM+uHjGVrHjWIvohwnLETEo7rrjZ70O9ohzHiMQKYGvSziB2Iq1cmhp9j1J5tByEbGqPp8AeTw+4w41mz/MhG+itWIfa X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10b3e078-afe3-4448-ac0e-08db7e9f9248 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:42.4326 (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: Fegt7WeuoRPiWkCuU/UdFsxs+sijPA/npfE6+vxIU1l+r0y84/5Kgtfvfeuw2F7AJhmmmo5DW7zSElb5zC3BKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770735312937748229?= X-GMAIL-MSGID: =?utf-8?q?1770735312937748229?= 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/mtd/nand/raw/omap2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c index db22b3af16d8..277d16f1e0bb 100644 --- a/drivers/mtd/nand/raw/omap2.c +++ b/drivers/mtd/nand/raw/omap2.c @@ -2219,8 +2219,7 @@ static int omap_nand_probe(struct platform_device *pdev) } } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - vaddr = devm_ioremap_resource(&pdev->dev, res); + vaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(vaddr)) return PTR_ERR(vaddr); From patchwork Fri Jul 7 04:06:10 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: 116930 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3006539vqx; Thu, 6 Jul 2023 21:09:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHvgOAy2UHwLvF+unf+wd+dCk+WylsResHnSR01c7c0LHOQw+aBGzxQfLgnG6V7rIbooM2/ X-Received: by 2002:a17:90b:2350:b0:264:91:4acc with SMTP id ms16-20020a17090b235000b0026400914accmr3039871pjb.11.1688702979438; Thu, 06 Jul 2023 21:09:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688702979; cv=pass; d=google.com; s=arc-20160816; b=sxlUVuA+dudH/xd+O/DlmM2VmKdf31jGeBlrZmr0kCqUu/M9hMjCIFUofxzVZSs1+m ZRuadBtiFWmZ66YNkppAR6giYYcpKQpNqjYcEEX9gUNBHr7w/md0by+gp/iZ7w2jmFTj qK7Q5ZJ636lKs6VNtYLQS5i0EbwyAw6wBaxkAG7t7v9+xNFkbR//bp/FiJQhXr63ExDi Yl85XizetJ4BD5Ldt233O3Q9yHuPf1HLMG04EIMofd+vAzcU2vLT+7PHkv8hTHly/bVv hPDQDeED2NHW8OTOuIPlOZmGu9DH5lik+2MwCYDYc7HBa5xA75SlTGQ1fg++889RyqT9 THLQ== 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=p7IAxqoK3HZOSDxI+ilqyxmzxnz3zNr5yZI4DBv3+5Y=; fh=3wNOcNc9eA+740A+A3BdNuC0+/zIm/i/kjWVhmNDgqQ=; b=TXYnyd6zCcz8Zde+o03hW+yPH8HVzW9t2eonVy1GJoIB/3fso+yzSBYs2pfhr9cV5C +rFxXuA4OmtaGVQEZd6uHZRZzH6WvBlCvbJzvmXee4J/J3zLsvqXhgdEYwPZxMdC+ZEZ MPLd25y/bUPbHMNkKYeMrq7m3ZiI080TVPSddJuP8ZYUMcylBDrePtXuzeky4PPqpqzB bkVLQVI3NlmY6GOA8jy4Zz/rN7NLA6kTsdVqV5/GnWNb6n4Z4eIL5fd5Ap/tb5d2B0SE kO9xuR1AA1gAiOkLebsFUjlhCcfj3QaFqNsAejDThBWQn4krBXjfz+PfDf7iGapRSWmg EEjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UHG9NW9e; 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 l4-20020a17090a72c400b00263dee6d04dsi1164321pjk.126.2023.07.06.21.09.24; Thu, 06 Jul 2023 21:09:39 -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=UHG9NW9e; 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 S232108AbjGGEHB (ORCPT + 99 others); Fri, 7 Jul 2023 00:07:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231654AbjGGEGs (ORCPT ); Fri, 7 Jul 2023 00:06:48 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2136.outbound.protection.outlook.com [40.107.117.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3D951FDF for ; Thu, 6 Jul 2023 21:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CUxfnAojZioz1txl06B2F/wewG44QJMIuWeR5rHX7PiVyPTDqUckD3TpMV9IECMakpZf2wAPTy3pNJ2EdMNdyLD7OUtz3+c0aP0EIY3Z3r6ryFH4YtxpsIAv0qZ1VBnR0Wo0cXQraxpLFK2T98qN7aJNqEAHWZcnPXkt6vGJ4gHGacazkJ0zMmyEjjHtGlLMfwr0N4Vy/paYU+CYw1fDyao0zSzhfucocgMPrhjG+ihiWcc0UyLq5pIbp3OKawbLgZb+ExnjBbTjPySfSPSuCqL8pCRmGgQaqyNo5M2vOWs2P37kriD4z6amEi/9QJ9iAc1075zpFt+UGt4rBTPhdA== 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=p7IAxqoK3HZOSDxI+ilqyxmzxnz3zNr5yZI4DBv3+5Y=; b=QpI2p5p6+L4FnsOy/aQ8JUmnn9tr9AomMRDKQ4vb1zA6MD1GXhuqQFTkiYmMzJzZLunJ/id/+J9bkBq1hCerFMoF00kBaohxZR+8Tc0BVitNf9+/6BkLmIB8jhBj3U7K/3DjxVbHUfgAf57mryaLNnVcLJwMHP/lxIyHuw7q4lIm3xawxQfct7N2cNlgm0t4fqMZrAyX/eZX38OVC3tTHL2Uc/rnjK8D1bYrFVURKTSn9QDpfc4+lfiWTI/hL8CDigt66pgloXpcpr6FF5ArIR7uwWjy1byfV07DFxHLGwfhJ3sKFTyJ/yNwYFX6UrwHLlGGlKcVs3kEbGFfO8urRQ== 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=p7IAxqoK3HZOSDxI+ilqyxmzxnz3zNr5yZI4DBv3+5Y=; b=UHG9NW9e0k3+l2G7j8VLweOTpB3tu8GcsuOR4aZyueVEXIguQrajLKtLnCAvb5RpBW+RVGhC7izf3hkPvfSMml/bB8Erj/TCCOcVman2VGbTvBE4GUg2MpoW7BvBbZLtBE8QusNsc6/t0LUddNAM+OMoVCVrwbpnrzGFm8kuukh9IIgnWSfj2NcDR1PPrxRYEa1X9EoRh9jXc8wlc3h8siWj3Me8sw6NyqtVJG+X3DtIr3Gi0QgiohOfwC+XDbfY1UzaASaSEiNnNbZ6SQSXP5kKcZuoIwjRcAfmcSH11B+aeQ7Kxito5bK5k7lKbNcQj+srrQ9mIB2Qpxd2cRtsXQ== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:44 +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.025; Fri, 7 Jul 2023 04:06:44 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/18] mtd: rawnand: stm32_fmc2: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:10 +0800 Message-Id: <20230707040622.78174-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 3db9a535-d13e-474c-8be4-08db7e9f939d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IBWtA3jI6rnDxZb6lrR73kAJN6p6z7pmvbGDRFzFggeJJ8yxyC6WnYaFBVipIcD8Zu2RimIf9jp7UtiQxTyL2KzMycsXXL1B8CpwzioiV+x/kEftRa4n6zAx7tlAOI04TSigDfCkVeBP6TKKp0HX717FEuiq4lLzyJa0KBKlLuIOueGV5odWpdq/5acf8Wik6mYDS4M2qeA5wbP2EoLEh8KGfXBhvPnhyr/xlX++8Iy/36EnDtEsx+sfnnq2QE+Izqp8Lr/18ndcqo2dv6lsrTW36WG/Bap0SGfLbuzOmFZHEkC/TSvoxNHTJEpQaiv1ZPICSi6S/84Fig0VwDIFn2ecsz/YiA9pmZUrRUG3CqRaK9/hDI065jOcCgW9VNer6fBOvsxa/vcOoEkhI6MJVzDzuKANN2mLk6mHaOC0WlMmfDL7MNYtsLHOPoHMzGuF0b4nQtbg2GMHH4BhCNCeEwrVjDRS2kZcNM84kYRAZD2BeO9FMOxApD9Uog8sPbK0dvAdXZAh/u5PiZHK6hClqViKdBJHVyZDO6SqxQKWUar4l6521jLI+SC/i2UHZdp6JCijO82dQGfXdPVDtKY8PDzruD8HWsu5qQdx2XhM61GUE3h8I/Jxu9yNN4NufuCe 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5SsLIPoBwpGZrkdm6R/6lBBzvhWPs5ZmWHuRWj6TNrtMrPNFt8YwI8lPXiBsG3TzmV509o6/aqq1sBr8c1G24Zi/ECyo6yOKmVflejL/c9DQ4lE9oJjnGIeOcjEumm/4MOfi8opeqoyZ2qrLs5eUxbnbnva0ZI1BvWFIKCCy5Ik2RcK3rHO/FPkHW1x56+eEQIZoi6Zgamvoa3NDXhnRwXHqQEI5ccqk23cgDbCLGV6IYjICQz8r6MH9nowZMT3HDD49dD+6YWxP08tRxK3zceVF45tdpWAtndLLJkOCGYcO45wOP2DF2kg/WXwudph8DI9txdApCatSvJGwHRwVcZwOFVFTlS0jPDM2fZRRn83kmN2NJvhXZ4B0xH2h9IpWoKxXVZcJFXhyzoKDwzCmKJOs77/TTZ8qTOX+i8XM11JxgKHVO94LcOIJREkwLp6LVu8T7D2FpgTKja3r9VDLh63WGDgsahTceK8I48yN5QYvBWKIqZfJQxDGU49ItH5xu2I0NOuFThRNiNsS3Rd6nTC03uqt7IU1oLbr61jiNViMved69VnI+qYZsuSKf+PtC+MXHvHSFoB8u0iywW7uxYiD2g8colhs1pQqtryyziKLVLDBpFotpdc1lQe1m6jZFvbgF8BnmUgB0b5ezhRIO9jSLP5UwqEG7YDHirISJip0b5q+h+b2O24P55niyiOa51sgfUYNWrhgW+cxX0fhqx1pQhZWMcgm4bUx6GPVcjNjhR8LvnDA/nkdVCP3oGCWmu0aZDath8QlfL0ZMwsk2q6r+Rd3bGnLgqCrkxo8EkPT3Fh1uydo5sYf67FYVCdlbT/lJXBh+FFrdhVcozKc8aV/e+PmQ/H5JyaHbJhY362P85fXIKyUqgUSSp1pYb58oi8kn3TxhrB7UF4Aitjqz/3aMWvgU58dqnwD4GrT7ZT5xBzPFliRQedBlitwrWh95E+E/6GHUxUnpX6lnEbdtpWE+QX3piEp+dGpYA2SEfTNlTG/SMn9L5rqdmeR4Tny1YjKtbIke7ww3aHghVJRAVme4FBgUP29tNZAeK+uqHbKIk97e8y5n56u4c2Po5lt1H8h5zll+ZLWZCPaP94x1HQ4/8DXiYfisVzNiE6vvU+uaHxq7cmsCeM1JTV5d7QtvC+hTY6yFcGKrataq2Z3Hv3Mm7JEmbfFFqIhpfkU/QcAzqAxUZs77Nec2sA4KlBmmB+ABZH+qA/f3rnoAKxeV4JPO9ecxHRNPpJn4H4sFC9uDVIgUkznwQpYU4BACYLEA1H/C3H1UiURO0vVn0/PZySLmFNzFyMQRSXrM8JM33abrWJSyfo3EzOmfBcv05Oy8ggc9ENABFkn6ulF3pR4uq5GZcKhiC5gurIiC6fn1T/CHZTsDjT1fuT6MOST0BhUrA0hweinKGEpxeFgG8zg/Le/Mwewn8MJYeHKURKaRwt5HqFa5G1zFYVX7hEykMs18guEkAvZZ1X009q9C09zFrIITULgGe9nrt0JaMeSQSA83F/7yuD1U/E4/kL4g96vA1ZhIomzUPKJLwT7MrTpkjsWa0CC4d5xsnW2kcdEjWy6X5omZIGPSNcw+dpf4G2T X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3db9a535-d13e-474c-8be4-08db7e9f939d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:44.6558 (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: Pu6D3A2C2rYWjbfzee5HLOV+OdE2kuu6Y9yI6Yu2KU7DofOGFqAJRnCzMoy99jlGncwnVEt0gx4cLI4Zuo8Z4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770733415321417244?= X-GMAIL-MSGID: =?utf-8?q?1770733415321417244?= 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/mtd/nand/raw/stm32_fmc2_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index 10c11cecac08..2f9e43f64dd7 100644 --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c @@ -1922,8 +1922,8 @@ static int stm32_fmc2_nfc_probe(struct platform_device *pdev) if (!(nfc->cs_assigned & BIT(chip_cs))) continue; - res = platform_get_resource(pdev, IORESOURCE_MEM, mem_region); - nfc->data_base[chip_cs] = devm_ioremap_resource(dev, res); + nfc->data_base[chip_cs] = devm_platform_get_and_ioremap_resource(pdev, + mem_region, &res); if (IS_ERR(nfc->data_base[chip_cs])) return PTR_ERR(nfc->data_base[chip_cs]); From patchwork Fri Jul 7 04:06:11 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: 116934 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3013026vqx; Thu, 6 Jul 2023 21:27:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlFNffrJHs2N40Daiod0aLs6hY2500XgTPEEeKUIWodHOUXFNs1IeoBgdEushaTZph8fB4Mt X-Received: by 2002:a92:dac7:0:b0:33a:a6de:65be with SMTP id o7-20020a92dac7000000b0033aa6de65bemr3761768ilq.21.1688704043553; Thu, 06 Jul 2023 21:27:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704043; cv=pass; d=google.com; s=arc-20160816; b=lcbnU0w+neDAsIWjqFstGizrLtiifX0VuebV2i5rE89K7i1R6pryJHOfHuJriqHe6M fodfNpnEhH0PVf24TyVf5LJa0jyi5HF8AfSlp5tcDCZ8H7pJyKvjzfy9sOqt0QmSe5Hk 8e6uyyVQQEq6LcJoLwk4dtkWwuDem1QzIHZJ6Smx7akladMUMwZklAjtZqxjgxPBwsMf hVH6ZZpcKTx4X3gGTngaOyOUM2Y342HZ81s9n55j24ijuOVWikbK47irDzUpABo7X7Fz HkcY/+6XBqubTjbW2AeoHrvjAK7WjWjz52mCiuMVRqtGZVFYtqIrauvHSq6KyTyYRQ3q UROw== 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=sgm7eE2bmKEI5fpeOmzp4sqjc2lZD0DlhNw0jAUyOzI=; fh=hnQpBVcWUEb9AXS5zjxmGE+kSUiXVuFfrU2Axpgy4lA=; b=F1TvesBaEPx13mGm5g8gy0bQXnzW7hSEK/feuaqhHOuSc0xjDRBMhP4hBSXvaycSFP 549f2HQeWZ6lIZnLPeiSbHsd2co0AcpzEAhCcf7eYWYuCVmLKJBGpB6LTTiTUisNDGW2 Vj+0JPhYxLee7w8IxU4Ti+3JzqT7OPFLeb2OuvSPq2ONL580/hy81Ry06jO6O3iEQQWu Di4QDJ5rFUyP7B5y2ijM9ftcZdbxP2sYSnX+rRTGRc4TnEnBDY3VwYhvakUXFf17IiZg qmtuxglImKj9LKoDasi3tuP1RC3V4HsBwlXJ1NgMtHPTVRslfMLycUwUDCCRbkoo2DaC mCqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=R7lFxEbB; 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 c7-20020a634e07000000b0054fd06a3585si3037818pgb.158.2023.07.06.21.27.08; Thu, 06 Jul 2023 21:27:23 -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=R7lFxEbB; 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 S231991AbjGGEHF (ORCPT + 99 others); Fri, 7 Jul 2023 00:07:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231895AbjGGEGw (ORCPT ); Fri, 7 Jul 2023 00:06:52 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2136.outbound.protection.outlook.com [40.107.117.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EA421FE5 for ; Thu, 6 Jul 2023 21:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EdhbN3fS2E5q6N5XFW5tNpxBzsAVlVVaDDeUOMN5Lh9u4diqSnl74RyDz/8+JPNNqsdIGYEFAlrla0amD+2OXubfLidNbHIphwTlBKF8L8mvGmpyGv8DobKFlkZcO1uXlIslYfTPXX7vzFDhBtgV0lf8cgB7mSR1ieFo0x8tvumZHx9BwwC2b2Joz7qyLSNfNW2jJm5CCJ+m5Chae1Gz2AZVsKfEjZXn7EeYuzpanOu65VINlf3DA+1xfVaO5iIEGipQnkbKZDI5RvmpPPUyaMLsqYPKtAEblEKYy4XSGr0d75Vvd7c7VqrAXL8BQTH2c+ozmr2KMH0psi87x4dy6g== 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=sgm7eE2bmKEI5fpeOmzp4sqjc2lZD0DlhNw0jAUyOzI=; b=NrXjW1ShELyOlghPggHOn2cpSrXnM2AdlMyPScXiUefY83ucZsDEP+RaddgMpMtudSH896um9yKVEGWnNBIA3rREQxXPGkTjAzhrHQTVjCT/gUPjjvApctr3BQ1Vn1D03z07ybvdf5wiXrvNS80HhAqTWvpVhYiWZUrldzlK/hMa1ZekeW1X/hUcsmLpI6u46NjzD48CJqLZVrHTqJjGb2nhzTBMJ2zE0UHet3e+eH+vJm0z0kvRNaFpkmHhR4ejOy0LtCj7fRnJJeEOHP98XKDewTMyO4yNZglHsUmI45OcfOebyYrfbKOfLvjZvC6b4AU5IK+w4RpjWw0Pqm7FvA== 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=sgm7eE2bmKEI5fpeOmzp4sqjc2lZD0DlhNw0jAUyOzI=; b=R7lFxEbBuTCjdyuYXzSPThVlDoXzcQQchCxW1Q+ZyEc8UTyvb7cTvQuK1Qve0nr6gqQIzV5CiQ0hZlHrm3h+MJKvbNiR0Xww3sade/fz494lDoNzR4ddcDGU1Qo+dyq8oWShkP1mB7tZTg/g3f0yQi+qvYiPA8Z3JA0gwtkXJ/Jn22JKnLNGgdBUTvf/+JIkzBNl36dHmIBHp9OD27bCMZAlPsFwboB0J9AxNfpLv//fKKBNbwIQYxG40Pk9GxnGuqMfSoIOTiB93EN45qaZPlVinx13k1qxOW/QnbUx2BkkZSAYx1hGM0uWITqZBnJw7GyQsFDaWrpKHmFVRyGk1A== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:46 +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.025; Fri, 7 Jul 2023 04:06:46 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Vladimir Zapolskiy Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/18] mtd: rawnand: lpc32xx_mlc: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:11 +0800 Message-Id: <20230707040622.78174-7-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 615bddec-fd8e-4f6a-4865-08db7e9f94cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NLSpasnDCy2t3lQ8+0S8/w2PHH+UjcNH1dT+HwaEbm2gUSMjtwc0WW068wkUAY+3KrpZfw+aWvrFo5lJMGdL9RxFgZalOq3/LQVHCLcZRSSfxPnp2bF8fTcxv6w1JfyBIdyV85MqnA6Ya8dj/jcrSHTzcKZQVPn2VdAf7oZIbV4WxkcIpYcSwraaDzBw1ITaFVRypi2cKQica4T025pDU0yaAwgurAK6ceOb45QOGvO+h8QVQqvlT75UprM1PVx0b94fB9SN+ZUHxIOIX9rC8niB8LHUjn9uztEVdSj/ln0aQ6i6NPut2fPjaLWV8dLPzgEtZLupyL/RIwVMbiPoelkWqxGMG6qcPs2kqnIkOMNWvA/K19eULr0asO1ttnr263WYuAIfB+D+G/zLV8B21lH+cHnhvByBDa4dmDjfVD4NSTSY/5/h2vbo9Qhe9O3l+tLcJQ+nWdLGghK5tOZ7OTKSqwsk6I0D9QraP2jHGiH/rIe9As0rXNCAADh03SJIS30iT//2AM3N9o9WRxI1U12Q18KFtqdIqrdtE3cAcp0KclT40sl5/mQ08wmPK5LN+UmK0N3avHyCEzMFOYQaneh4brXUoNz73N/+HaxqaYEsx8Ox3skvEyAi4LX1SSsW 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: D8SnOpo4kQqf0aNCirXSU7R5dniL1myJIYG/sxzgvuxKfx/qPTBokbb2Y6PeCqp0wtxjd5Q0EPaAQEBytqTGLjGqz+TuZNR4H1TMj54/CRu88uqOFw2duwmXgH7dPcsfti83CIATtoXnmjNY3+7UgN+2FNrr2NOGUiJj4trsecez774UUg2Sax0WlEguPMue9sUzXoN+2PpCbtLmegUtV5dKByniTyektIGeu4nChKZQ/UKYydpq4NccvK5FWa13+m8z6DwEZyDa4CJoOI4gjNQjBGP7wlBDcquH8jt31dZVhZyzLz+5uXeOWjAeEo7gu6NH/LRlsL89MEcZOaV6XWjOEYw9kNtFok5xbcrYDf8NbzyP0P2OrBpWi2d7WMI5tcKFsAo/8ZJ8q9NkHrDYACxQoah7cAlGCoccCR2stJ2pY76MWuAKlxd6pM9oTAttCBnbRYXttWlyofv36CqSI5XIJQ8nUXZpXHy+Hz5QdI3EdWfqOFjw+CsoAxX5lNmOyMjB8wv8gB9kfupe5KOdE/fZKyFFTfcbstVo5WzOIbZXjXWEC1b8va3GkO1rnMvzPBXzKJK5orKxZUKsOmQq4eqQmqaEKkTkoPdT52vPb0jeJ9BM/xaqbDR+Q9JDBNCyMR/mdlDrNBFMyli2SdNuKfFkS9OPEzrCkfIEGR1IXHES66ss9ByysTIPyzLigM4nUK6wQeiKIxlaAounUTwaFqA0DiDVagm1qUrld4MghQVOlkz6Saf4uxgZRAfDv98nlRhJTeJqnaOlSo2HaMHX8yRcGyDzTn9eiIM8MsuU7awYZIhU91OQ3qq/S/hK/K5JZ9hdCAwvDDwt+/nAnzwfTvCOEa7Q8sb53t1QUbRuZLLrEKvK9QLHwZ+HCowkQW2nrcWFiubsaL0vXzCjS4XX0GkEi7pd6q3eZ+6l8anPt4IlhlAJVGS6AMsYI6pCQ6+2K2gRbU7wHTL/OHGeF6KrqHHJ1o46OLZJPvaTukPkU4cH1vylJdykCIPL/RsJz508KzJ5SRIY4q+U75trDvARwTHLpdKYogJs7t6LjRfkNi2laUKmQVsl8C7AxG2sEdzhlmK9TDCDClChIy7V9tg3xxw66cn7JeULrk/4l24Jv5abHzOf0+cHaa/yTxq457T/KcR8BTe9Ejt3fnYWZ1EckPP3F8pUPeoKqBejC1u6L0ugxIVBlnhfhweI19LfZHwgU9rcbi9cvzCDN3eUHMgtlAGJGvi6Nh8v7WtefkERVx9ClV2NHv/rabYpM0jGC2vWb3iGNFA3pZ7I49S6ofLqs8CSzvSB2hOnfUKm9LzzoEc+YclRszb4XR0t+2gJa7JSgpZ5dRMyMYd0CmP5yJg3Yv18LcB57fcvwBAzeHWap7UZsxomSragooeeC7PGXxUs+MQYfoBqU9jt9RFkWOs8UcR2YAIqXpU1z5EcUU+4XpcSyrpQLjiE+bw0JYu8MKcrXF2EcPnD3brXomZ3UeCr+PEU5A4QY31qbxUob46OORE1Ipfd0Gh2inX6yW7fFfTnOKv4BXzH9JdjE6OTaxm5Az6gALuloEVpqG585rYYMT0xHu92kVARlpnJ8tQQXpxF X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 615bddec-fd8e-4f6a-4865-08db7e9f94cc X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:46.7237 (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: zeZuty42X5GDQMdNttLnt6NU5nrllTEUUOuRGsQp+m5jQPGKF1cDPd/75P53MJxrqDekrE+jGxFRqvu0lEeO3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770734531130889523?= X-GMAIL-MSGID: =?utf-8?q?1770734531130889523?= 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/mtd/nand/raw/lpc32xx_mlc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/lpc32xx_mlc.c b/drivers/mtd/nand/raw/lpc32xx_mlc.c index b3136ae6f4e9..488fd452611a 100644 --- a/drivers/mtd/nand/raw/lpc32xx_mlc.c +++ b/drivers/mtd/nand/raw/lpc32xx_mlc.c @@ -695,8 +695,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) host->pdev = pdev; - rc = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->io_base = devm_ioremap_resource(&pdev->dev, rc); + host->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &rc); if (IS_ERR(host->io_base)) return PTR_ERR(host->io_base); From patchwork Fri Jul 7 04:06:12 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: 116948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3022119vqx; Thu, 6 Jul 2023 21:51:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlGrfPzOV0HZnF+91lpv5Q4CC3CxdRERlPrXsc+IUShzaJN5vM14kLfIjClGFk5pUZlaow3G X-Received: by 2002:a05:620a:46ac:b0:765:5415:9f19 with SMTP id bq44-20020a05620a46ac00b0076554159f19mr4732700qkb.7.1688705489522; Thu, 06 Jul 2023 21:51:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688705489; cv=pass; d=google.com; s=arc-20160816; b=s1VoB0q/GtgFcayl+jREQsGAAhTLLyAx9yhPqP5HP7reUyGZJv3bB3em7fsyPRAR4y nNneA3vtM3nR9XH1xqTYz2HzgC7SEUsa3oHjaGj24SG87aRGZvomsNrH+OdxP7W53G1x OEUfYlC2+/SV+r2d82jvzG6n7x+FhgRcimVmP/i3hPj6fmLd2l4xGubQaZ+P+kzSkE/C OrENHKwqlHHamHHiZU0hUkAArmi8I3zvaNY0SI7aXzufJiaZkkR7Cw1QxeCCQHGwwJVT 5qc+0Yeai61DzHdRRxv99lHIzmtQDzwQ5j3b9+roicykjH4WdL/pZtcp23gdOukJMOcG vMXg== 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=oKvDbD2UhnuQuWo1K6WXRj7t6N4tYLBRnZSfVSh4zDE=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=bw3oG57xFsgm3+Hig+DeYiqAQDXfoFBy5e187mjIFQ5Xu2l8xMW4jRq//e/qEJBJ0Y 5ydhtfStAtqIoVQl6iQwVIIBbXi/3SmLWjvouxw/LIMbITBx5u6Z5HvAdqft75dxOQ0r iF8biRXIC7feFOnjtj53qTjN9PlY3l08v3WAcnJrVjKBV5levQO+lQIOZRotrz6ZqleZ afIZWSeNel0mne1K4MnvfV/IRvHJaHkZ6fx/NI4AW9Cd5fnaPR9z913z/uVh95HgHJnj W0OyL9ugk4fN2BuS2jYexARB5e1K9M3YAvU7BY4i9bSjmJM5NrWtzqGPolkFI7ZjEto4 j5yQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FASkjbtn; 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 ca23-20020a056a00419700b0066a48cbde7asi2887252pfb.190.2023.07.06.21.51.15; Thu, 06 Jul 2023 21:51:29 -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=FASkjbtn; 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 S232265AbjGGEHT (ORCPT + 99 others); Fri, 7 Jul 2023 00:07:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232099AbjGGEHH (ORCPT ); Fri, 7 Jul 2023 00:07:07 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2139.outbound.protection.outlook.com [40.107.117.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2DFD1FD7 for ; Thu, 6 Jul 2023 21:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BYa9FCTr/eE5QdlZXVuSMcNSg0aPnmf6Cq7esY4cewnDbRKmKT4E0IwVheK3m/V6l5Po3nhPaynBGuopvNPih8Xk9Sw6wyw1OX9Sen1j9rmNi6iCDv5gBmHK3fkXnzOwdqu6lWmaTGc4oKZT1nVbCMSGltGDTVV4NsyEZV3y1OHYDuMPeSoVfiFQxOswGxIE/hfqD7T9Hfpxc+QmhMd4+HfRbcRYMdAa0Cgs4pW1nXfPdw1SzGpP/fuMFw4USkJOQxRdUekg27bjtzEOs/BLu0DHCPXH0Hha7AtcA3hFv4Oh2GSdYRMJv4nBonmlrX5XdMVD2QFMrF+2kE7dxjkctQ== 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=oKvDbD2UhnuQuWo1K6WXRj7t6N4tYLBRnZSfVSh4zDE=; b=GA431mLMrvx7wudr+5b7evimqhDpmn2L71gSYWpoRAJoqANMwo+cgyjh6h+2Wjns+GIS19T+Ict6Ryav8pdYec2ofVo8JP4wasD0hjkYggRv2vLG79ey5EzLx9DqHzpyhuwUu5spYXAatgThZ0vNpO0saC+Fexn+NGa+4Wq6fdhLthLIvIq1lKALxApCElKneCRMLopmRvRp2knSlmvTorupbQWefxpwIVg2Zyk6NdCDXel/+GRb/1jmrlWK4CrXSgzRNwbNwMGUKKNxinRVwP/TzNW05q6jIEkda7AIfN00RpHRIfvEcibEGxMcG5yZaJ8Hz9hxYYQV3wE5Os7nSw== 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=oKvDbD2UhnuQuWo1K6WXRj7t6N4tYLBRnZSfVSh4zDE=; b=FASkjbtnbAaC1ukWO8l4ROMARBZYR0vkie3JrYUpjks00PG5pjE1RQbK562gdzi4nvWGR3LS05wVn8IRvqgQt7YHmP4/L2uvpTsB3NyKKkz+lgIJ8eCUQkVeKTdreBL/eL7eEF1OMZWa84agtqnLjvFbJjxfAY8nRlzgmj0lZ+eof/j4zNweaHjrhaxJrLg8eqQPNY+NXQhDy3AkC4TVJk4EsF/j4Y3A0r/jvvguBougruWzQG6sX9AVDq8DHDr7n4mTvvnUaZ4WOZ2/dQ98lFaYYzaJ6nN9cUKcUKdVvOXS5YoxfP9WZCJs6dXlIaRDf+Jq+my8epXlhy73SIpR5w== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:48 +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.025; Fri, 7 Jul 2023 04:06:48 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/18] mtd: rawnand: fsl_upm: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:12 +0800 Message-Id: <20230707040622.78174-8-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 3857dcd6-276b-47ef-1ca9-08db7e9f95ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rFQSeAspfp2lDFKlxzMlPhTf3CbT70KjF/itr0/ihT9zHgsBBmvOvMHWUZHtpX+h8PObOqACrVj3RRSp7MuRadLHFP3Cv69TCKmYRqLbtwJ1I6n2P7qyOG9RvVmdOrgktO+rGBqRR8fJjIwIDkFx/jP5wRPsyW3BHa2jZx+BZy7slfJK7JBp/p+3IXptnW/L+xkk39CKlnyIKnf/DTG4GJPKZVyIXXceNkbCqVV96Aw3YSVa/AQYQHNj7mZaEVz/q1DedG+pqp4wBkb/vk+Tw+KL1JYM6V6xRUhTf5Om81aMP8VIvE22vnxPT2QDIYLIf2lwli1yxogo6K8qvC+V+8KUYdksL/3avfg8reqtNdo1938mGGomsuqRt0cqqfK/l6Ccvc7ymu2lx/hH/N34y6biqrzWW0eZVXHdWSZIFPCcsz3aSB1CDZH2fqOdg8ODWDSdNNFgpEDMB6Ay3KlsLzZG65KIrn7nBpIIdDDTfQKNVeyF2zhjgq5ziBnpiXJsC+l+yGSs5hMsHSTM1X64HUAwZS/wwNiE5UO3eRlR1NlJcJ3JGi0zSsxVJjSnVjcETYQ++GyQdigQOGDMxCUeZ425VJslTQgysMo3/tRNTGAVsoewUtktWdX3AJ8BvxaW 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2+91pixTliuzBm287BEnS41LFXujS71RJmAANe8oHAoazx6U8JMg+MZKbeChNQlyf2hWxj7qMsQGb4Ik4GsZFl1AYx3GF8pcaNhiGE7BI+DRRJpbXOPu97uXuoAsUa59rbLjpj6zHIS4V4IpCkDmIk4YCOtqXVqi9xVvwD105PvJ4LPlpU2w+hDm8z68zb417l3lYmq/T4Zbtg6SGXxVPRSxAlZBdekRtLCmI2Xpr7o3E70yFfKmzl5WqpBmKYPc5G436CKgVGI7m732wuuUaWAlBzUWeRhlz3tk7jYglkCyFXJJRMTvUYIQF36ny7HQVlZbG2Epjd1PDywcjqowjG1zefSVLBUyb+s2wA5/rb5wwFt6vEzDj2crs6DD0V90eB+BE/WQWgQCAFC4GIUZ2fuyHc4AyiT2PlZNv7jHorSZz77jgt23fP5OW2NgTM9DHALC3iz4x8XVsuz/y7dTYBOdD2yerIecVQATunAXzxUao4ZeAljWbanWJuDxVWyM1tu6uPsb+9G9UIPWsxUPZKmx8a45J2PCeXTPRJ4ocbfuqqoznel4G9MDIrEJQvRtdO4RYjq4/yoYDAy4GPK0X7jC+Ns35rlI0WcELhPHwmq5H2U99sH/BaG9Z9Eo956xgjwEa3+HaCCazNO35aZlaN0yz5wd8A1Gin9Mx9d0K1YjJKdGUecEa0bQoOcNNZApNvTJd2PZ+vaVNh6JXo268XQMv3r+E0WConaSN3ja+f8LFi7fgkGxZETeqlVP3fi9oI1HVRnLVPrjFVBWLa6yuo72xoQ1Z8rb2GdpxRwldPly/nrMQHnKl/zoo1VMIhjoFtlm9FoLLs7cCWA6WA9pezNjs859FuMjnQMkXdBo2Cuex2HxUrk1O0cy/nUXl0MDwny6me92tfd4I/008YM1RV6U7i8TZRtN7bvoxF/RC7p+emULcqgtEZm6xtg5LEBQ8BngO640QCuM5tV9hu7KjUIzVwuAMr8Ez6GRZDsJjkHodF0WeAUYRkV6W4H+euLN233baBNF/+AvWZGDn+FZSM5t/tBkMOYCIJ2IeyGOBKNnDZLGP87b6VlLJY0ULAWO0UlGVym9I2kO9E4FidJnDjEtjgoGI8G333ft6YSrdC3DzG0Y0gcqEjhNYFlEj4Qa5A+GX292uMWgP5qWDuUpY2zoZ0c1Ku23zELTp1qfCDIIOu8JXWR2zo6d1YlDMArqbwM4+yjMFicnYRbKVFIOO0lztkR1wg2RX9qBQ88id8UhloWunHJt2Bt3GJQJ4QuDE61CvyY3Ur3FiWH6D1slrYv0YIZkBkOBQqMjiCpnXdjkI3m8yPx1iFEkyLK5/gvxQ2vcnXjUc+iphlAyTNKAY0GY0A+PZoj6gi5Zn35ugvEGP1w1dELZYtCbhb6G/RcFwbOqjtN0lLne2gGe0ERzqwHzH1cZTkNh7K8MFs1q1GHvAX0YCPw5ADFDUBoK9PixLhZ/xPaW8lhikB+56INRNTYxuBb3gCcUkVjyYpZmIYc1r6SM+i7Op10AG5//ePKi2E9nuh/J6FjLyOjlBGXjz0LqvHwrp7AfZq3CFV3/K5eNSihgLCF0GqiPumTmW1eq X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3857dcd6-276b-47ef-1ca9-08db7e9f95ef X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:48.5376 (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: 6bmuMV//wz8Ld9Kobf/NgWmQO9I0087/ej25+LwyF7dhO18bvDomWkPWsa6LkMgYBZdyQgId6OXW34xoFWKMEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770736047463031846?= X-GMAIL-MSGID: =?utf-8?q?1770736047463031846?= 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/mtd/nand/raw/fsl_upm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c index 086426139173..f1810e2f2c07 100644 --- a/drivers/mtd/nand/raw/fsl_upm.c +++ b/drivers/mtd/nand/raw/fsl_upm.c @@ -172,8 +172,7 @@ static int fun_probe(struct platform_device *ofdev) if (!fun) return -ENOMEM; - io_res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); - fun->io_base = devm_ioremap_resource(&ofdev->dev, io_res); + fun->io_base = devm_platform_get_and_ioremap_resource(ofdev, 0, &io_res); if (IS_ERR(fun->io_base)) return PTR_ERR(fun->io_base); From patchwork Fri Jul 7 04:06:13 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: 116949 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3022405vqx; Thu, 6 Jul 2023 21:52:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlEKLUCPRSU0JyqSlI5VQvr0rSUhh7Gn1CfifuSHzCIIbRdLFjjYWuJUg547l6BtDk09P9tG X-Received: by 2002:a05:6a00:2d1c:b0:66b:8d48:8e64 with SMTP id fa28-20020a056a002d1c00b0066b8d488e64mr3663550pfb.12.1688705535997; Thu, 06 Jul 2023 21:52:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688705535; cv=pass; d=google.com; s=arc-20160816; b=d8NvSvkZ3yNmnaoxrNnZlCWTPGCZu0lvTWSxVROj4EV6RXg8DujYan6MokrnRfQFxw 6jNU9Nl1XKQfeJrH4QtapNRsczpjxvkTLBiqYG7YlNw9/cHgyGuzaRz8tDelXVAlxLtk ge8Iq9yysN0p5TDhjbXCgbzehv1dRyAuDOZOp8R5W0DgHdNNKymg+xFCKw2TQYZRb0i5 /wjDTbuu+pi5HnNj6TsH3b24b5Co6xJLNKP06HXEEeANKob1ZkN+/Ymg9P/ghRHoUVNZ s3+GdRTVaUsRafOisncDrV1DqocWwgEoNK9+aao0+x5FXKWBqq2TOuhteYXsEWTFnP6p 1ujg== 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=XInITyQsNMj+hfMlycmip1bPjJnMPN5QO36XTxhOSb0=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=TgGAbsIYEaRL7b9HJRFbweeS9WZsJtwn1O5IZP/Z3fcPdDsk4yxjOeuIZXmcA6xJ9B s2MG8y/t1t7MKHkrgdyK1RCco7KbMYlLrfiSGyJVybd1/TsIUJQBg8OtfPR4RhqsN5pg bevUUUeqk3aBWQdmENjorS5vRuX8OL7iObQB70xqeLELaJ1nC0JFNiRz+v1r1uMTekF0 j5xF4i2RI04qt5njahVpPRfNmuSm9zM4Z9k1+oXiJdh+KXSUm5DeNwvV7katxlI0dTGD VcMlJozWO/QKhxAzd+FfwqpJNPUxued5Xp9T3e6pfkMRHVWlFE+5b3/vf7p8OCerXWnK wCDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ObyaVLvm; 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 ca23-20020a056a00419700b0066a48cbde7asi2887252pfb.190.2023.07.06.21.52.00; Thu, 06 Jul 2023 21:52:15 -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=ObyaVLvm; 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 S232059AbjGGEHj (ORCPT + 99 others); Fri, 7 Jul 2023 00:07:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232201AbjGGEHR (ORCPT ); Fri, 7 Jul 2023 00:07:17 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2139.outbound.protection.outlook.com [40.107.117.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 908421FE2 for ; Thu, 6 Jul 2023 21:06:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TZM7Tc5hDkOT69Js88pxqOGaO3PEu3uDjBmaYdEULhFc4evpYOaa+nN/if20TwO9y7Z7oxpzw1KFDFm14Nt/U1+mjXGbey6Hpf16TbtohYQDqBgP3wRTWKxN/FFYU7tnxsc8dx050YghhH/Xp7adHDlf6Ikc35SkGfbsXmB3dpC0X3l0OPNb4VGjW6P/j6T8+PD/K1pBJ95s+f2pdv1+ZpXFWwnW5sHIzOuLV2U5QPEExh90YKNEIpA++l0G/odvAGFqHl58JDNeuSsQolLuRd5y1FLruBSx67CtG8witPNfoxzTOeoWf3q3L7C2l/0XddP7SbskWguCtbC/dPMNJw== 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=XInITyQsNMj+hfMlycmip1bPjJnMPN5QO36XTxhOSb0=; b=PnC33IUE2EujqQSHR+5Jx8FxoYib1hvO/AtXdL+Sffj1v7nFUUGpaMIls+6v8JAJ2MQfmVk5Whh0isO2dh3n0mG4E+cW+Cyd7+94nwtH4Dw63uYP7Iw1s71Ob2zqE8S71RqLDGFm1hilRZ0YjD9jixvR0urKgsVQXW7NUfibw0XaMrAsrMsb87id5UyMcUyyoibZ0wKrYWP4v+VEP7r1vIDNZWi66fHf7wXckYFS/VvVD1SaA0QapseIauHBEnQJbEok6PLQK5eZPq1r46V0YuwH7O/jQe+gU4P60Hx/5Qvg5KsD0Cyh7vsCcDqm55KTgt81h/Jnds6H2JQiiSk9Gw== 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=XInITyQsNMj+hfMlycmip1bPjJnMPN5QO36XTxhOSb0=; b=ObyaVLvmSlVJk21tsxwsMcF0PDLmP8ybuWRmPgAR3XGfaa6QM4FB1kzJuMAfplIM6Xx32FlFHSh4YeuElps1DYSlDTnWKWTlvsbT7PvQj85NFWWifH/NHocJNNrZGcEHlCwkBEIpW+PXqps9XGFnt4JP592nyf/WpOso5umzWRNwK0FP+royF+1a5sb/l/N8A8C0muXhyD33BgCG3Au3Ux+TiRddETgV5N3CCbLxqmvsZHmXXVA3DH97C0FaWAIjunhZZDDR5TSMmhgVcHNmdwPtqa1hESK8e22BokU3eT0qYKP0ZjGlJ+nxh3IQMJ3VXBw0IoOevI4LQIpRXT4KMA== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:50 +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.025; Fri, 7 Jul 2023 04:06:50 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/18] mtd: rawnand: davinci: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:13 +0800 Message-Id: <20230707040622.78174-9-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: a5fb7b64-c487-4187-d4aa-08db7e9f971d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TD2NlGasPM9NTUX0SMQUAbFkYkYpaNyz+BSgf9Rxhki2+f2tkGnbkE5wfh+ILBw3x5gsAHCSjkSDk5GRmsIUnfY6tyucfXa/fzff5LWR4uaHk0ci2t2Mq1DA87Uh7hVF9/o/pYzv43U/gMoK5f2d5xxOy7FDBn0l0P8+Bwb6tbkYMLlvURTRTA4o5Uf3Gm/+ZwbZycg9PWcd5faIfTmHzowQ3Y+zzQNxEV7uoZv+oUJTijFiSTEQPdK6A7cVMDbRmnquJlE+/yiZxpPQUZev28KIExCizuyn2SC8MzHSyObfWP/tR/8Q9ut7ux7981wPlcIwP3VH2N8MxJA7Quw6OeuRKZ/tC/qg0hjCQH3zfH2/vCc0svP2go5DxcYjO873vwM869Mog5EcJWhWOW8st0PB7r9uMESAabapo7gFtB+c7eLUM4sbrobhLpbOH2mrcthpuDEc3qtUp8IXIsSS0DWUNUjoyjeDazDJPHtyJREq1vF/ojsf33eq/NX3qNLnU1IhDAgKdlIGoVdzQNvFJn8MTHEVZVoke910042W7tkjT5PkiDdMSpjwWVJrZ3phCc9+G+/kJ9XJM83IsVmm8WonA0rVl2+/z5mAzZss5S/kKN0vNlXNxApWH92OrUO8 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Gii6EgFVwVGiqwDhZ25MD5k2tnKOyvYLInN1ej+3tlUv6LfELkUqdnkgki+kaXOFA8YnVV/SSdncBn4Je09iSNZfWv+6Z8hg/RwEa6x+XzUBpDT/YCZ2OThd8tsuiCt2FhBOw2vocN/tLl/FPnapEyt8QkqTiCtL/huU7WqQVHVLMR/XkjrpLh7bFmAbIHa14ePytHKo6tpWn8CrqnXmk5wg+f2scdDVpLXkCj3QZpdComczMEKA54Clm0Ahb9cxqUFBK8epMqHKSpCR5ad+RJ75CpmOlAZVzlBc7Yn5UuNqIaCySzCbwnrOcHMP1vj1hDe/4inQlYw8xqa1XCekZ+ZsQtR+6EE6mYx/dpPtEwuPoKXEDf69N6N2SGU3oNoS6VHAOPdws/hL6JZS901rTadQH7eP1LcHG3JfJC9meltBzi7V+hYvmsBU/dRlaQR9I9t2cgPFIA+EhLr4Qm6db46ZXK4uWZ5I1Wztb4RVba6r6OwXYPz+zKmrFMLeL82N+lRehAJHmT/KkyJ7dIMrti9DC7iwST7uX3C9/0Qy235dIN1T1RgBM4C0nT/ybtWeCHcK4pvt+sDug5jHz9kafleiTlEAjQjmRpp7nvyuRamqdcTyTZBIxu6GDC2I4kXNRQ8VtionWl2nqcmPXRociQU01cIWsJddcHHtC2U6Mmx/N/LHzQpSyfagm3uoGZbR9HHzwnxEr2D6skATyt/vxzwpCCDIySoa/mPns5KaouFv6YJDa0w8c9wIcX75mAx60qOEiChANiTUd+moCGDZonlrYEj6riUCyPUEwQeXZyIsCMF9edInvm2BflkbH/G9wLlOm1WZ9yj+VS3Bc3O6K9bQZKxlrWWZps/b8lc3FYGlXw5R33a2gB8QOsplWk0dMOdukrk66pyK0wr0qx+tPhev2wMwzf07MA5dbIio/0TesTQERx5g1DLh/1moUGhywHyI6/KyP1h1AijPtBRIOW5FHZujLWAVS3ysTICZ1TIZEtK+NAlK63KSiOcdA+4HJO9vvixmCKhRgDI2enHSx4qi0hLxlYnhEoo/+2r4HomPdYsjjGKjysPostA6hyNI4fhwv5N22GkiV0fHJDI2dmSh14xWnqHc6vXUT5iBHNo8GH0pfJ95k38JvSe+14UF5eD9/tM+nYyDzkMfWSvgOBHDmgA58lAB/Sl59SmmTNL427eiZq/Oc7nDfbItl2sfvjGO7vc1Xx/aOPOzv9S0n2b5+2raxIxqnKJkFL3Z97te5vWal+b9budPfa1c8wRqzF6hJIgbKtBmAwjUlelJvjawAHmvsqlgXlaufbLkG0ZEIIO3Txcn2mCQCCySlaJNtVm4QOXybj/4Ti8Y+5XXXwl5SwquVOMtXRnjyOIOVbtmY6Nlyae+QdbNF+0dU5ytoT4wKvykZVt1VN+AkCIfXDgiEhEFq5ZKRJiCU2f9BYlgV/lc3peVN71oQS+vcFpdFmhYM/1V8Zt3vgTFikBlUqk4U4vkF7Zmq7+2bx+QLDz2inEKE/DhfLSPO/wtGoHViXJc9gugW6z7Pupfnu4rCYW0scYq1KZFrrOy/Zheduph/GNwgTWsjlFBlv/6zgLv X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5fb7b64-c487-4187-d4aa-08db7e9f971d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:50.4563 (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: 282XpQA4IWoYnJxmCtXNNruJtMKRdMp8sKzYA80b71RqmUxyjFbdRULCSURqL+1so8+tW67chIWqyptzcTnmqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770736095709603276?= X-GMAIL-MSGID: =?utf-8?q?1770736095709603276?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/davinci_nand.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index 415d6aaa8255..2db1cd1d3d03 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -710,8 +710,7 @@ static int nand_davinci_probe(struct platform_device *pdev) { struct davinci_nand_pdata *pdata; struct davinci_nand_info *info; - struct resource *res1; - struct resource *res2; + struct resource *res; void __iomem *vaddr; void __iomem *base; int ret; @@ -736,26 +735,24 @@ static int nand_davinci_probe(struct platform_device *pdev) platform_set_drvdata(pdev, info); - res1 = platform_get_resource(pdev, IORESOURCE_MEM, 0); - res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!res1 || !res2) { - dev_err(&pdev->dev, "resource missing\n"); - return -EINVAL; - } - - vaddr = devm_ioremap_resource(&pdev->dev, res1); + vaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(vaddr)) return PTR_ERR(vaddr); + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + if (!res) { + dev_err(&pdev->dev, "resource missing\n"); + return -EINVAL; + } /* * This registers range is used to setup NAND settings. In case with * TI AEMIF driver, the same memory address range is requested already * by AEMIF, so we cannot request it twice, just ioremap. * The AEMIF and NAND drivers not use the same registers in this range. */ - base = devm_ioremap(&pdev->dev, res2->start, resource_size(res2)); + base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); if (!base) { - dev_err(&pdev->dev, "ioremap failed for resource %pR\n", res2); + dev_err(&pdev->dev, "ioremap failed for resource %pR\n", res); return -EADDRNOTAVAIL; } From patchwork Fri Jul 7 04:06:14 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: 116932 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3012497vqx; Thu, 6 Jul 2023 21:26:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlH2mzuHTcVufOBAo4Ju1ea5bbXVUbWcGCNgk9ZBCDfYL2jN6QpS2wHwPdA2lXzxImCOqjFg X-Received: by 2002:a05:6a20:4d4:b0:12f:b9aa:3294 with SMTP id 20-20020a056a2004d400b0012fb9aa3294mr3441327pzd.46.1688703964056; Thu, 06 Jul 2023 21:26:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688703964; cv=pass; d=google.com; s=arc-20160816; b=R2P/nZC35nmw6P/fRT315FwUyRQRCFdAMoLu69/ye+68Dk4ua0kmfE2YrLUsF68LCR Bygkson5XlZhWCC/uudgdob2WtQZIlM/VMq2hFhJkGxWR5tnCA6Ijm95jjd/+5UMD1Iz Etf2uWhUeHsAY244282ohV4Gv9dbzVNsu4Cu4kVbyKHJTQEwy+SLaMX5zftRakYT2h+I SEvsRVLt7Lfzcd+WpbdsSdp/K8P/WtY0+73udE6E05/8sjGZYWx2yEAcya4bRPlrMOar OD+HtdRWsqlnv0RuSBI6AFytOuI/ygkkEpmEnM9H7VOGJKDwMaAwVQT9N55UafEQ9LJR 2eNg== 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=2q2+f3UaUtrv39e+e3MvLdBDED5EJrbT8+Jgrx1WuyQ=; fh=8f+RigqA3RDIfyiHO7E2xCSKOVNps5vvbw9cGySTQF8=; b=is9q0xKzztxomEcFfHiOmFydgnuaxDdGY9Hm0oYUNb4i9g78taA54SenmKu+0V6PWW wXNZ7vO57hABebEpDKAn5ixnNlTVi42lrCb6aMH2uVcNd/wL7b9ZxkVoJzIjEUmtZ+X7 FBomjZh/Y4EOvnaDCE4eIM2bDNnj4TxQ22ATtjA4Lhdg3v11juETQVDbfpD27xHPr8Yw 4Nby9Gtu6If/cHQO2fsLNaEQWItdkWfnycqmoWsrwdDSP9ipyIeO4KOe+ldOuF33dqcM 2YxRJe4K1ekk13BtZ5nJrr/bNYJLo8fwtD1QTK/VBLEtYu/vC2IqoS89jHHyx2Fywnwi 5emQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Bp+IGgls; 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 cw16-20020a056a00451000b006768627bc4esi2807560pfb.191.2023.07.06.21.25.42; Thu, 06 Jul 2023 21:26:04 -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=Bp+IGgls; 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 S232387AbjGGEIh (ORCPT + 99 others); Fri, 7 Jul 2023 00:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232498AbjGGEH5 (ORCPT ); Fri, 7 Jul 2023 00:07:57 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2099.outbound.protection.outlook.com [40.107.215.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6948A2706 for ; Thu, 6 Jul 2023 21:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ax3CyInYUVpNh1QUaQs+4P9aD6+UtlI09xGxLIMOCsQ57b6BQYc+xK9NCKvqFVxNloTG4TibI4VsUDy4T8UY6sTDOL/kMsK5Xlww5U6dverwzulY1GfGUBnvrqLVwE/Us76X8mpUiesTOdKOaI1BIUn8p/loRO3AA2v34uhwjpG3llLmSAlTiWnbNqGKw9eLZv2sBrTi7TuCm0bZ6zxrrnfI6KsLAM8/mgQbf3kYBC2HhY716roYsyoqPNUaJsAdPjeDHjmVxxB7/9DnRzzb7R1DtBKyF+R93Hds7MX/77xXiVrlL6o4gG5WZNsxF/oi29/kBZgFESorHmfBYIMGWw== 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=2q2+f3UaUtrv39e+e3MvLdBDED5EJrbT8+Jgrx1WuyQ=; b=iq0GEOI7GtIG0Mff5+FBHxGmWyueKig/3J5nJk/8mQkg9kFD7HolrSBCg7WrDQoYkjsWNJayoMGIqVWkAUR+RiJnWYe3jTjnGFpCH0sVzyJooFKGwZMa6mWcENeVqkVDCcB6LWj7MKbngs85pBsuPk9XDS9yGHsUx/NrFu0fCkPQ2e0zukKHYKGJpTiAd2MPhJ+uMUlIhgKfbWk8cYXTvLntN4TyHClNFj7B7WOay0NVOIRiaA62HLdfohJhn5cmFPhBpuutc01npbRHClKl5oNYbLQKLXXtsPLb9A671u+Bt2RiAwx0OrJlvlWcUcOpRriG4c4sdxr+pkFAK3HPTg== 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=2q2+f3UaUtrv39e+e3MvLdBDED5EJrbT8+Jgrx1WuyQ=; b=Bp+IGglsMA91j6hCJiKFP2p+QiavofrEQ4Hg7zjasgkGjuzCS0d2Ug4GkaQSiry+56Ar9yvywzUlw8llaZO5qD9Hiw29B42lG4mQb8xgm5dPh6Joa9arWCja+2WrXaeonLwz9OsLtjKQEu8r8tfk2y1oePpiXWbBfZUqbTdWpptR4ySLQIVvYYMC2Wolqbw4U10QtcN5+3c0sjWRIzEl0NnOIW+FjHepOkfyeA3FA2zMN0k4xHi1oAHO3KsdWK+92rHER+I9oBdB7FL/HWM9Wf1JuUpJCQMwQvop6DvV9ux+CsOUyn2yqtCHOmYh8GOpTngo4/02GyYuvYYE+KEyeA== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:52 +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.025; Fri, 7 Jul 2023 04:06:52 +0000 From: Yangtao Li To: Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/18] mtd: rawnand: atmel: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:14 +0800 Message-Id: <20230707040622.78174-10-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 0dd4481e-b5c3-45c2-5278-08db7e9f9870 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d1uj8fa7Xr3yQ5L/HzmNsiBywlz+cd36XsMfdle9nSCFbPyjDxXaLQBlKbNp01YhVZ5pIwOEbTSMJNehT2QO4wrYBkPOM+1rf7HuktxXgDZ1kD8iPeE/JFMcFtael8wapSistgpk3N613twGUprRZy+2ZysMGQEsOwetlUaCM7JvQL2eNnFmeFtQU5qbzEVK1e++WfJc35bU9A8BTfJZ/m0oi+whaW567XddmQHVJSJquvWGnKGRcFh8H8+JFn1A73ZPNtXxF4oErqPzCcgaKhYxS0amWqrKc5Mv0UeOH+kUY7wOnJ+mA8xf2hAaXtujnwdYA6HxCNNHEfbeaceB8hBEFBQNH+jYavm6A55CE4j97z6LD/ofKAuYh9aOH1r93GuNUfSdD4bXfj79Q8ihdngltKVcK/1sIPdPW6lPYeGXdz6xAzykdwIiAz+xP9NfPLtKizzVEbdAE61aP3Hqd6afNntMuC2c/y1WPRsOO1XMnWJ87n1OP17Jb60rzuHl5ktHX0RUq+2sQfmfLnpv/jVpg1jMdzpBacksx0+P1Ah1cps46xBaXY7ZQcVOvdVX+nIpXlXG9TOd34GcxJ8tnjH7MgMVhW9bjxp+BfVTaO3718W0M4zTRyWI7ACO3DzH 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(7416002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 185zHx+9n97puVq94Czeth9zzrevhpRC5JubBrD9IE9GWkFMrg4ubDIrQiKJPm29lA0oHafWHAHGqzHE8WbLYQHjqeeqpvc7bn6D5HZcg8bbYppw2g0AT53mkRdHym+RMTw2lhdlAR+KIDiQpn7CVHjFdOfs4V77G2+Qvhj5JHqqvGzHiC3/QcBnuWptYrl1cqaKCs8XJhhUKuj/mBQHf8+dJt9SJUdW0NEmIcwV2ookBF2+Z2Csw4K+Cv/94J08SPu2En7jIMxWLEcdl7uA+4A05VPL2/lF2/j+Lxb1Lm0RT2f3gSp/hJPlwaqEDyPGujQ3mKFQmL4ch/k89IIQjzKhrhMiu/jyxlogG/8K4DdQ6oZUAkDYeKv/tlgLgrRfVxfKsw8ZTsBzhtfQMBZTMQ9va+VZGr6RA1nPQbkNh0rEtlpiwxsIy+IdQVnhTiS1TebF3iaHMbob7UhCaLZeJlrYm2vqfv2ft6xo1Rzx1Oc1vJrqu6Vo53n9H0AhKM44+l9HDYmccsacQLRetKAp+K3GUTM0fd11jpdegdsueF6zR8wSoG7RLL10ORpKXi4BvhM/mdJnwp0oxCj9i4g41bFZaxZVfb6ejVJ3Mg4phSszjHM9Ho+M1zpO7sqWXXMflFZQWdk6CAoYW6ORJ/7X2MeGkyRVez2oc6yu2qOse7cxHQLUNwfG3jdoBC2paTJOcTj5lcpuEoEE8Ws+vezm/UHNGqepzYJrFN/OFKBGrab5HpVdObyW7TYUCGIDvG0wwVrs58LuUEh9b88DNeLZ+5UQudt8+wt+7/yrocZPt+J6s1+YJuWwk8etisBncuBbw8Y+mxMN3/PL6ABmby5htkFU5lriuO/4topgY+8VPfKfRTnQVEgky8IJ+bBQh/QjAMXhM/uGxnwXi7HOmnwGqId3euOJ0Jw1aGL/nhhTVR1oM1qskuuielEQrHcf5Pyp8eEYgVwnsCbMSl5TRSfVh1ldm45qO+I8wvJb4H8MW3s75uRm27urpI8bzwrU6KKAhC37Hg4AfvWzOqJVvxx86yyfC2G00mrXxaOVtxBLGFmR/0UQAq1Q/WtvvG4Fh5SDRj5N8hXB9l8GAnB20XzosSh4WReA9Fkp0tGB6g/Kvj8rzgCUFLyIHxUbJlVqkrrFsY/KR9yC2VdnsaEGyHoIXalnKsNkAdDpu5irAUIStgmZM1MxdzRgfRluDEW1DloQJsgB+tVHzppJXG/ocKwFYmiyH+lgSmMW7FVUbfrdrdAf/ko6rP1kvt0e4gF3A0zaMS2r1+Y9uTKA+blF8z4KiOlaYbFDHUV/mUxIml3TyYQczO7EOVgnbP2SObMID3nK/nsVhmpFR9sPC6duqY0kVY20qEHodLR1JhzuXL5/6br6zsGe1B7fIrpzwsDfQQ0HFEoL7hFtD4yS/Iuv/zIxC5Vkgr71p2me3coDBpTNdlp+YckHlFut3YQcoc2WoVLFtOJpCxVmemWKOt1TzEx/oTeYup2LZklhBetQ3lhPWjelGkvMPqOveBeZ+yx5O7+6fmSPfsRj2+GJfQw5zmsG7FqC+DFsI5Hk5pL3w7YxkLaziT33+n37Zjs0H8XwFZW5 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0dd4481e-b5c3-45c2-5278-08db7e9f9870 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:52.7549 (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: C9izdOpqDKAb/esxGMHs7FGQte1KimDJHa4kw3Px6HR2eC1YjTw2K1uCWOnerWJDRCqSCeLMmablsswPfhiZtw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770734447748728410?= X-GMAIL-MSGID: =?utf-8?q?1770734447748728410?= 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/mtd/nand/raw/atmel/nand-controller.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index 81e3d682a8cd..3f494f7c7ecb 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -1791,8 +1791,7 @@ atmel_nand_controller_legacy_add_nands(struct atmel_nand_controller *nc) nand->numcs = 1; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - nand->cs[0].io.virt = devm_ioremap_resource(dev, res); + nand->cs[0].io.virt = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(nand->cs[0].io.virt)) return PTR_ERR(nand->cs[0].io.virt); From patchwork Fri Jul 7 04:06:15 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: 116939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3017880vqx; Thu, 6 Jul 2023 21:40:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGAC1s5Am1NjJYt+vC2kCPINlSH4JsnKEV4IbOcJKoKzR4txNNRZcnJOtbE1bjsHZvsITXg X-Received: by 2002:a05:6358:e495:b0:12b:ed77:8b66 with SMTP id by21-20020a056358e49500b0012bed778b66mr4051899rwb.7.1688704804132; Thu, 06 Jul 2023 21:40:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704804; cv=pass; d=google.com; s=arc-20160816; b=kuD8mN0hFm+RTRYX9F+zlZNEw0gKun6i/1A7TF82ztvKYm+hT7obFWWzsrJHP3VZkc WkPETbWQZQEqIcR5VSYfpzFYfot+OC/mOHDc3v49a7+19ihoCYxPnZ+4RCSANryqn5f/ Jjxu+UsPLIHhrGJoVHF/4bpjpOBhCZ/sqguCkJGMlRLhblF11400fEPE1IgE0iId17g9 5Ie3hw2p/9tMvrgNESVlOunnb2/mANrycE45A4kt3UHZRfuYwQyAAvYMKAVOpl5ei2D5 wwZ0mX6bwlbLU/ojCGynsZlC9phCso5EUpV0jSKildw+pN4SlFZbSQLZ1yTnCTvFwrap N64A== 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=W0+iI7AY1yI8a+yrMcuBIJJ035tveqmejoJEjMArvlw=; fh=0quFVFTe7bbEy8lJ1kO9geRIhGu0y/ObVx9fgmtMhsI=; b=mfe3RPLUXJRH6SzqZNNc1f3xnK4yljtQVvtbuRpu8zYNbkkv4Prgblu5C3W+Slwzf5 lW8GNMDfdTAsskE77Hx9uSbPoIS5d/j1aTuDL+O7AezEJLNx+Wp7YYheqUn81UJqxJnA fNaJcIsS65h+HQ5ekMC5wmx+822jPJ1/4wxTwKpB6aNkXpwBD10+uk6atO7SAtmY6W3B QStKNLMIuLkFEmo2tQaSmABdeqQZJWR1TAtZvkgpGoSjIkJ3IxpZ+Z4aJBP9iu884Jwi LfRXF/1Mf8SDOiGzBZwjnX+5oyP8kGfq26r9K8zuKfte04UiI5em+WfU4YobTjPoOlW5 JddQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qGRN3jkB; 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 r20-20020a6560d4000000b0054201a3f08dsi2896876pgv.592.2023.07.06.21.39.49; Thu, 06 Jul 2023 21:40:04 -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=qGRN3jkB; 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 S232307AbjGGEIc (ORCPT + 99 others); Fri, 7 Jul 2023 00:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232442AbjGGEHx (ORCPT ); Fri, 7 Jul 2023 00:07:53 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2139.outbound.protection.outlook.com [40.107.117.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DC4826BD for ; Thu, 6 Jul 2023 21:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQAziniRAkYTyHUBumjyd5OxbMuh3o7v2Im/KTMRunNCEtHMMV4uPcASPuH/be8LNmqHvz32OvvitSxbtiSTi3fWIC3VVGqWgba1TqMSSyjWlZEHN+Pexw+D4xJEEf23576RoUgUyMEHNbhjgq4GdOg2B6VDqcm+LMwRgGBZM7etz+loxsV29dgq97MceJMJ48unG5PUiEpb8JzeqEFRVpkz1FAVmWhIkM7cKDp6lx9KJMQE0Zplm1+QLxZva40ReraVx6MEaR+fddiV3W/3dXkH/8g00fChxP8z5NSVJoXMqNLqKEIMR1tLw2UWVem+BDEArtxnLMA1gO2rJ9RQfg== 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=W0+iI7AY1yI8a+yrMcuBIJJ035tveqmejoJEjMArvlw=; b=LUslpXhed2Qeu/9w504+d40ZfFK5FYrVLhiGI0VEvHXf+OUProRd+Vd+SHAVFHsw0IjYuVG035JKEZtxsWfCAQ0PEJKS9CqfhS4GXknZ0Va9b+QHh6ZV9YTovFoMJbTcUsl2iCApT3/qUA7fT284QiwjhAbGFYoYtVB5foSGosFYi93f6EuJ8ChVKN5n7jpvsl5JATUcjBoGGFpWgO8FFVH/zXFJHIEUXOyceUJISVwdwV2131DNKdfgvCbSZa2yn/1dm6KzrV684y3p4fQCMlpOfVRY1/RQAE057Wf2ciiIDvDQBTtrK1ANzfjObR31Mt9RhMN8J6qI0l8Y32afug== 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=W0+iI7AY1yI8a+yrMcuBIJJ035tveqmejoJEjMArvlw=; b=qGRN3jkB8GhJ6yHUXUbEyGB32dBUFeluWjdVlhg9g/5C/mRUWaGRO+Gqyt5GZ6AqYlgbn41QDAMCJaBLJp6Uee64rQ1HhuDMqJAhuAwu2Pl4QZao7oXEVF2PnzoS5PQ0DPUkdnbfwOZNjPE4KpL0rQaScwDgOfkXrhY3MjvJDRdHc3TZw8wG7rVIlg4ce+bedCQrae5KtNoBwdwK5bGXGQ28X9dbc4ISguwggUUe+RfYVGfH57XOrX6Y5v0VPDcXj637sooTUBaqHaQXAvwlJ0yuG6qQJn/E3AHORRwuqDYiaDU7lgLNis+kfvg9C/MfvgIPO0++iG5DtNJqbBAH2g== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:54 +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.025; Fri, 7 Jul 2023 04:06:54 +0000 From: Yangtao Li To: Kyungmin Park , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/18] mtd: nand: samsung: Convert to devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:15 +0800 Message-Id: <20230707040622.78174-11-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: b1fd0060-9c9d-432c-d5af-08db7e9f9984 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fPAtZTwIVgvRBjNhZqPcU0/mP0XuAiJXC9PaRRCD1MIIbnHZhxi+p2Fe6oFC4FDQr4jVgCSiXU0mdTTGPKWOUqBRCKH6xiTZ42Nx2Rre91U9W+CWk3/Vnh14NAQM/u/JOBZHd5Og3eD/1Hu+ill4lHh2RnL/wZKE5B8PAvLTlD2hlx1dsWvZGoP4ffiaeLntysUSazapgitFNQTqygSBgehJhPCD9Q0924hGlYeJG2OCC6UmAnPgDmlkwyWAAMchIsPNCg5rJ29K4nl1ozqkxLLQu1aHN/vMaG3KCuGIF5Ik5r7yxygI+HqgYeAOjwklnINd4sxbdyDxDb8IiM5aLXZqX3YDfrsFn0JCJfP113vv3h5T1kObKBH+CovNNKyaqlG1NcyiFvggfFnJxBR6c64UxrlYpEP+zqfEdioqrqUNJqMZ7LytPIxecATsNNjoq4Lr4ylqdbdY1owozs/lMdE9Liy+mTHO3olHG13gOWZFkTBcVVtbFf6+O6iJnnF7bm+qsW+z1aghUJ1nzebkj8dz7QuRejOjJaXW1o2zKQaX3qL0PVVLmL6VyrW1kVqEIDDFpA/x9D7izYQU3cVX27lECttClJvvxG/9z7rlJxyFG/y7UcMyDlZwlJoocqY2 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yrrKd8NvaXhXEJm1qjp6MSCLYc3qGi70xFKH7tJtyJFytwApRLfx+5NEhYx4EZgN4Mp4N2MnEEib/WStpZXUj+4i85RdJyQPxlKBXBNgmT7dK+hsRfmdBucC3T3+0LSmg5O3++lG0z30hOr3WMgmVBGAtYDcMcply5p2HQERgHwHpQUjMvH8X89Suhov+fWOhnlyTBpdoLqM4Mwk7zH465KGw1C0ybhlUxdkQQziqaKfdCBQtTk0y1oJmmtxCBXl9vrDI6lP4xG7UMQpRANXZKcWw8C/YA4tp7aFB0knVWf55h5pqwAj3SV7lqEaBbTxrOEwrtsfrZszG0lzfkddi0QLwyWoR62bAF3p33i2UzB57szLZSzeZD1NejB7Pvyf7SW1yPJkXZn7M9aDNwfsD2zauUtT6u4DwoACiZvrKQzdXUw+I9fa2jyNy8VW9v7QZw4KESNYcwYTolJk+fsJpNNa68VYHTboCxm4FXSwQcA8tsM77ATdaNDhO72CmnlYYxHY9a3rvS1FOlZ7pdkDHqp+p2DG+xLi8+P7L/beuqEqz35rNYnJMntcBryTZKB9si9XgzHZUS2waQrP/TCzit+xu1yntUeNL0/0KDT0/0TmKmktiOs2W6V0VABfhHP5HXDQJp/N3N2iSm6/mlORNxEdX+QCGkzdgKBEcj4oTH1TyV7Vs5RTUbHthiDmXtUFANTLXdxRCAVwlrR5rVMafBSeop4+ZgvJ5Kkj5/W/jxSHxfbedM3btjS1hgZtux3KEJMNm7Nde9MeDJpXdO6bzjG7ADveK1DTIdu/B+kmpgEJIW3TZItIo3731KM0SDxST7UvYMp7a7c3jKeLqGRii1CrBFE540hbcbcjisXUt93mszx86Ra4jGL8pM7/vKT39F2OHNqZ3YCBySCknOypskM+TvwrZv2vxdpxcZ80Opw1OUas7NnOQzHZglKiCTgejjNUeFxlncPajGGan5IBX6AqCjMXdl1QYX8IjFd1X+YFBVhltAboDAyLkI0haosk09o/oUkj1F3xameiMINMv3lKeaGxdaoKpUHzGBaU1Xe9jJABBq923t0OmAnNsLnJ/PWqN7fKDvyXcojHhDh9spYhUl4ZuC/2Wf2xkoskBugS5tjm8Lu6Fr/etwRo+N4KrWrVgBrDeAOjA3vqIabMOUh9QKcPct9VCv3ffKTQxcAaPwKO7+ZXCndcuoPeug1DpojX3Z2Vfu0/EjwgUUADpfKhQaeLG9a+Gy0wHr6eOst5VQSh2eh4xRnE4pVs4nw8E+s6hn4IMJh0PLJj83+WepdUft5aoZ/R/rWQps/cU9q84vL5ySs+p5qHJGIfwXsqsZRwPqiOl2Pv3Iro9Camwa73ii17ELQ1KLbzqnEQmbSYTIuum1FXbwIYi/2AKr2HQM7Tltt0GKE6L9UCdikF5XJhDjfAAnOD++94pLAzBKbcEEJpq/+16Whttr/95VEtdeZwdcSYyhr8mhRXk+zSsTH1Jo79/uDV3PrMwxTzgSvHvbyIlZ6kdoRf2Iwm+rybkqWW9d0BMT9WZhfouV3qMWCA0W8FV+NS/cuw6Wt1LqpnVA/3rbnC/gSIfvH/oAUL X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1fd0060-9c9d-432c-d5af-08db7e9f9984 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:54.4860 (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: Tmz84jE+1ngclHaZkw1uGw7/IiCaGCgTv4S5VTSmNNHrSsRVMaopk3eKhPOJw33TJwfjNh1vK2HWC7w9ThPeaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770735328833990095?= X-GMAIL-MSGID: =?utf-8?q?1770735328833990095?= Use devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/onenand/onenand_samsung.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/onenand/onenand_samsung.c b/drivers/mtd/nand/onenand/onenand_samsung.c index 92151aa52964..fd6890a03d55 100644 --- a/drivers/mtd/nand/onenand/onenand_samsung.c +++ b/drivers/mtd/nand/onenand/onenand_samsung.c @@ -860,8 +860,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) s3c_onenand_setup(mtd); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - onenand->base = devm_ioremap_resource(&pdev->dev, r); + onenand->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(onenand->base)) return PTR_ERR(onenand->base); @@ -874,8 +873,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) this->options |= ONENAND_SKIP_UNLOCK_CHECK; if (onenand->type != TYPE_S5PC110) { - r = platform_get_resource(pdev, IORESOURCE_MEM, 1); - onenand->ahb_addr = devm_ioremap_resource(&pdev->dev, r); + onenand->ahb_addr = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(onenand->ahb_addr)) return PTR_ERR(onenand->ahb_addr); @@ -895,8 +893,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) this->subpagesize = mtd->writesize; } else { /* S5PC110 */ - r = platform_get_resource(pdev, IORESOURCE_MEM, 1); - onenand->dma_addr = devm_ioremap_resource(&pdev->dev, r); + onenand->dma_addr = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(onenand->dma_addr)) return PTR_ERR(onenand->dma_addr); From patchwork Fri Jul 7 04:06:16 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: 116942 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3020906vqx; Thu, 6 Jul 2023 21:48:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlG4nfk2yhyXq0Socobu4QxsHizqOrca8dr3LYdfnIpCah0UTOeiOQDpa7PUnqx+4a1xEQO+ X-Received: by 2002:a05:6830:1e5b:b0:6b2:940b:dcf2 with SMTP id e27-20020a0568301e5b00b006b2940bdcf2mr4244176otj.24.1688705290916; Thu, 06 Jul 2023 21:48:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688705290; cv=pass; d=google.com; s=arc-20160816; b=EbYFm+trhakiaFjNkOFqPEThgUg7m44rcZf60hluicmK5FL9wUM7IAlFZjAL3JDg5J bHqUYISxgyJedvi1FONtVe4fxpMtygwEMBMwjtjPZsUYKFhPyTdp7VYRHqmcD4oyESgQ fAYv5ppYnjX7OtQQR8itQfx+oiTyS0As+6OLUF7P3gA0m3djuqvU2pI+HIsaExoRg74F cddPlh66VTTmiGl7Ep4jIT+L7RA0bR5nwhei8ntF7K/bVge+gZVI7H6FN/p2aDnkmn65 2E3mXH6RXsF/CaGgv0iv+fHz4N2RdKPGCHFUzLN3WJHfnmBv32OHpcFJCjHxNTdgIX4S 8xig== 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=MjRAjnMaal/P3wu6xKBSm/lExPY9h7o4aVevsB2dRGc=; fh=0quFVFTe7bbEy8lJ1kO9geRIhGu0y/ObVx9fgmtMhsI=; b=A/uncRwbyXCOo/lTt9F0VBVVaLE3GJJxYr6dtpQnr9aYA6eTJ51AvRVRgxePeJxX91 EPnpAITA9MxVfvTWeCs0hou1shESha1Ip8E5ia2FYnxMx/MU6dD+07WJbeIM/Y3otraK 9s2bfKNFYZLWaNWzB/2DNORvpQJpRV5ZaiR+JAD0bZWiXqButoc3yieOjsQAEjS+JxAi DZlymlzd2+LimZR7iW1z3/pkROw3GAaCR0GHDRl/WS/NyfX2jXZ30F30I04RN0fFTxYW H7PXZP46HeT/T1Pc+mGNdQ2gxCyZmGuCKmj8wekJMGUGqiDYnrSlbkQ1sw9AcGvF9znh PKLg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fzEegoIw; 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 s21-20020a63dc15000000b0055b66cf8d77si2960625pgg.412.2023.07.06.21.47.55; Thu, 06 Jul 2023 21:48: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=fzEegoIw; 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 S232304AbjGGEKI (ORCPT + 99 others); Fri, 7 Jul 2023 00:10:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232298AbjGGEJS (ORCPT ); Fri, 7 Jul 2023 00:09:18 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2072a.outbound.protection.outlook.com [IPv6:2a01:111:f403:704b::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46D0E2D53 for ; Thu, 6 Jul 2023 21:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DF+su9SEvbbKhuEbijPEKEzUxHEMki/3p7RFxhLMhd8eICmV2mdqpf8MAljE+cTbHazlWRaZzpBhMIntg1ZQpTZS4s7sIDFHKEgLjtZcpagwdyhVlbKormWdcTKGW/j4x1eUt9b8yq5xaOabtIa9PrabBfoKDvwlnkHtPjNQEmHG3ampfDc6YN2eV6b4/O5uXipFBQFdNKDCmpgJUCyfdkKK15KF8vq8YJrCRddwwI5hWmtB0Zhlo4ykU+c/6TXhbe6B5iRrf6X5GSpsRnXkgmihi6HzrIzx9OWjDn5T/QupBO1NkEllM79jvTHO72KSE0xD0dvJKJ4Rl1aRA+TXyA== 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=MjRAjnMaal/P3wu6xKBSm/lExPY9h7o4aVevsB2dRGc=; b=AAPSEBBvifVdYs0uaBLDf6Ie5Mu6Mg9QkqWVR3QrzAqMhodgQxLCyiT3v0/iTa+JepW9pxorEYTF2bR7WUi/iBxiJoD9UGqXfogh8TRe5C7D4gblmIsqwJx0ivKZJXCfpfuLwyfkCl0WgIATJ3VLsocJWgXoYBl6jBkdCvVmyqlrFwaeo3PlStnR2i1q5dXev+rolNNHcZ6p/ph2dYj/MZmV/hlFq0DvzFQOby8fJICo4qvz/crsSP0ozqPLavbhAFWWziMjRXu4g3aSQVQQ5nh+XD2c+3PoVhVI74Mu4WSq0K0LOMHD4G70EVdbr+Z4meScvq0IwnwdWUkh/2VUTQ== 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=MjRAjnMaal/P3wu6xKBSm/lExPY9h7o4aVevsB2dRGc=; b=fzEegoIw4x7hDl+vbE2Is+xYeXEtA34Umz1IXQu0/jcpNHStLQDu/TaHZ+4r/WTqSz5G1lhFS2ks+qN0CkEx0YcPMTTanz0Fp5IcN+XPOalgORe3V/F/HrC9/F+o02oif15J9I7G9Ro27PJrwCh4E6oenrKjmSbx7FtneiD3vyCCDsSLKf0ciHbrHVWVVIhqsfQEDEgGbxLJ61qwVkJtWs7Q4TGGjbtJtrzeopRm4myAAM799rF8MkwFXZ4Ukfa6+X34WrrWs/eK3Wvtn28RSrT8VGs1uL4Wxq3h7WN1Gj7ZTs1o82OWmITJ+wq9cMCSdpSvQtYkjGX8+x5PCj7d5g== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:56 +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.025; Fri, 7 Jul 2023 04:06:56 +0000 From: Yangtao Li To: Kyungmin Park , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/18] mtd: nand: omap: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:16 +0800 Message-Id: <20230707040622.78174-12-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: ce92174c-ac53-46b1-5936-08db7e9f9a99 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i5Lk75gVTI8Ys6dop0NQoBiOQl+s7zxTtbopvdg6XnFYocV5Nzd+qNFcr8BgBcmViyfZMn8FDUxZueCjLA9zZb8AaJ5gTMPnPndGRiN+7VG3dc2iNJvElKI406cHqQxhKbgFGN485FLFL6/83bMeXRsm3GGU3uAEo02FZqqP7nHlqTJ1XDNaqb38oZM8DtKpOBToUdgQSYRN5AaCMn4YU5WIpj3t7nqJOtOwDXgc75nRIwEReIjGVbjETVfFnr1+hxu+mxZcSrRA8JXwuCnvI3VxQSTTKn9yum7TEKH3aiPdc34myGAznpErCcEcz7pbcolo7n70KE9CVCbL+wNNLBjyBN3IuyNJGBPvH3+ECBmYsg1FKGrzXj7XeyNqaD+/QOESuzYwLmDm4R9/K7tx9LTez1uu/lXLaWGsbKeDk+97varM7OTjyEvhFEasujMVpplAWrkZAOAEEGHN66rKihbprmhtpXnHqvX/sq9Fy6pgfqafeqqiW8dvFzKYeZPzM1kuI6rmHC478Dl05pTXNeky6VPkWnXleieCEic3t+4faPmQbhUDvcswFcjb6O7Gf2rJRqYblmLa9bui5QoDToZ0bhMQ4g2wt0s0uq90XDXbBArzLURaTsMWJfF0pH+0 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DW2QilqYaCZqg3tgAtLh8xw9a4bLQhP10V5DXSg78xGbpq5Cn6sUKIutl36vABYpyErBA+YbzkiczVaHxIqAv7NOFFgS3g4Aj/AwzrCiQYCrE3mlEHjG6dzbInyhp0ymHUPgKi1a8xb5JcjanCthyJuArBnSAvoqA9mzAM2kUw9zMO/cC5ryGmGQNLDQ3EDSlC/xlfyTQ2dGmAkKUr3o/8m/crtn1kaaaM9jMgUMb8UVzZ3kXd0mvllCNPquudHrSrBbKSz6fl/GTMd/UtUyEqIo7vWj7oYLld0x7iPhVoWlo+SgVC63krcXtV2dbuMsLyhNai1CsqjLFllOIg0VOjcUaAYQRjEhY+AVAWxUdDocMZDv0x7AqsgOtCLWep+zq68peZ+8C5PL2z6vR3huEPoMRfwxW4+vyOKDKLO2DXlZYPnhY9vqt4ZOu46GtCEvmgehMyK8fcF6x9ZuOk/3FnQVE2ghPXdG6p/1ZgaVvWQqKo3Ex2gXxkANcgR0JIdgQq6A4aheePpEGiDY7ZGBUdc+uhK/VAh0H5RfFazLN+KW8/MbV9TelYKzlDMIS93pG+26y0wknfkw8qjvUZODzq1f2DQ4A9fOFrMDj8vQYGj2qkzRiKBV2LU262s+WdlokAf+bsJhipCkYzcVWUKUfIBlU1XjNKgHFYMoPRBwgBDGG6Td2XoTqd6dRP+k9Dcnx5Zhr+sTlvkcVd3SznTf7yKcJ7192WYMXIW/BIv3lh7lIum4Derk4XehOvlUejssVu+j3wsxjnhmcFL1hQXwS0LwAnFnxgi8ujhH9IWnvf4XaVKpZLM0sYaMZ41RpwC4MWhpxNEQ23U6j5UtZKCFgmHqiuiSRR7OamkKP/hHMBk+H94Y98hl5wTf08dsI/T/ZpTZzF5rwX8hsjpfuvGQ19k68bJLtPzytssV4OpCFLe1hWBCpQtkUGbBrCs1DltNi5P8/QotBSSaGdCNI8ovsHYpqTWTd9Hxr4PXAlPrdpTcBJye8TonRlv8nEt6r85jbSFsKlbY4/DscAC5iihQd5S0NG7pwEdZWOxxW8xUj8BzSsjxVctrhm4aiZMw5l9biBsBODptpB+S3dKCAUO6eqGKTmxHV7MYBdQafTrtkADhhNMAVxmgO2faoEyhR6Ywrm6MjZ2vRLASjErRfIBtZP/03E9NnJciLaBaQGnMZbZSuwRXrFIhIljcVMmmelvAws3yUUN4vyz/HNs6ZzKmtRx6hxpw1CCB9zBLg2PEfmhU24WGbE7zR96hRv3ONrG57QiAqxgA/s8rYR28UNrDFbUDil9/Wa9kvQgPp6z+qD1Ut/nrPgTr0FOtbTYuGQaJxsFpfPu0rZPFbBzSbjztUnOez6IoJ7WghAjnG+X4o3IRfUPQANzRD2Fq6agE3W0TjuxBB48nrGLkrHMyowTnwRZUOGd6cDf7/DoZ1pl74bsmxG6egOXyjXgbnLIJz+xCmrWxeMGVrf0Ogqied0ARTbeXQsToW/n8whqvHsF8t8gyBEKcIMFQITbDzp6WCwTl329lSVon4HqQbrkUmsuP9nxjhxZh07R+mva8jLASMnT9wKOu3+cMTyUy8/r9FDza X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce92174c-ac53-46b1-5936-08db7e9f9a99 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:56.2988 (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: 2jAMAFfSdVWEdYURdmpJiRb91UVbsGU1UTuGWX0w168BAdqeZ5eaDENLaxGN4eKOqAmBaUAzyBhY3iEJqm7lgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1770735839384805091?= X-GMAIL-MSGID: =?utf-8?q?1770735839384805091?= 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/mtd/nand/onenand/onenand_omap2.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/nand/onenand/onenand_omap2.c b/drivers/mtd/nand/onenand/onenand_omap2.c index ff7af98604df..b39aee023103 100644 --- a/drivers/mtd/nand/onenand/onenand_omap2.c +++ b/drivers/mtd/nand/onenand/onenand_omap2.c @@ -467,11 +467,9 @@ static int omap2_onenand_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "error getting memory resource\n"); - return -EINVAL; - } + c->onenand.base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); + if (IS_ERR(c->onenand.base)) + return PTR_ERR(c->onenand.base); r = of_property_read_u32(np, "reg", &val); if (r) { @@ -488,10 +486,6 @@ static int omap2_onenand_probe(struct platform_device *pdev) c->gpmc_cs = val; c->phys_base = res->start; - c->onenand.base = devm_ioremap_resource(dev, res); - if (IS_ERR(c->onenand.base)) - return PTR_ERR(c->onenand.base); - c->int_gpiod = devm_gpiod_get_optional(dev, "int", GPIOD_IN); if (IS_ERR(c->int_gpiod)) { /* Just try again if this happens */ From patchwork Fri Jul 7 04:06:17 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: 116933 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3012954vqx; Thu, 6 Jul 2023 21:27:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGdRswEBY0qEW48IesLa6bHzeio0Y1q/fItftgIsCdbV3QsslEEziZ0NObckDOsBZHaXMYq X-Received: by 2002:a05:6358:e49f:b0:128:b20b:925a with SMTP id by31-20020a056358e49f00b00128b20b925amr5306759rwb.9.1688704031790; Thu, 06 Jul 2023 21:27:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704031; cv=pass; d=google.com; s=arc-20160816; b=BkOocGRIhvQbNSrkPNbZFtBi6fqjTr0DA/eVBR9iRd9OC8iuY7FEEAyq2rmfNW5L8c vor5Ph90BrYJIBJOKYDB9aGrPkkcggqx8fpz+REUw5/FTiN5fTac/hX/i1N6ATYdXaCE YBIMK/YlX1enwm/FDGCIIkqdPwGra70of2040PBzvkQhyEY9g3Pfw3Rysc8m7rgGsFvr KU7lfmV7nA82Gqc95x0Oi3GBevtdXuBq3IPUHN+V8yWBZwvqKCeFwDqXZD+ZblvMCkij IthXj/PC+26Na+Z4G6mtOkpBzxJJvi6NHI49vBBhMJnl+ccGwp3S61IBfezw5JyeepNV xC4A== 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=Ex5qMBJhPDKU9mlUo7og/N+zrqM9JiXGgE1OAbeDZoA=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=WqXFwb3k4GsPs0qjOwL5QPMcMgVJ1PltR1qpPc8xvl+hiPnfLFtg7qMx4Jy/DTc66o q1NGWzuRHK2Iw22Sx/WA6Fp1rWjiYGsWvRxGUVXnnZuR6KP4/kON+N9iFaovC+9VnVRU 0VcyRHV4xQ0UjfdKDPMKoubQ58+no2pIRxAkAIQaRdb4/OSSNr5ztiyrgBC7Jnc+Zx1O jE5LWKLiCAv0cDNkNrjYFLjwD2lf3yyC6OjAltLavHEu1e7rNVA3S1N4UygdgZvbFzvQ tRHFAfaMkAlcbIYXt3DIaPv3FuDmZbLLW+pyKvNqyU+uXb9CCpo//nNzCdMcX0c3xpPq 1pZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=H18dDafH; 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 n17-20020a170903111100b001b074fbdce3si3048491plh.478.2023.07.06.21.26.54; Thu, 06 Jul 2023 21:27:11 -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=H18dDafH; 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 S232480AbjGGEJW (ORCPT + 99 others); Fri, 7 Jul 2023 00:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232350AbjGGEIe (ORCPT ); Fri, 7 Jul 2023 00:08:34 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2139.outbound.protection.outlook.com [40.107.117.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C9002102 for ; Thu, 6 Jul 2023 21:07:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iDzQs4QYLasDVr/Zl+mC/X7NH6tcFr8i5IVbZaVUSNzEiOW8akfsVGgFJPETSgVCqSo3oyDHb893QlqRF7G5GchlwQaQZ8ruCA8phwvxdwSdtgkO81OHBk32UG2a3jN0q8pWwskcRutaXoSUQNohYkIIQYWQTk1TwBmGjMBGo8YCmGzsNg0DdV+tL8tNYSdaEP5mdaAn4tquBogU/Wlu7uef/hdFOVBrnuE1Kk/4RfHI7RJLe9n1NrYM5oc98jMkHnzo2vI9h6hW75DDOiCUFNvUppoIqY2a2z8qKjkLibO2rfH3NqLNRfCDv7xcUxiOG3I/XSv8gJIwZFxLtPstDQ== 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=Ex5qMBJhPDKU9mlUo7og/N+zrqM9JiXGgE1OAbeDZoA=; b=mben+RHxb8ZT/Pqm5TcHyktexfQxPCJuikP7imhX4MTuG34s8f48bgyhlPOwtlUpSNkOTxJr53NRFeg1mzSacUSLSCVLqKsylqYzjVa1iSkZeAa3uFrQ47Ql8a2ELOp78pNoxprqSoU1bXSw2205PrVhEf3u2eT554XM53LWS3nsBURN0It0X+MUGrfRmk97BOI2JC+4rNDalWbnQfZRapv74G3uOlzBmpDB0w1J6HtLWjokNwfCXXMdMlh1IUkYyydUIPI9TLwTau+WzUWr4M1nq7UimCpjUMrKQqiXPdjaxBY127D5AyqlpIr3luCnV4imxF59FWfp+RbRxs6gBA== 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=Ex5qMBJhPDKU9mlUo7og/N+zrqM9JiXGgE1OAbeDZoA=; b=H18dDafHqbdoF46OJKCfLax+kLF9WVtXJsKH+f5lDClfj2T5tTlvfzTnSwkvrMrcubzHh/58kySxaNx6SEzaEMRqQTH079WP0HhnsHOi49kJWTFYB449nue0OCivxg/FG4JBGqhNoha+r0LqaJsITG4pAwfH+YnYK43iEWJoosAsoANeVJbxdwzpKq7fxS/J6sj7pUvtzaUNMrQvIrsCaLOigHYqK3ugwKOneBcUdf+9LXQx3hmy+ZSEXFHQYjkyDtab5Kv/BAHrQIIrjhj0iUzcR1NTVK5chPPX/FuDWWpkpOwfO8y344xV963EC0um2XfLWKpo7MI8LdLHN6K0NA== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:58 +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.025; Fri, 7 Jul 2023 04:06:58 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/18] mtd: plat-ram: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:17 +0800 Message-Id: <20230707040622.78174-13-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: f8206cb7-daa0-45e1-5395-08db7e9f9ba4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wt2ED02qokqI/sqBEGN6Y+cTurMk12sSkjMbJIkZATZE4HLPevkVO1Ys9h9HdDejm6PwnsO1XjrZp73tnMacdEUnD4FbXO/mflqTL2Y4YWYsRKL1yARX82ok61WOQrvr8mrKAG4XZu/Ax8dq+xuWAhYbkgLDFNoKeHxkxald62ztR2RL4H1pD36RkqTKfcIIZz0OO5vloSxRSvLFSdimJDqopZcprJHIX+9NSf7LLFDgooMcnjDIRdF9fZYC0M3KI+ekuyOJeIILsP3HRAd70jd25vq6Hb9Z1IBZuWgemRONsfQyvH/YasUWaVoRm29GLP6CSR8bBhPQ7h//56x0Nqt0Z9lt+42AlfRNYs3dvp3BN6QUT/ceTZaKE7nC02ErfdlQ1dyNGBUnbi2oCgyou6G1jswrogf8/fqGnhdZDI9iKPWvMvYADXQ42okBv6IGGIUQofbQXW6I5fmjRMOAhXYvCAJBzPWi0HMGTAVAKpHAJQMfg7Ymt3tSvZmZa7MacNXZUIS28SWQhPsiA0NdBo8XJLYZz7ACiyLEjYlAskC4XlrS9D/VUYkOacdk6lF0BXI2Iuwm+4g3UcZL2NkQOB5jcx/1+D0M5usvVAUGYnqSay6qehGfSbG83qHYqMyX 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ne1rxtTyhEDY0hyeLctEhOvcD0DyjNxbwTLmMq9dpcnZOSnlHw+GNDoJ6N0Hv0WQ7VNW/IURgQ8q/gV7VTyFJk/RwBo5cwwg1wSG9t7u5xnZfibBiLLDh7dQ+wfE+TcNjJ0MrKc/c9gQc59KHGUL7PMPdSbJxHuV6XcRV71MQEBueqi+/Ca/BL3/GvQdLGu1gyGfnxmpZPqpmCPwYgDeWP8y5I8lijpEaTbkyNfWENBba+aCRwBwjuzENKfYT40tkYxg+NmpgOW7CCWmuKvYIvXjkMcPvbQexya9QfZ5KL2OBGXgHOqTtU0E/kxA7wx69D1LTXa/sSg9aib3b/HIkg5eyIu7vWRnHpVHn5jxvejgKg61J59+/PyqDNy2ykAB3momC4T9R72ZE18uLrmbwSJPqG0cT5opSx7WTF2notQEsNs7aVYU/dHDeh1JBTm3gDgPy+QCDKeLJ9Y0Kgo61/rLfaYBtl1InQ7ntWyWIJbgqSPylgKRCqkQEiM5cgjG1zJ85Om8dv/sSyGJSlGqApXhawpkWsZ6ZLRQJlLWU7UDe+Z4w33SMnU6q5D9Z2ogv988IYDGbWG2RTfeAx68tCyqgGM38KwsnZgmkzIHLZKGmlBjGQqnIY4Q5McQzEkJhMnsze9ZKIj/qX5qE6LPGjkcUIrZOArB3A6BCgsIWKS1gUx0OvFpt1K9VNu+E2lVqizsqzArSpFAccESCLBCig9YAz5rncoF2WM20VyOjnnpTxJ5C7ECXkUpglYSkxG5c/J3iuPjS29CODrOde97vYjhKmQ8xsHqrB+HKOXUw8plRjC8AjaEq3lYK0qxPRaQbmHQi07WQqPXjTZht1ADP7zIYtHvy18blmKOqwvJhd/TJeXfuiKbhV2XXk4dlvERrW4254wMd4MZQ2Xx4u9Llo5IEDtISRg++ITkPQ102vV8bv+42sCVjAcPPHOFNjlm6CSy6SiRFYfUigMcAW7Apym5Prg+Xp6amyDXj4Vst2feohOZG7rlQyDQpK4rqMQBx4paxdO997+LrDIAfc2sFd8T2QC1Cf2WHbQC81Ygsh9AHZlFbCIjceKMikcd1XYF3BAxnc/aureGcSNcpLO8L4/DfOqW9XLqIbIDbmYn/iFuWYLk/uaueP3jEONDC2HqdN3NTZ+xfxNQKTtslaz5gYrcFsVtMkKIAb08MkSS8igx+lb/tfjcQ4JjI9QSR9Z5rwt5XxdCzhG/UB+/z41tWE7DvofmTdsyNVJhH9tUqe4jWL1rovOSPkJNTIk0xi3iMup1rqvm+lF5F24HGByEGWYWINzaUOvYJE+VFRAQPNjsE21Eg73mfVDFtyzGM14APoZzByPvfzFzT2I6H1sAzIiTxkalUYv+mYWwdC610/qyb1+hNN6vMoULfeq3SouHMJqfCvT+XEDEfudlm1+3EIX79ZaPbBdNIRGL2KxF9wc80Eb9C3RXVVlrM219+3cNql3P+7OJwUGTOAkR8AsXiU6p3yPEC/GEn0tfE9swbCTWezpvy0Fj51PiIalqrp96WyJJGH0cxnt7rI81tfOae8OhXFh6Gq35aM1T0lj/e3rI9H3ItBlxxVV+zP0awW3L X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8206cb7-daa0-45e1-5395-08db7e9f9ba4 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:58.1429 (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: FFfK7dlfKS3IDXcKZmCb3kImpBqnfwZiU96xQqiA63jkTkSv16yokhY14iDPcjs2XiwImSFm5Nfg6xOwMrfRng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770734519274081123?= X-GMAIL-MSGID: =?utf-8?q?1770734519274081123?= 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/mtd/maps/plat-ram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c index cedd8ef9a6bf..4c921dce7396 100644 --- a/drivers/mtd/maps/plat-ram.c +++ b/drivers/mtd/maps/plat-ram.c @@ -123,8 +123,7 @@ static int platram_probe(struct platform_device *pdev) info->pdata = pdata; /* get the resource for the memory mapping */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - info->map.virt = devm_ioremap_resource(&pdev->dev, res); + info->map.virt = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(info->map.virt)) { err = PTR_ERR(info->map.virt); goto exit_free; From patchwork Fri Jul 7 04:06:18 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: 116931 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3008073vqx; Thu, 6 Jul 2023 21:13:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGWiX3FR7zAWJVX75xwVa1sGo46ggfQlsQ3rOa+BF0cYwjDTZ4NYOfGZmfnpgRbVPamsuBH X-Received: by 2002:a17:90a:b10c:b0:262:c414:e0af with SMTP id z12-20020a17090ab10c00b00262c414e0afmr2936656pjq.31.1688703237747; Thu, 06 Jul 2023 21:13:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688703237; cv=pass; d=google.com; s=arc-20160816; b=sKu/h7kgf0blMQd2LEWpe+0U4iBwNWSmIU5caFZKn4jp7UH6EEyO9XO1Qyw2gqtAoG 1hrTppzmEYjWEWIylki+l/rvm2POJ6zeHoaxKSJ9i6pHNqEyoI2gKwzADSVkdYvaQqQc bERjga2FPakXo+NjBbU/1NoH/Oi8Y1eUvZ0yIzZG4PpihspyD35qLNXTvHRUOx4Iq1jZ SQ262vygQ7YPb/Jf6ecVkxuL/A7rzsA8OKovyGeHTPGeay8IM6Vtsjz4NzNz3iZsE9E1 /4645/atj6ia9Lha8wDEw4Quk30pRT0YmYZKevS/RZui4UGmsCSrAsZDwEYRaM6Bdj1q SvhA== 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=aLnedmqp0Liv3jUq63+vBWQ6QaBCDUwtBoUs0ehTfxs=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=0Oss05xVgEvhLguH4SXPB3HA+nQL4O9X33sIaCky84ll7vpMfNcEIFpkiVtCfbfioc hU16Yc38g3FW+FGf+KqYBLLTGLxKjnmRycQJA+7YRNhQCbYsogG5Hfc7oHDekndr176k pyeLR2Ao6EeW7X3QXQHAV5wUiEhf2sLeGrr0yFCtuY6R4r695cUQ79A7eKhNAce8Xr0a 9PT5IRaETUA8qu8IGmoutUOXVSJLu238ZNcyycCarAvmsb7ZoDM8ZTh0me0Vb6GjOA87 VXiiHLyJ7MGzhxDez/KtM+VIgJbqN4rY6jadkViEVS1Pxs3yq8Ky09P5qBZuqm9hg9PO K7tg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=hCSP9vfH; 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 nh21-20020a17090b365500b00263f6fd1b7fsi1158358pjb.127.2023.07.06.21.13.44; Thu, 06 Jul 2023 21:13:57 -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=hCSP9vfH; 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 S232498AbjGGEJp (ORCPT + 99 others); Fri, 7 Jul 2023 00:09:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232443AbjGGEI7 (ORCPT ); Fri, 7 Jul 2023 00:08:59 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2099.outbound.protection.outlook.com [40.107.215.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880D22D41 for ; Thu, 6 Jul 2023 21:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aHmJZT+p98ybDGVZlzWtQ3BeG3pWUhJ1HZPU4ApmDwCLk1cdFCpOrhMu/p+DHdszWVcNTLjk7qazEuwfopHWBjc6JfBBs81ulHFq9wq9xjV+xHSJLcBrRChEPve+QkHN8ZM7G3dQTEcJqDqmKwdOC7ciOVk364fhkFAePROlihile2MMBE/kl34E4ncosVaUUvrctyE6P7amSWbMqbT6SBmJE7e+RM2HbRq7NzQ+qypV6JCaQauntaEZMJZWWr3IhqJdBYbvr9PhqeTvMzfIvVqtnA6xjSsavvAooFrXAdhOkXgvhDTut5H8VEwS6OCZVAJIogJzi7fMpsUqaFySXg== 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=aLnedmqp0Liv3jUq63+vBWQ6QaBCDUwtBoUs0ehTfxs=; b=I+8RyEA92Ud8vG6NjQEtHSY4VFqJlY1rZwqnlOFZREFhRLEEGVjwVh+IH8h5xfXVZnQZR6tLM9S+ygS2Mt/pIi+ln+uJ2Gd7TyQepldA2cPHbybQLF6Lzj41+wnBa5lOf7lKz5DsY5c1zBiCeecNiGmCwQgE/JiZRDMsUHLtLaZzCkaX5xp+PrWHaVx3oHe4H5J4ddWw1rS/PjrDQFCeuA+95eNQj+Sls1Bc8A9BUTRnogTP97623CjCEwxMuDfHgm+bWMXrbOoY4+h+9kgw1eYS9nxck1q049tICky5Z7UUcYE0alyZeAS6hFynUnGqFs0v0jll7HvNIe0OBpBlkg== 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=aLnedmqp0Liv3jUq63+vBWQ6QaBCDUwtBoUs0ehTfxs=; b=hCSP9vfHnDSb62tZdwrWhBT8UOq/Lr8Ngif7OfSZMl73NGcg+toL7JvG0Haxsd3qCOJdGDg/RXKiWU0YQyZbN8mkZnHHj44BYa5+ACzrkRK5q0bht7Xc0YVqFjpGUceKla9fSh231jP+EuXSYmVccS1rWFDEH6Qwgod0/G53kvXxIHBenFg+w+TxoPANE8GdCL564bRLjoDE1AoWeFkBaTO02CENnEigqTGSQPJJjooB3JNEnvTPi1qubX5WbPNk4aLK4ZToa4gwFLMlATPigl2HyogarPydo1Oc7wz3IsHV1Qi7/Nj9ngNbMCueNXmtGUFx1F+tLk7JaO/SCSWRWA== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:59 +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.025; Fri, 7 Jul 2023 04:06:59 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/18] mtd: lantiq-flash: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:18 +0800 Message-Id: <20230707040622.78174-14-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 472c6a2c-ba51-4a72-4e27-08db7e9f9caf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q3s0HuUM7nuaUU8c0NuUzJshkF6dzkn+xnCTpwvuVJVQGt/gU4xxxegCVOXx6VDZBjViY3TJsxsF0STqC6AhqiI46DcGtMRqJOHy8j7Auj6FjQ2xgi+LyFvYniUmUSWHhbQ/rD3/55mtTTm/hllYvCOeb2OFSGXxZX/JniUb0xI+Hp1Jl/K1g+yUjzvmwCFanm58fzhvcCyXpgxFbsc8hzOzs/gGwjoFWUbPHf9cQ1WMVEdZp8M0jXzGBopiW3ORbqu9zUcbmwac/xtAQI3TZCb6IrGcM4xEu4XlfCPk3jva8Hu2IlW3WKj0rKaTWYsvzi1QttI19Bo1WyPPHFIbL1csZszpEJcaFrWCcSPFpEl0bA1aiDO//s+qA/hURAnR4YEiwc65vcILYcuc74hSdH+cap1brLmEEKIJoNmrGB/E1DrkWX/VFWtMEkp0xa32A8D3EUtuKQ9L7t35NB4t/C/UP8u27XSPaWWq1FhaiZsPvOQEDRqt/6bRc7OZaI0r+4KCF4MqCOkksyP51uz5wfH3fgxZaX/tPgngzgjS31F0ZnpcUApHdpEY2NKI1LXaxODyuleVfvsmRue6xz9fYRhO9/XGlVmzZNlKLBbcTmwbwEjcZOO8cn9FOF42uYBP 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wXLgUhHDv14ZRQsbWk9pB2b2pXeKuEfVJwzB6O+9QwHNSXQQU+aYRMW3Z483IHScs6LdHbcmvpxbRvmidJmtuAW6faN4MKE2+5OvtgXvubM/usy+CHCZNeXUmxwzEna4S/CNEwPqCI2A2AaXJvMnsvK5wT3kYwmI1sCQ6BFVPQb8GrGt02Ae1tCZtqv3Lca1Wqsivcoz5A2q15VibMfz0ePzE19Hz9+X+bXGoH+xZKgob5i8mMbMXwoGeiqoQbxEgm8t2c6lL0RTNsn6LCVeton3GxHQPuEWrSp+xm3y6K2BCHaSMXZOTwN9g/W4KEQW+KtPTH42oxykpV0nR3f3s+XtFtOEzwAXwvqWHtPsmtshGGy8JaDD0u5RbSipiXSUMeNA7yMC7EzXFLCosViObNE9ksEvdCs1ezFKCEgj06b8Pip5enCWD4hzMnrD52iRkgVI2EtuW7aFwLjd7Tg15vFxqOS+K52kLjRDsbgzz8MBryeLZYR+Dq1GDV/E7X6rraHOZvcrhQLJul//gcCwM2VOQXQ5RmDoi/tqOP6l4PL1nmCkUIJ8u563sJecYQjQmorr1uUadg3298Ig6cPYyrfwOLmqI0EYnVXiYdFw0BmWdWPibhawq/HIIds5Zen9XxKRgmTqugh3KDnyx5XcUTzkMM/0/UVi08cSM7BWNZhLHg5flbOjItzcYhNVaDvnc8Y2eRR7+MGn79HrdGgiyDDcqRA4QFzvk25vNxDbVwqYYaKEuIf5aLxo7S3jM8uigBzSpqHVvU5Socu+TahHFGBpBvadqhcBE4n3MLAaH990XSeKyRFRCQb86Zd2TOHUmgqx7BfkWyNJxefJs+BLr8Q20nf5hMy3LkVgTNqIdzxXTEUlAMpfnRHFNyMWNlyU6FfpcYQBXcWeYQbC2jyRHZbncuIXtd3wzayjsXtHcrMx/bIoR4IpBzMyRmmBWmnUmFg+oyjmxOWGJu7j24NCQvCabSeL1v3Ck4BBhA4FVeoGJy+FgUlBqv2QuaoAx9k2DWVZvUpa/mzvgpEbVzLtzKtdkjmrzHZ9dP/BKEuEWO97Q5qNqo4SGGk2g1+zAaPxzRtGPVqOLQmldPq+VQU9FtA0ClAg27RqAVcd2Ezq5vT3oHpOzXcmM2nVTlmN6vNYJfS0QW1ej/2QWfnuNvS1HHM8sAlUggrbZ2KFqJy47tRNevIvNbWglIjjx6wWOpq/+DjTsvT7kLtYNnLCOGDrgbJdk44/qLUyGOJoKRQgbHVvDIm34eeBMGx52aRdZ+TC1/lO8z6zwCtuf1g5JPj1++JKk6W0i9Qht7uCLVgv247FiJF7LbFYdmjj+K8elWJuql7leQqh3Gda5eqnLtPPpLXJVpoI5RuWKGm20Oe/2xb1BI9KSB7pprYrwknFZgkn1w//odyIYnEora+gOUCvFXKv6EZh1YnOrE1ItwCGan8fqIVJ0D6Wrx4+H2a5fyPIYpvbueHCevL2fz7/0zUajnXVaVVivhWeWkyLMRV403uLYrjMN+u9BpTXD/XvNzXJtOfwv8RxAky2FmXVEVHYbHq7t3noUdvuqQlJb+YeRJMgSOex7mD5niqS63Zeenpr X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 472c6a2c-ba51-4a72-4e27-08db7e9f9caf X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:59.8000 (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: KjAfgKtV1skAXmvRE4FS15BWsKedXEOQ5b6cF2wiYYFx16cWurtqJMkGUZInBb2etn9N3vrUc9rYhae+Msh2dQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770733686293735884?= X-GMAIL-MSGID: =?utf-8?q?1770733686293735884?= 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/mtd/maps/lantiq-flash.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c index 67a1dbfdd72c..a1da1c8973c0 100644 --- a/drivers/mtd/maps/lantiq-flash.c +++ b/drivers/mtd/maps/lantiq-flash.c @@ -118,11 +118,9 @@ ltq_mtd_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ltq_mtd); - ltq_mtd->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!ltq_mtd->res) { - dev_err(&pdev->dev, "failed to get memory resource\n"); - return -ENOENT; - } + ltq_mtd->map->virt = devm_platform_get_and_ioremap_resource(pdev, 0, <q_mtd->res); + if (IS_ERR(ltq_mtd->map->virt)) + return PTR_ERR(ltq_mtd->map->virt); ltq_mtd->map = devm_kzalloc(&pdev->dev, sizeof(struct map_info), GFP_KERNEL); @@ -131,9 +129,6 @@ ltq_mtd_probe(struct platform_device *pdev) ltq_mtd->map->phys = ltq_mtd->res->start; ltq_mtd->map->size = resource_size(ltq_mtd->res); - ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res); - if (IS_ERR(ltq_mtd->map->virt)) - return PTR_ERR(ltq_mtd->map->virt); ltq_mtd->map->name = ltq_map_name; ltq_mtd->map->bankwidth = 2; From patchwork Fri Jul 7 04:06:19 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: 116944 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3021041vqx; Thu, 6 Jul 2023 21:48:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlGb2phQVbpyCkWpCMXha8UR+nBGGvta+cQYUwbyJviX7vtbC7jfvtgwelDykYTGUbwnlwpt X-Received: by 2002:a9d:6f91:0:b0:6b8:f584:2ee5 with SMTP id h17-20020a9d6f91000000b006b8f5842ee5mr4694498otq.26.1688705315620; Thu, 06 Jul 2023 21:48:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688705315; cv=pass; d=google.com; s=arc-20160816; b=RVRD1Sc9D+y1YT2aAXOgYLuEkRe1WEKAnBSAFWJguuCDCqdrTqnLdyHi3Y7JcJYwOY TmEStMYmbVj8pkLB2sGN7sMBZyh6N1qvs77jDOgF6tECsHoUGjHNFmnPCG+rg40AeAbR cy/6Bq56iQsP/tKtgdDi1Uu66FyeLXnPSpUeCjLq263DBf9xGchXC59lxIVrRK3G5ld4 1X10Lm8ObW4PbhToKCJ9liGUZxI/nF+tf55SkcuEBPQBBG7URRqYg/3DtCSUQN06caVr iJazVvYFR/ElAUdwQiCQCcwuEF/mf4s/FUU9JkFv48llQ76WWJqfhSsuUdkoRM8bq+7M i6wQ== 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=Sls+Na2mUCbEQBglYboXwewsLAk1nUfvVEOplEK5ZVg=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=ZYgEk/+0Pdh0BNgveg+zbJp9jMOHj37dcdn6BkYZpEDnKiayc2r0b6b3F8uEOQh6QN 63EcFOx96zeRcWI8PAVsc7BYHLAxOikXqPw4yyzoNqFpY4CZnGIBypJc0I+0Dz8OV4ZG 7GOeDZeECSG4se14gMfc3VBgquy+zlkrtFX+HKiJ6uX9imjrBhCe6LzmFcy/cYysqRIF cuhnUrpv34kmDpJ90IHbiI1TmSSpPCX3/uYEUTgFrQSUC6VrzahNgKcA+NhW2Di4egd6 hFWwYtUYGFd5/Jd/1jOB7LLvS3KzZxhL06T0ovl0EtsNe5NKb1iojQsLXz3mqOuCpTL0 HwTw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fGbAgGqz; 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 q5-20020a17090a304500b00263baf744dfsi1181220pjl.139.2023.07.06.21.48.20; Thu, 06 Jul 2023 21:48:35 -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=fGbAgGqz; 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 S232520AbjGGEKY (ORCPT + 99 others); Fri, 7 Jul 2023 00:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232408AbjGGEJj (ORCPT ); Fri, 7 Jul 2023 00:09:39 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2139.outbound.protection.outlook.com [40.107.117.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6152B2D67 for ; Thu, 6 Jul 2023 21:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mkNsfmQNw9da33dmgg2ll8VVvGHLpqtg2MUKfcsI5hknLFXUR9+kqnIC/5vBR7/n2IA6xuJ0AtUZvWI0dSyoJZeCmmulKncVdK2m+Kap41/RT1L6ENCBW8wVxLDRkJoZvCyfG+ug0hy0D1oXX88hrIh40V6vi/VN+yBnXnLL3npPJvIqfGJ3zdlbQzc51BGlw2U5KoMorneWq5hjeo5gcyCtRkZVtwPzjiccx6EPHLK0ZE0E1/Ns8j53crTRv5FcSpAglsZmPtZZKHs84kXgjmYJwXu6LeEXIhsRsO4qf8cQ6Zi15Vrspf7hop7hDuN4MQWW5rkuAd54DcPuT/bxWA== 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=Sls+Na2mUCbEQBglYboXwewsLAk1nUfvVEOplEK5ZVg=; b=Yo1EmnU9PvMMixFve8FGKkuFcckuSHb7b/n0MBhNc0pDwOlp4yrbuhJ3u/Us6IgV1hdpbBiaByYSVrtL0vk5BfGkNTbNZgTypQQB/Xq9DuO8mBpQzWeD3+AnUwwqd2Rft8M+5W00+ikm19h89YgyDlfcdtVP/Qqn5sCmHU17xm2SJOjFQQc0xZtavHAEjPYf+BfqP+vzZe8P2BqfgpI558B4/VdhwtmYUZOzi6u0trQrleTxilmqxnowDcpXfK+TOrcHI+o5gxJ8i5INYZz7/kHYqivVlU4JgJUxL9Fc7YTYKuboNeRk6fD0k7TK/qLo5CmjVkDN1Jt19nw7utLApA== 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=Sls+Na2mUCbEQBglYboXwewsLAk1nUfvVEOplEK5ZVg=; b=fGbAgGqzk70ZWbWtlelaXkdeHlW+36opAyyRrblpNVT1PsaxsvRGV9kxx2fBEfsV0olrm0sK5jQS8NdW/6mWCGe63N9Pjko17FZ1SwPleMvDGxn5SU+bpmbvb+LIiWDt9v20Stc1szCeHBSZcTmWAIIvBARWMF1lmlIpJaZcwvUSiGZOBZ9+HGlvRSHE2UK0NpVHV+F3XdLK6oredu/SSg7uzqHwR/KdRGnNPzy6yIwhxi/n1IgyNFrnNAyJSqKE8bwHSXDpGHle6kMbyUBgIImQibifwr7rPeDbAFoQ+k5G+uqmuyF9/VRZt9wTCldZLhk38RREB1rX1qrMBM4NnA== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:07:01 +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.025; Fri, 7 Jul 2023 04:07:01 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/18] mtd: lpddr2_nvm: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:19 +0800 Message-Id: <20230707040622.78174-15-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 2baa1dbb-a169-46e3-36a9-08db7e9f9da7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bRffRDcYrPtJPwfappE4iiezeEYre92QO7QZvGjtDtmf7E/OS7/KpqLVKD+qg8ida6y3HmAfsv7QMJMoS6WXwTAA9MSQlVgU8nCEr0dj4tz+nY3/RWUrqn95A0BlItQNjpK01kdS/UuRXriUn0/qeWTIgxZSrEeNFpvfYOQxyWpzLHC5z3L0pRG7HOuB2sPCaXA7byKxBZZRPV3+du/JvOMwiDUYcL9a0E1Zv8xSTtbSXW99HoK9xn0EiTlksTQPQ2pF2cRduTO8hbC5PvFBytbYSOHk14Cjn4+3U/eLlkj1cq4gmC7dN59Y2na2b17GuBFSQ9TDNwHPxhe/MdovATr40nePGrFiOde1cmqmMZsFb5c4oN7NlyfDLlgQ0coTYWoJPeLqIsePGXxOBfFVqyXbHvN/mVqEWo6JgKgJHMucz5gO8ojCX/6/auz9NbMFp9iLurhTzTCyqxGj5UsJ4aNLHy6Jfe2zgZQ4LRgG7BEmABUq8lmXBxVIiJQwrYRlEKZT+GpohdxD7j9lsMKs7qw9WFYcwRK3lxZ5vwx+6jegaEWQFzSsIKpQXMfRvZKGCdu46yVl2iKp4yiz6OfjTYzxOSK+llvKGlcock8EKBf+WLp8XHIUeX5wjG23Vy4V 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0m8R2xXVeNyPaypWwtbsMXuwTXF/M6rCRaZgvLovrElHzR/tRpR0NBCDEe4+C6/goHN5dPe8XNcWVCpZOV+4Pm/Tm3tSdwbQMFAneIb0YXeVMKgoh/yyvr10gJ4M6WsYTn+X23NSC8DJgyEY6pLfECEFhnAS0wXieFjfVsAcOx2mm201cmrp9bSfMVXmmtYE51/YFDJwRe6StPzBTIUE3PthO8rPIl4iXDASes2EzOH/ExMJ2kqtdC+PLjUWDDC/wuqIEEgErmBzt0lgIEreKNFPas3iIJnPn2ATbnCnAc+lxJ98Gt0Equahir0fUUcDizu9ZiJAHZ5keKUvpttVJYEe8dKLC2pEdod11/3LCLjil2mcoCv0GK72Ac2VusCgyZN7VoZeOvkd/TCbmqonJg35z87Jc0j3G+/TjYAFjaFQ4jH/blOyUYiFAXRS1WiXtjMBWQU8azP/OdVSrYB7y/d5/TiCb+mcW8v35g3LjLEJTCVnMstZFJktQRggec9uhDJyYL9Hx/1BIMxNM2JADJ3nFyly7+hTH6hyXdo8MwJCiGeYrZfaFwN7QqhB57IHcgfbQ+Dtwa2aoCmKTZjnU64XVT/45XeLP/C/tODO59iheBVZS9nrpXGCuf1EcAcLfHPJUmHwlWanLXwxnSxLWgWbVgP+41/7lDXRKOmok5vPL3QJ4my8xqNJF/F/JVdg8yUSxJMtV9ARJC06qVnwHoCB8xuw2lzpbuO1cazJXaj4WLsig6KwBuhXm8wqrIjSAwOY6z3AYBCFm+J9EoOyNoosmeCFmGMMh29bFH2qUYvlL3Z2gB6DaP2zELdxl5r4SD6OK91UoG+5lIZc+gByztoIoSUCX/IJZL6Ks9ybFJLghNeJzvWYed+tLL5mtn64G/yW+vkCYvdvJR/1nwC1jUovMaHgpYQ4Sx9tWD8oqobUTkzL3DhDS2WN03/v/8F02mrp/MVuC5Yn+HEK0jjogkZNFa4jGU0k6HacS6FRbOdnFH3dnWEyn3qA7TqaMvCZ7RWlrJ++Cd1O8NN9n0WWPCem+rFF8aw9fONIrPss/LAMbACgorBiJ2hfn9fI7vTZBaG/a/hWOrUxh+XZy6JDDy/PJrYdfTweWDTcp0bhN3aC07NB4hEHzbLVeJhvBsLSudzUoK8PlAr5x84L61yVifWYCb74JR3TvOLILsABuE/GVW+aFtwrsQ/maKMNiEU4W776SpCTTTvHPVf80kVnZlCNfA5NZc1axnXEWJTYTSAkuCWNY4i0NMmbD51L5bYhhrHeSFoDLZKfQD1Z5idBFqRphQbZtbOHzrHtFlQdRF0ABnMvgyeVKexF+i0ZDauC2/WRVURCay1z49T6bUSZXYwppkmXGb/+T0Vib0IgLCvOJgLv6slYxcCPeXD9EU7A8/A7AgrAiLXwa5bC6cztkLby0I2EuLLI2jpXhqO9Rdga+9o6yHmAzOJ9MGw4Y9W2fegXRJl3QWfVPyneScuehRA6An01EZ2xI/rrJs8HRMJi428FSA78mWWg/+uUMGlCy5fTBuvu0g2uynTtW8WMVsj/VvhsKgG2vuPxNg0m/2CEObgHMDyN/woN+JeruG7p X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2baa1dbb-a169-46e3-36a9-08db7e9f9da7 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:07:01.5315 (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: cw+rCn/BVsTD3bPBkCk+WNOgYBcwS8n9S5yY4eOFeuqfjX8f2CtncE1gIod6ScMkoEtrV/PKDt36KAm7t16lcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770735864913042135?= X-GMAIL-MSGID: =?utf-8?q?1770735864913042135?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/lpddr/lpddr2_nvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/lpddr/lpddr2_nvm.c b/drivers/mtd/lpddr/lpddr2_nvm.c index e71af4c49096..f4e5174b2449 100644 --- a/drivers/mtd/lpddr/lpddr2_nvm.c +++ b/drivers/mtd/lpddr/lpddr2_nvm.c @@ -412,7 +412,6 @@ static int lpddr2_nvm_probe(struct platform_device *pdev) struct map_info *map; struct mtd_info *mtd; struct resource *add_range; - struct resource *control_regs; struct pcm_int_data *pcm_data; /* Allocate memory control_regs data structures */ @@ -452,8 +451,7 @@ static int lpddr2_nvm_probe(struct platform_device *pdev) simple_map_init(map); /* fill with default methods */ - control_regs = platform_get_resource(pdev, IORESOURCE_MEM, 1); - pcm_data->ctl_regs = devm_ioremap_resource(&pdev->dev, control_regs); + pcm_data->ctl_regs = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(pcm_data->ctl_regs)) return PTR_ERR(pcm_data->ctl_regs); From patchwork Fri Jul 7 04:06:20 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: 116953 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3031356vqx; Thu, 6 Jul 2023 22:15:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlGoiPOAZiG0oOLgIMtGxbFJtyaF+Lw1A9dW/7LrA3s/CgbB4ak3i6N80R9a+ZPsZ+5IYQsT X-Received: by 2002:a05:6358:4407:b0:134:ed9b:15a7 with SMTP id z7-20020a056358440700b00134ed9b15a7mr4027667rwc.30.1688706903641; Thu, 06 Jul 2023 22:15:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688706903; cv=pass; d=google.com; s=arc-20160816; b=vXbkUU+c7o4Yb+0M6GwHVIx68YCMEjpe185ciecPV3ZdWO+fRnLjkqL/OaEfT4ZK4I tbf4d4XVbDcQIPLRcL2BK9atPJ6kDtTBqJGUZ8/0BvqLWhA8GoqoebKrur3yWAWf9Cwa 5JN6j8JgNwK87WjatjppTFmVrNQJtxAbZnDYeFwNG8zWTjqaa/X2OuyjfbukxXIIMFHG YbQZGSr8ruYbEgMgozCAWolxuujGNDmGxzdoIoYyn6l3yYKQ9nE//1GFGArCEjoLOhae HCFQh9YedB3kp9b+shIiKM/Z9hrN0QAMm9b3C1i7Wrnm/Ad7QlH1kdLsQZjwM4i8RT/X lvXg== 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=veaGrOk4W7LBkRnDyPIaURF3ICTTqQfsGdlLPhD04XA=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=ytXXnc9q5WuG+D7aLHTVnU8/Bu9pt/DKBg+QKK7SAJcQEnr94/EoKmU/mpY0wge8do BxpCuYeRJrXksY9AIIT8R7IPgDpylmtD5o+LEexbaPf3HIQZLz90lGErbdlba1c9clNq eDuKIg7ADWeeI4eYYK2wOWFTgmCjv+Q7f7oEEKXXXwOrA4GMJiat4YxOR47zHC37C3Wu ziKlB1McW3XUNMlcEUmBbfntP83DhzJ3uxlvLdpQFFiSJVUUYxi6XvXm/zioxCOMOWVw y4wGrz4Aj1oWVlN9VvdK/Obu3EOn0g/djGN1QG6Ir5+PNUYfEVJVtRr2f4uBqorRjFfs a30w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YTlqnlu6; 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 l63-20020a639142000000b0054f77fab83asi2881320pge.459.2023.07.06.22.14.50; Thu, 06 Jul 2023 22:15:03 -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=YTlqnlu6; 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 S231952AbjGGELK (ORCPT + 99 others); Fri, 7 Jul 2023 00:11:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbjGGEKd (ORCPT ); Fri, 7 Jul 2023 00:10:33 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2139.outbound.protection.outlook.com [40.107.117.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0379130C6 for ; Thu, 6 Jul 2023 21:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cScvd866mxtlB7evb8DI64dPAACuRrKdFaeL6igOsGwG2N8dCTwnrdXy2lde7Nkiyql/l4HpeDGdPVcKOAsDoQl+rhRn3ahNrITt8FXDkbfHqjnfM5PYdQDhWP5HGy5m/yg6UXQ7ugiMcUsT4NEOIn1vMgwZH7wWrFIWQxCWOtRu7Zrd/8kHMTQDVLjBFEu58xszfHl0MmNsN961nOXGYinXPO6UTD0U5/s6RV0uC46qic5UpYWFhl1illZKaHy4mxGs3Vl35G8O8brmoXIPRz9yShrkKd28gbl/DwNX+IbWD+5xI0yMDQrzLnJ/Tud685HztqC4tsEsOvw6hy3+8A== 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=veaGrOk4W7LBkRnDyPIaURF3ICTTqQfsGdlLPhD04XA=; b=j1XLYi2T2IRqLuJscEtrKRfQkIpgg7pCqhrjgT4OT5CBT7RLqxUAsRQwp1fiabxVMMJGL5bpKFeijRc6rN44RnTcEvKW2VUCEBNO2RemNwXabKo7UlRRSQJWx3HUW3yz17dbWlvI3kjp7ZiM22s1UF2bvVEZzbyKt0BfOXoXtplGlIeHZKhOAF+1CrSDvYEo9JfmPFd/PGCC5UVx3w2z/qwPWPo2zeZpDvFern3bx26wYZODN4NVDTcxRG5ebHojuKhBthULrDvqpM7cmxTP8z2ucPLIwHTRBOfDR9ATTM2Y4pxtYUOdBmHN/Ts2qhexlkeHNOpKbxdYsSJmvfjuhw== 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=veaGrOk4W7LBkRnDyPIaURF3ICTTqQfsGdlLPhD04XA=; b=YTlqnlu6L9JMLEIWi5dYfyKdCIKiGNFcy03e55MmwLEN2yTRW8/2XhhTT9StrDX6k+jkh5T8F2Gk6moaIqBLXZykUfb7RChQuSAWwL581Va1RsofCqGerh6pb2IJ3BCHQztV8VBfnyUZp9qCEOvOk4SYitEPBUuXp8LUMxGTY4uMocL4jua+F/B4Ulc69/cZ2+BQoG/OgS/wUQ0k0qfgJxNGOT6hVDWKJlr7fQfRCpOvHcEj8II92S6IaKyDyv6reBIe316kdYt24BbEon3e8MivrPziq58BZoIUeEFkvompRn7UkSC92G0MrgEvRQ2NYIomk255LuNycnWX7zvc8A== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:07:03 +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.025; Fri, 7 Jul 2023 04:07:03 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/18] mtd: st_spi_fsm: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:20 +0800 Message-Id: <20230707040622.78174-16-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 06272e90-4bab-44c9-cef2-08db7e9f9eaf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AqO5+ElHY5/gMEJtW1BFprlCEuSO2YO0IVDgJ7qwOUF08/KLG/M5TTRjnUdOV9fpbgENo4BFzbqbtWV1KrCa9geIsWz0R1rzDxve24smDfwWOu+oqT8UVDzZLGoep1HTwlbAPfwjD6DXW/QSlJ/eHHZE7PCUGX8ZfqHiB5Sc2Sc7PvVqvmH5d7UdsxvJlsheAqzhmvcBtgd7Li8QEzVpAaUi+8L2fpeA0U4GIokbeJG2BHk044DMkHdOHBGmEvkjxnMvL3pa76HWkRdoCun1Iny2qmbu9RzVrG4JPwulwMIgUYhXzt0/CBaEDccIqKtGquFMKY0n8Jrff37+EKuf0iNIayIwKushHr8Kx1n+H/f/qmyGxswTaNxOpCWq8fI/y4lFIxykC2gaJohGkAC7Cp6USULs1VL+f4SpWsxbSoqVCysk2VyrYZ1qJLcfXEv4bMbXjskQzifdvcv3cR6YXN9UQhIV6vmUDRikfvLCotpQ0ctQTQzV8LpQ2lmVMFCkpA+NOH+ltYtlAi+zTTDvBqVWixIYrUyClOGq+mnb31/bePEmSiUKl5mlZ1CdebYNgYVDq6df1Y3t7tNh/xEdT8FeydHFGa5GkcizLQpHZOp3Wx3I6iiS54D3TYwxFbxk 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dnM7iN9DcD6PlImcuEwA9F2jAITlSiwFLcyOcY5t0oWejB5r1Rdz/egOlcbr9nJlfvkSPjnhvRKw4aKRpdiU6zxUdkTZ4CPIFiZccUev3obqfjQ+fkH8jOwT2/FKqv5YsaEiE3K6G4bKC91S7zFpASNbxplBA1oKHhS95zsRFRrAk6SjIaogkpvzHQf4M0musFdYP+bagkQ2t9kbL8010laUvb6csors/1kZY1Ex3rdLAgU0L/sMeEPwaZmc6WTakSRKaG1XOV/k5notTT+puX+dcyTfRoz3BoSJk7CT9aMtclEezmXAg+7vWx60r0orMMfoXgEliMc4XBty1tasOL5xY6uyK7ipt4UnzoyeYZXyhEPNfszod3bG2chgruza2N7bp2RzK+n8Iba9PsOU3eIPxJF6xAzb+HXQ4pDqwaLIHaoK78TFWs2p6inLYunIc2JskoBoWU5jqApZS9Xh/8FNcXlIgAt2FCVfSH3jSk8xf4GyGmA5l71hSWT/aqXs4E46v8HVwv+clxQjBUbQFe29LToBHwd266KJrLv/NWcIvchl1ATmlkUv/xfxDibzU4j8hRrtd47ktyPTpvV3WT43F7BkG+ZqBbufVEKzt402TI4eEV0ij6WpDPjkamiSPAcEVUGQ2BLAAHIRoVth0qq18+N6zXAuxBvLV5to7IH0Q1EGckI8ZhpsaLLeR+NBQfwakQtLsuvf2yfp8/iq30m3PjffEi9WEF52C0S+EQ/M945qISd7Sb7d0BaUFdwJU7CKZeIl7qjg6Xhe0UdFJCEEz3xOOYL1Q1KJNy8uSiXA/6JfsMi2JmSfzg9d4bWv0h2E5cW1wO/LylOPJO3qI7XjvsuojiBhJG6Xjl7SGgw82cXipLvBZQsbetqlgqsxy5MO/zQyozQgAaWwWByAcoHRn6O9iX/93FySp9km3WxIuCE7IkMgN9/wFiGfwOAMtrFkvsfI3YcL/5l17zxOG+5O/aAeD/2sABkRRtwAgJIxpdTmWcNUHS+GiTH8/9Mj05wKQqQmXD2ITiXmJM0INn+HJCJm0j3ay5vdJMsP80lyR5xQ5hrvHQ+eddGRO/F8QehTuIUbrWcmmcGz9DaEu6/+6lJNqjowvDQvYZ2VZztSEyH2o0aOK9igbwRd/TsfUMr9Kj6ocTUb/UdH6fKlorbrz/m0FWeXlr2IL4UUWms2VzMPhCTVUv1rgWeJuk/FgQQ1+1JHpiQrAN4grdDUz9cRikFuii00Ep4TuaPDCIP+YqPUY+w0yEckOGNrEuBMggkn60MDMF3GPYsuCf2i+TQ4zl8hGqkezsc7/sizb0yjnhMhK4iXPoMSSj+HXw12hEsuryEInwAyoVZCFSmMR6Y/nwnT+YUU8GO+9pL7G+N9iGCG1k8NwMzPN5RUAn6a97F4y0E4q+ByBFyDayOvY124OpzhhKwvF9Ge4vQ4xrFbQq6Xkpz5DuDg2qsZ/bWI4+NKq/0Iymor8yZB9zVfrkBP/reysRwST2NKliAIB8Nlf62iOzI42ly4QltG8rvLuHotGRfDOYIZ7lsezGxv1mcnszuRHs8pc/LZIAxIByxCTrrGJd2Bbi1OoqU4mGrj X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06272e90-4bab-44c9-cef2-08db7e9f9eaf X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:07:03.2235 (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: aQG71+L3xJ0l2pOqWtasg/SFhLhSoVrCCTpMyDDIc3CnZpKRpOoe8mwcaJG+S/V0ho1zfZK//W22+/Qno0/gtw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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?1770737530404556651?= X-GMAIL-MSGID: =?utf-8?q?1770737530404556651?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/devices/st_spi_fsm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index 3dbb1aa80bfa..95530cbbb1e0 100644 --- a/drivers/mtd/devices/st_spi_fsm.c +++ b/drivers/mtd/devices/st_spi_fsm.c @@ -2016,7 +2016,6 @@ static int stfsm_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct flash_info *info; - struct resource *res; struct stfsm *fsm; int ret; @@ -2033,18 +2032,9 @@ static int stfsm_probe(struct platform_device *pdev) platform_set_drvdata(pdev, fsm); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "Resource not found\n"); - return -ENODEV; - } - - fsm->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(fsm->base)) { - dev_err(&pdev->dev, - "Failed to reserve memory region %pR\n", res); + fsm->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(fsm->base)) return PTR_ERR(fsm->base); - } fsm->clk = devm_clk_get_enabled(&pdev->dev, NULL); if (IS_ERR(fsm->clk)) { From patchwork Fri Jul 7 04:06:21 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: 116945 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3021410vqx; Thu, 6 Jul 2023 21:49:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlFIj6oVeblAw36pRfXCJ3qrAJ6+CzlP0dY6b9KdMHFvDJ/viI/M/QLDlp8wQTtuHUv9YiAA X-Received: by 2002:a05:6808:3084:b0:3a1:d629:d1dd with SMTP id bl4-20020a056808308400b003a1d629d1ddmr3978877oib.56.1688705381384; Thu, 06 Jul 2023 21:49:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688705381; cv=pass; d=google.com; s=arc-20160816; b=l7uKQsmHEUhv52V9MM9ztEJIFg4D2dbMrQLqGKvKM2i6vNTetQoWgcv8t0I0qNaiwQ CY4AWMqL84unMzHz5VGXhmV/2+ULC/f8NvCLqe4tR6R/CGb5lot6Niaw1qbxapw3WG7Y WSYhPS1OYJTBG79XUgUeKD7vmXzn+349eEkgKQjlz8Chgd7rPuDmENxkDqSmgvVu7Rc9 DwoQiwK9S3dRLl0ZUH71fYwHN9sGyA0C+NB9RZQYu75dw3KC5xUB6Qt09R9B4Ej/7eid 0kY7PfbWbSx/R60gXHSv2/g9d88/QQATocSWwHckE2dt3qHyEaohmBFeeGR9TsqET/ei T/FQ== 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=Oiux6bfSStl3D4931E8/30VqNTqHrgttlUkj9MFjPTE=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=D5rQHyKNYfYIIuCCo5DgtLjoCFHbKUxNbFhdksjqJlWwguUL0G8c70TsJQ7rMrcJ9x 59z1lum6IuEwqS4/ekil6uMuCPEmoVgSB2m2/3BjJSIKBuxUA6JfOzFdXiur8hsCdAX7 pRPHdjb5+vl31JLXlX24TK/tqg3E3B8YDnxEWWImZUaTD0ZhIPHXru2U4jBb9of/5M0t Yweq9xhG+yYeAsshPsdZ9ti3dduKhevDqdZrvFpAxtlZ7ev46ZaWfAfbj8GMED/9LMfL jGUuLsn4ZWP4AYrpEV+4q00i5KxxDoooU5U+KqFl79mCO4XjuDdiD8r7UM/0oZdkw3Os 41KQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=MuSEbVII; 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 q5-20020a17090a304500b00263baf744dfsi1181220pjl.139.2023.07.06.21.49.26; Thu, 06 Jul 2023 21:49:41 -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=MuSEbVII; 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 S232406AbjGGEK4 (ORCPT + 99 others); Fri, 7 Jul 2023 00:10:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232391AbjGGEKU (ORCPT ); Fri, 7 Jul 2023 00:10:20 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2072a.outbound.protection.outlook.com [IPv6:2a01:111:f403:704b::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DADDE26BC for ; Thu, 6 Jul 2023 21:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dqjy5b+JKBEJ2uMj0Yv26onCbsj0clz/yektES3ZlR/U5MRrTrnljXfeNccBZJG08JlPhjk/1Gau9yOBjpTGQ7oqBAXOmxJECe9Pb218efhB+EJmTrtuGgclysjn+1oLSI6oraTNbEuT4TASNfMrZ1fCgDkcjPSkj+vyl4a6GGWte+vluBuY1+ZAcn67ZkOaL00tqMUKbNzz52fa2NDJSw+ufZ7ZGj27LM9owZg2BsKmrUC+oPbS6LTrB5ABJIPiWKwy4GP2RdRORd0u0D3WplEY8owXR9f8YCsrf1WUPBzLkZ90SCwn5+LYoSAtH8Bo8oPHiZcZuNY6k7UBXTvP2w== 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=Oiux6bfSStl3D4931E8/30VqNTqHrgttlUkj9MFjPTE=; b=X5s8LXvP1vG1nLY8k292kgiMz8PoeisB0eXw39dQsHimdRkexmm7oFF/nDyhAbQr86m3al6BMTYCUMKmKCckOYsY3bWfDHrwMsGlONn0KZGsmIsqwY2zjBPONAdzwG7rYJPy75P3ixvsE4MCYlErEpfMd4IyFcUi5eAlxbhf3y+emrihIVmBxEduUKo04lC9BiRE4wC/cP2LfCfW/GtjIp9ShwHraWYrX7S4QQzDv+P7tXeEMlKeAJNgFPlxKEwXyL7uHmE4oloo+zOM+dWf9++nkng7FfhQjEJ3UYUxSY+3CWxoZcPuKoALnQUcI1ZSbcc15fyDexNi2oVtPyxCvQ== 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=Oiux6bfSStl3D4931E8/30VqNTqHrgttlUkj9MFjPTE=; b=MuSEbVIIngkvCxYUNXZelmcV7y5/hZYXoM8tHg5Ue2kXLD8Fbp5zae6t67NbUW1H5kLi3KP32LGvIRI4DQ20QaVhzGqiPeWCt1Fb2Ix+0F2MSpuNmQqrtnzvoQCZztegcZBfLdbsBNVKH+R+vgvCoCyCaCXPdFBO/GaTZPQO33CV2OQivkJagInzGN1Y2mU/vXHVNLNHVqaQiau5sl9BVsR7dtyQ10w1Q+4ygHvVTF1p8fG3OLKF+tGaXIcE/6zoePiBFLKG2ne5YZqyJnlbinxmRtBIvPtY6xZn4WJzlPQgngF+5rgOIM1z/Aq5LzOX8HvbrVQhgpYJJhC3k9M6pQ== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:07: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.025; Fri, 7 Jul 2023 04:07:05 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/18] mtd: spear_smi: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:21 +0800 Message-Id: <20230707040622.78174-17-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 340b5357-43d7-4f68-04e7-08db7e9f9fb6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mj9xTZ1L9xsSKdOBO9gf4dx6AnsSSr9W8tZy79MakTJ7gP57iLIg04rMKtoARW3qwThxRvLDP67A5fausi4p87faPGFKw+ZQ5437wmA0zWxTwW/yMzmN7NxfUMzNSFD/kMwkPDQLFHIqyo80dYRITSRCHd86e9Y0+DASET28/jy/cKbIpchrGME8ZL7INqKp0MG2ZvYrtq83/YnBBpLvx2ql/jfWUNPHODkVventbtrJ/KJcJ/gC82M7sdYSQXFhhDLIIwrv3mxPKgCTu4b2fmgZMT0vGyt7sGrDFMu5Ss9KapdHUea+Sczbg2S1vLaJPDG6Yc/E6SskLVLQLbxPACRjj525GCK25gN38bojoasll1LvhyVtbPqKpuheLbVrh+n/ocx24W6gHEpVJvxH2AdOaNIcYxUNHAJj5tcBigIMQo6FNNxwn0SitT78qcLeo2Od3GVTwAgjgO+anRBaUcSZUPYxmfoFjMm5HcNeY2o2aGI6IFt2zly4qsfsUVifNhQN1NncIyC1M3Ot5/eReeSJy7MF/xxQjesf+1N6EgIDidYzs6qL/Dzr5vdKrKW00+JIaIcxwcwCGe/3XCOxwMd5Mwjx404hUaIeetm08PVBw7z5ccT5P9vqJyplgZG3 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8WIUIDg7aJGW4Xc9RCg2TPQoNkWbTrqom/eJGvWFpTzawqCSMcedF5l/lA7ubgNwT3MNov5TvvROvdKXB3Pj8fh++sWXEqG6mdRrgQKDRmpn9moG45tRhiLq5P2LyG9pqdPQHXBKkbXP8iMdo47+MyKx6lmH6FZiRaODl5vwP51Kwjk8PXJiGNqik9cHXnqGyF5h6rsQmFgDeKpv32bWU1OZ6QDIG7Gtc8DSiyyiWEztpAblB2qaYJlAKNzMWF559/6+yim3/5iwLrep79zQ0gaW9M+2MJpNP77pERF1/96TEb55ARyi6IIk6GPrViQTLe9wTNaQFBjN7uT6c++0LYCIKRWq3neNfk7gmpFJMBxw50SGw9u7tK+Y5cFlSwNGcRdbB3DwTgfAEuqwmW+fSqWQrWX/tDlDTmCbSW03lzUm37YXF/9Twq+h5o8pUqMkAztaPDQjWOMixdXJDSAJDhNtyjEOslfQVGdq2NU8/ofljkLlNQtPL2O7vVuHrTHoFRlAr+TJ1RiVCf+fFSgAAaPhDGKSqPKOzBhC08iYJu0fPou3FRQtMPhoLTv/4rc8uaP2eIYuc6gBdlMKmRL6ACUVhg+hfQKENL/88GvVugDkxEcOXd/w9qNKnisYpUSS7doCi4LXbZLKJZf/bxIQYKiQjXeDSJVAVBnDSPd/IGBUCzNkjNjsnsJScJkDpEzBsLgULCkEt/1SZuoVpakjUe/ErNZPfuYZl+yRm+dAbGEklcqgA6tCA6QZwBXiqwM2FUV+A5Uax6OoTOwVxoEyHVcRFlFHq/vJOBuBZYnGr5hVx0UqhDPZdIteP/6/kDBigaA+KTSyd4arZFRkyO7mtL+1n3p/+G9jtL5ceFrBtY6XlL7M2TvXUqx8TCFE8WufTUu6txjJ+ZdWpgrHZtZcKGsyJg0knU1ZcIkOiZO8hXYb9/wvDJMKVZ4c6EZPq2R6qUQv0EVqtaLgrfGUMOvPKpgJBb2igUGT/clm2Vq+3422TVCBoKlV023sKsf5IoI2osskvXpgo+dm66czncwPoDDOABJEOtAdy/i+ySr0uH61DyjRR6F8UJU2A1m9Z6XlnCw2D6dlLM/gqhMQOQWHklY/Ol6GiGnsPYDT5O2qqGwV8ZgEgbM+l8BV0ETbLQsOhOcJUdVlLMOAj4Zr9BzGpd7zAElJc4cSa/OGEAx8ZO4SBMYaQjjdHSQ/iFft4p9XXd5rIBM7ZRtrKhoEuiIIeU6ngwfk7y1321wC+JId1ZBWcXNQ85Bvjp3UkZJYmpJj7Qd8KoGxDROWrw/JW679qasBscFAm1yFM6Yz7Zo6PS4Idw90Wu+eb5N3wI3Y3Jg1lO5QqEzk3c4GysJDCxKft5b9OhJcNjJ3Nj4i9vTY5tVIYAi39xpnqevcjep4KHC/BEqTU4/U6/EZR5jFGQ08+/wwhC54OFE0yb8sayTVrgiDcKGHtE2ynNe4pggDtmXMfptXPQiu11uAeF5EJgD3z6tfMPTsO1j15gpIguNO8oHmFgZzDbqRlw+XunyKSbAf+eVDZtrHn3S8pgBiAkcnQyt8bLsNHjiYfsrXdDCgfkvFbea/yOjZckr/NCaXmU3Y X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 340b5357-43d7-4f68-04e7-08db7e9f9fb6 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:07:04.9453 (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: ZoSDHhg3U5GuZITXkYdRmbPXk9D8s3zID/eR8xdSo2P1qI0UqhBiOAnBy0Nz2O7+WCt3jtm4+S1J1tv2La6nFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1770735933639407736?= X-GMAIL-MSGID: =?utf-8?q?1770735933639407736?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/devices/spear_smi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index cc17133be297..93bca5225116 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -937,7 +937,6 @@ static int spear_smi_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct spear_smi_plat_data *pdata = NULL; struct spear_smi *dev; - struct resource *smi_base; int irq, ret = 0; int i; @@ -975,9 +974,7 @@ static int spear_smi_probe(struct platform_device *pdev) goto err; } - smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - dev->io_base = devm_ioremap_resource(&pdev->dev, smi_base); + dev->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dev->io_base)) { ret = PTR_ERR(dev->io_base); goto err; From patchwork Fri Jul 7 04:06:22 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: 116937 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3017128vqx; Thu, 6 Jul 2023 21:38:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJBvaR/ugVBfuzvucjVEOJ1S+jLB6oWPUeCkSMTXrOdhRR7bZp2iAiWsPR7FK4+GHuE5P1 X-Received: by 2002:a05:6a20:a126:b0:12e:92c1:e40b with SMTP id q38-20020a056a20a12600b0012e92c1e40bmr4516347pzk.47.1688704681604; Thu, 06 Jul 2023 21:38:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704681; cv=pass; d=google.com; s=arc-20160816; b=WTrQ/3zRG7Ney8Xfn4b1woXB87eeLbBDKR64a9+yYwfQ9ZtE6D3/YPcX2S2NXeSF+2 Ih3nC3M+iruTLLd0vvC854YBSYkPK9WjZacyUGtJ3nFZHsX7r1M6Y3UoTa5D11yBs4Ko qNGYUyL+uhf+2gGDNkJd4/XrOZGcB1LWz63oKG4ckKtv9ZVE4nBrfZDIwVdQu0NHC8Fc pFX/jarWGkVUbgqtnttEj/2VFBhaFtbT3RcVYnZJmozLZ2wbPYH2mYwD15m182zVhdEX gA0CnIlOGahB5Xvcrdtd+2QhGzZ0qJVXFVPvDOLVKqFjBHmkCF+0u97aDOPDvu8OFYrt ov/w== 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=q3B+SLIcgP87LG6wrX/sVGPC2eK5c8Quj0o2bFw8EGs=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=qSdszdKGCjbPL0NOXkqwmXH8tjQySfzA/6vlxC4TOgKGW0V8T3Ha6QV8Z6MnKxidpF aNlQt4nELU9YFi1vd1VpPNCgm4pd0p/8ynkM9G+ZmYIMKoh8jl4vw+/tQGMkET2BuCb8 LtJRz6GY58DiKdb+a5GEZRu00ooOuL/EbHRax8bw2cEjiDvNVLQzV8sgTnNQpmpi6FXL OoPnSc/nM/tNaxKyNEGanRr/QQLcNXe5QFnAxCLUwNb0f3aqhbZRL0XZg+wvO4vLA+hU xFH8viE0S4+NzOGJF0oTjBmpY09SX77XOktlUyqxCm3oDB0Miy0UYqypmHYUsXSLGyFc CwtA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HGU8ZvzT; 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 cq5-20020a056a00330500b00677429ef6a7si2932064pfb.216.2023.07.06.21.37.47; Thu, 06 Jul 2023 21:38:01 -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=HGU8ZvzT; 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 S232277AbjGGEJQ (ORCPT + 99 others); Fri, 7 Jul 2023 00:09:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232213AbjGGEI3 (ORCPT ); Fri, 7 Jul 2023 00:08:29 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2127.outbound.protection.outlook.com [40.107.117.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC7CC2103 for ; Thu, 6 Jul 2023 21:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KSibSDJg+dziZZPkGvp6T+j3GS2M6UWEjLs4FuNzRS/vj77aY6EJnw0GlL8nWOjAl6AuqlEBGZfY+fXRrcCztVRph6dlfTOwfEqtfzFyl07NJ3mqWhu/Pi98EImvvr7KW6FQ+KDuVwVw578yzYA/E5yV/ZOO0bKufVkuV3KPuq722k4Bw4OizXUVkkOtzal2F6XrN7LnFt4DmBxz4cBU7IWV9+dmGRzw6oBivdubBUUuCM6ZdKy7WlNQMawA5m5+c8kqfPQNZ6l5+G8M3trfbPeNrU3bd875Ba9u0F2yShGBjEbyBxbj+PmjgFqa66IBsHGQh6OeOR9jJurjiFQQoA== 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=q3B+SLIcgP87LG6wrX/sVGPC2eK5c8Quj0o2bFw8EGs=; b=NVluT0xzuRTtDrAlQSzwHs5l44NlQkD/FzUA5+HAOQMhvpZJynIe4vdp8gorFbCg7i7uPOcCmCsA289A3gTzGvztFXujmKbGE7z/QQCu/EWMtBsr0ItxEM76jVUUQwqWUzRW8IZ2pnndqT6vRMQ1H3b7R5EauYq4g9s4NAprcuPGST8jDY4A6rW8UnpYppYRDw9I9skB3zAbC5l0sk8vMsN3ffq/aO1oFWKaNaEW+SH17zs0JZneyz8VlNhIdVmHmievOZkAWgl0ugUXmWlx8LxAMPhQaawKadm1ZxJ9y6jOJiGX9AhiGEzCiyp+jH3QnrYXxdzTL25Rm+icoP3KMg== 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=q3B+SLIcgP87LG6wrX/sVGPC2eK5c8Quj0o2bFw8EGs=; b=HGU8ZvzTG3shzzsGZX523L8An44+A9RhPNH2jtOOLEYyjQXe/A4W8csSvGzk3wFYorrxfyTQZe5goYKMjtkIwyossCCB95tVw4HqiCkjda2kRNUKdscYyleojjpfHVOM5U/gGoxpAjnbEv6ADZWq44/07xKRf0TkyBTN1aipuphNXc6vFAmRUvoAtT/YCxGxFHlqQbIolYQ9SavSkPcNcJ+INqp9/6qyn8zt34TAk8Zj23JBtccnqkgvt8aG9HhosXVHyPW2imepYs24PKs5dKbUeQg1lUGddvNpkofz3Fes/9ZhgsxEEEakAaGic2krbcH4GVLm6NQMcf7eypljVw== 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 TYZPR06MB4238.apcprd06.prod.outlook.com (2603:1096:400:82::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Fri, 7 Jul 2023 04:07:06 +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.025; Fri, 7 Jul 2023 04:07:06 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/18] mtd: physmap-core: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:22 +0800 Message-Id: <20230707040622.78174-18-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB4238:EE_ X-MS-Office365-Filtering-Correlation-Id: d25e9eb9-5f6d-4ffb-7698-08db7e9fa0b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OXRx5JdqlnQbr6ZJC54DwVv+4/vk68fhcQ9SCjTESgjZF+Hue/Opp+2tm1BRD7+MEr/1TyIXjeIDI6wId/ec6aXnsJO+11nU/CQ58Gyv674VcCSjkxtoHmkJlRQFK6lfrM9SCiMObUGXzqWpeRYNIjspWQDJwzxa2brFHrp8lucs9zDD0j/netsfxhWzN5HuWM7SmobFzubkHECh7+1ZjR4JY/M+NYHWG/DaSyfHL7c6jm/AMH8gAq5aHiSAnEKcZzdqQneKEaNR3Zvnz2Wo+rK1uek+MZNko4FmS1Zje6F+P+I6mJ475BBJuwZMgtikGbxCfSQbl8Fu1cJwAJdUP1lHyOVPpsZm7QLmh4yOlO5AN4HEgNZUfz42ZMHyrxT8HUm/qfXE0hQHSgU1Y5Un7i3oRgJg1066Zz5Er+/O8rKL+3egj0mUCawz0GaM4snXr8E7nPpnxBpC9X3/pRBfbhSaK0Xc/6Pnla0crqwfvwbT86fPkwk8H1BP4w16z+AeF4l4xrlUkl3MzAVnPJGvKEeo+0/w8hqS34lchxlUkbvVcE9yYpvseAWRk0LP3es49T+leeDRfbSg+/tIH1lxVFDonMAvy4FqzNJNcYoFS0em2by83+JJAqGZfkElzSco 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)(396003)(376002)(346002)(136003)(366004)(451199021)(66946007)(41300700001)(4744005)(478600001)(6512007)(110136005)(86362001)(316002)(38100700002)(52116002)(38350700002)(6666004)(6486002)(83380400001)(66476007)(36756003)(66556008)(4326008)(2616005)(2906002)(1076003)(5660300002)(6506007)(186003)(8936002)(26005)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zQOawX0GkAFmJS397VSjnJNCeHgTfWqMxrN/ZuO/Jy3cGoMniBkMGzP9ebYNNcVjGMF4rSSZLYPL86yPLsMYht7WyeKqC3JxfkyctUWGNmq35VQIggKjfDjJhtmi0dU8Ls+87cqHoItc7GjvLeMRzKrQB/SPmGlA0cVcoq2gaEUNuROm+N+8TaKh9leGBWfSU1ElPj87Fk5afoeMUrj64iws32nZsqOKK7W5XGIs2ZOl9Qnv40D287pPixfKv9S6iXae4bzh7Rkrp72gMnGt3SmpsFoYAkbW7DI1ApOf7qKGCsTAiBPo+I/X4L5jKYoQIVcPE/mglopZ5IrCn7ktDeCRZ6kJ7t8SQpBwEqG8hyu8Tq4QnoE0B1wiM/Lawe2pc24cbpT2rlKOUIYDS/RUDy/sPK/ospOCVSZIjWMAyQlfTob6gHiDPHmhjeorHS1D16K3pcXQ9gIlHYw9vPQM0I7+aPbY9M6YsRcx4ppoFN/NY3S5zM15BZhQiUEYHvfiypweAbOfakHrqPpqPW8opCzK2BmYSV+UkoNEK6CBTnqExIe2D5UMjoVpIuROgcgWC3Vxm9Ny75qU+9vqYewffWxIAZgVHPmG4cr2s0V7BZ7gqGx8kgQXW9ubERGeR72hbsXEWARuQYK5A74muv6KvJ1B78Bm3HCXGzgfKwWC6Z1rDeoiNreq8/VgU3HBK9VAPuOUSbgbByu67gIkE/JFJlfDU5ttitd/1PECZfLrVv8143qij02h/z8bcgzv4P+bw9PANpK+GsUJEpEcv2ktl+5y09UWV3/bAwysCwSXHfX5YCsT6rCGmzStCaUfV8979EzGES3S2CzNo66iTD/8b7y7VVes2RHk7eEs7vKUDBH5Myr99raBgkz60l1yEi1//UooNIWFiWM7bbXdPn/X27o1sNWoXHX91riqrVgYT0PMGsuriORtv3QitSUD5gn9oLNdaB7AjX8cLt/IpPU6QYO87R2wkQfDyaBIndxN0JwywKv8nmOXGcD5dXZ+1EToz/Rm3xh4lvPDA4TcZMI47e4nJH/XW6yw0l1yt+skyeKdiitg3VqrnZz3nQPeRHcxemVNz5YdRv5tANqr2ZrNIXXMTK9Z5GJsFnyXl/Kmxizhnad2k9vc2rMY3f0MUL+uu9UC8syVo+F8s935mC8sxTaQr0le9Gj1adzm/I9GDIKuN9PeTVk/ev4BZ3oAzdHFgcthUN7+qVsA1FKd1JqUs12V0oQLwqe2yiZ1vTkjQs3MMrH+YimT0WmYbMHewWdo9agvA+Cyl43XiFUWTfGm+3yrQW/hf3YkUKgHq/S7Jp5aXxw1WvqANmUFx71E9wKgFtEtVAVr4CnUF++1oiYpiIqUVpnL9ciOxL85rXhIFs9ISC5BcOpbRU+qCyCb9k/ktM9+Aca9ch4WJZfaS+HNWiIiAFor8A3gWkkFpyzELphzvPgZRA96cduIvk3MFkmP7C1Nmh0e2T1BeMefNlHDCg4C4k5A6UmYX29sj2cImdjFU63us4UxvjQyEbDXkjyJpN4J6bCqfT5NI2+20LjnKQs5kExtK8qHAOUt4XJfD1Z7LHwVzdj5hGRWhWnu8Nma X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d25e9eb9-5f6d-4ffb-7698-08db7e9fa0b7 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:07:06.6236 (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: xqfchJHMVLlrKd5XY1c0luc2rBFZ9svev9OJ21LegYPsyROW8uMCSJmlId8YTZCBGhGFEUP3/FIJwklBK4BRmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB4238 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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?1770735200348115572?= X-GMAIL-MSGID: =?utf-8?q?1770735200348115572?= 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/mtd/maps/physmap-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/maps/physmap-core.c b/drivers/mtd/maps/physmap-core.c index c73854da5136..78710fbc8e7f 100644 --- a/drivers/mtd/maps/physmap-core.c +++ b/drivers/mtd/maps/physmap-core.c @@ -508,8 +508,7 @@ static int physmap_flash_probe(struct platform_device *dev) for (i = 0; i < info->nmaps; i++) { struct resource *res; - res = platform_get_resource(dev, IORESOURCE_MEM, i); - info->maps[i].virt = devm_ioremap_resource(&dev->dev, res); + info->maps[i].virt = devm_platform_get_and_ioremap_resource(dev, i, &res); if (IS_ERR(info->maps[i].virt)) { err = PTR_ERR(info->maps[i].virt); goto err_out;