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+h5o8pUqMkAztaPD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8oHmFgZzDbqRlw+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;