From patchwork Thu Jul 6 03:27: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: 699995 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AC6BEB64DA for ; Thu, 6 Jul 2023 03:27:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233102AbjGFD1n (ORCPT ); Wed, 5 Jul 2023 23:27:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjGFD1m (ORCPT ); Wed, 5 Jul 2023 23:27:42 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2125.outbound.protection.outlook.com [40.107.117.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 243721BC8; Wed, 5 Jul 2023 20:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IiVL2DEuCPqyLwaOi4DSi50N7kdAzO8Wo20gxeS7XjBrV9w3fxi8qzcJH0lyqCOjUPUCvjNjptMFxGJMspESPCQyzfS4didGkC1K1/d9YauGcc+TW5fxlNjCGKPviLvU7f9CZBzZl/9VKUdU/scnnIgDebzz7ej50bPd7Kty4viZTrwrjT5YF9hPg01gBtx37Qal3Vn6Cr75fJFqmaVeP90xEVcXEkgBHRXvhmqFFZQsQ1Vq6jo00DkJaUv9ghQm56zsb+EE4+M8I4bTtups2Etm6NkqarD2cS3v/EhC6efS6gbzTkzVd4WcfZNbfp/p8h0e3EPkkIIoM1qYRHcXpA== 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=uB8Prm/iB+Ntgacg/uw1C/+t1A2VdIMtWaGOC8HEr4s=; b=YOqYMRfL6ZFn6xJ1KNRpTyWTwyQ/BsNoeLsBsOqnOpkc7j/te5D2i3AW12x7YgFAQBp3mk0CA8EPYjwR8VZvA5p1/UVSW4c4w+XqVPI/OVStxoKs9eH+3UDHUf83XRC5HFraMcWKB9e+gG7xlqPB1nU6TYMZntKl9WBhwGIcj1j0A7u5MS3MCE/BUjvUWmgmuARXDxMSzPSFFuwsnQozwBX3Txp2J8qMv0YzZ7RDs4nS2Vph+K1fVUenQrCyIvmD0JspSOX/haTRa6Kqtqbqm97GG79eepzfw3WoZHuNulD2LnUpAn9YdcD8PrPtJmDwW6phMVAC7owdD1hVxd54CA== 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=uB8Prm/iB+Ntgacg/uw1C/+t1A2VdIMtWaGOC8HEr4s=; b=SKLumlFbg12l/4rmIyzJeJ+JxfaiLIwU/u8ay+mf90TfbnK7iYklgTNOEgQKBZ/wG0MjdgGEoF9DIteSZbGLbebKEpIyUmvqg0XyzbnyvU/JIcpjU7LlGG52WUX/Pc548TlUUkCGZDNU4+9cb4TGox5KyUPX4WtiSfa9afz+Zmdx3QyPzJdq+bwzXzJuPho/sAQOInDXzm8jYGW6zdCNFRJpd54OH0Mpahq57wLqZkrTr2jHzWvLALp/AfqZkZVESEptPpSGK4O8x/+FqoAg9a409rcWeM5y9JK+4Kly7PMiK82blP+cwxsc3DjZgJuda+85LDTGExNq1HHmZ5nfpg== 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 SEYPR06MB5468.apcprd06.prod.outlook.com (2603:1096:101:b5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 03:27:37 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Thu, 6 Jul 2023 03:27:36 +0000 From: Yangtao Li To: Tudor Ambarus , Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] spi: atmel: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 11:27:20 +0800 Message-Id: <20230706032727.9180-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR04CA0174.apcprd04.prod.outlook.com (2603:1096:4::36) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB5468:EE_ X-MS-Office365-Filtering-Correlation-Id: fe53c927-9c0f-4057-2b63-08db7dd0f17b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g/mvpvkrjS2MMHaCRvc/NLp4H5waNmQd0z/CWKypg28rEsO1pKtnrW7V24wBTRkcBSJPlBZfmWnJ50Ndjgr3XPM2onrPocmdKBgv27kgN44V0hUUbDkcCbxxabHzZIKmg2Y5FGTT+x2SSOsa0zxYddNhhLdbNC4sV1oGHOvx7ieo3x8UBvgXgIsl/83Th47xROXKbPmtUTnMMGCN4NdYCbGKFqwv3ZjmuGJrB7VP6KUfSPAwzv186pyAkzhZuUm5ftNvyN4tvukLT+cjK9IJAy/90KtUkkKrAsdkpUxypfuybw2zZs2t5ZZYU2rW9uP/p4DzdKaowVuIUbD/cEyteq8TNwlmwu0i9HSh1TPmhmU6NqUvrUjfow+Ay8PRbn4C1DIUI3aeYB6LlFXAU7jGOKUELp+KNlPiP7GKYZeps9VJvO7XhXFNnUCKWWNcxS3mPgsRS7LOqFAU46joJhawC3Q1ubNBCW3mg/BN0TrFjAt/AGpHcJnbVDLQiT4Q84bgUCGTb+5upCnGQVZXel/pDfqxia81eozf4zh7P/q/BAeUcCQ7B4fgj9RJTjmBKqwc2GvvzdbzbWpYxo6OL9IVPJjjyzWRF2nWXRtVagzpJZHjKM8UESmlaARubAV1DIte 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)(136003)(39860400002)(396003)(376002)(366004)(346002)(451199021)(41300700001)(478600001)(6512007)(110136005)(52116002)(86362001)(38100700002)(38350700002)(6666004)(36756003)(6486002)(316002)(66476007)(4326008)(83380400001)(66556008)(66946007)(8676002)(2906002)(8936002)(2616005)(26005)(5660300002)(1076003)(6506007)(186003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FtSX3YyfRYz8V+7+vBwYNelVAZMnooIwOyAlXMedCjxPqQte9C8CV6Gas2Ho2s6JPlWeLdRREL9Pbje053lIk7TdyqY9hNSBA5F0+Bbvxwub5P325unZAZFxG1mLkfaB8wCUO1maEHmz3+VQ9KNbgsnyzh52vTcl+h+N5/M7pSq2mJgqFLrD8t06Wo6Yjf3x3Cq4em7ktWwJf8wAItr1NPv/6yf6TIlm/BC/6cyVZ4hD42orfCDTk6IKIaQ6HeDBg4lNiKlsIAgOhbSKuVsr71jXEmZ15+yZO1StZH/t6Um6I8cgaHVDLyMg4MZHl6JkYA+kQj8gAwh/BjrOMNFgsBstjecjIgS9FZmwYwk4KEtxZTAu5o4+7lIoTrN04EMLwzOZDDSSyQNEGC2G+eHcl5UMhXQo3sFWoyXLzru63pdDyni+v0JoUyWwMGeKTjzwkajtbTl+6xlw3/ZNcE9i+36YCoSZhgiiMVE66RipLFwIENloI2+GW5IXTQePFPrP0k0bq3mgMbNIfa4ilJC/UtkXuzMF5hMiu1koQQYvdjkgL6qQ3q0JUewL4gKX34htZmBCML9odLb8e/r7t6ePlOfYOkqnmY5GPNTM6DfHCo7Xc73UA2G+3E/SG8Sl4OmSrNJwNMMqfPGvLrapnMyCqZcG1Mr4jzKvAmXvyJn7j3/tdluBHZ3JvGn+6w9U2t1t4gYPl5OB6c8XcsOhYe7BrK4GP1CX8HTl0jDutJBIORniHg+1frmbbAvcq987R14Gg2vPmqCi0H5etpY9sy0FcFnfmpsmAqGygUIVvC/C5Z1gsFoUHOC6ETVb/t+3VOWgaeP0S0ezcOBbQnXNQgpkb4WYWtcnrJpZeed/pthV5V9LR+B5TSQL9E3g5+Yg82Y7lq/v781NILfXEFfWpnG2dsGd0D0nGzCmI4k/srkjl6jYJCc211UaVJH3z4KA+fRG85Jr5uB3JsfdnyNKIlKxos5wvwK4tE4i6N6iGUbQYcKt0Vsrzf3eKfI4RNn5NHob8ZJkkl3T5WLZF4tYkWJ36O59Tm8r2kGMyJSHsMQDOqFIWoodovAvX2n6+plIBBIzgKEGMtUy2GKIwa/EOBknL2Whk/in3aEJwA1eeXmuc8P+q9NKrY2oeoA+u9SVYpUnbejDD4WYeLUdCE11zMWA5YOqiTILKMCjaXQ7DXjE6bY9fgkGmeZa9/LZqB4oMRnu7E+ZWiSmj4dCbF0Vr5jd/bE9epCm0f+bkaM44HLQaKYjPO/8/1k4akJtr9pPgy5sJCU4brIQNuGQ8SEhC9Bq65DbT/T+PXPi97Y//tUGoABsyIaQ+MNKZqG9hSSpYiShSoKF6qK85D5SRAnLtsHEVVeVUu0vAkPv3e7OW+kI4uGmMUIdCzZKOsxUNDTqL2rTydGT2mJ2nezIhuyvJe49VbBz/MWpM+YbjZpGkZ0saarA6Dr/u9Y4c3FqW9CXTd9Rh+Illu9sR27Vspb6vqwPgsNgfzAz23//xl9MbTw9sIs5mWUDh6xfSLAbE7X8m2X6uxtvyHbtS7WuhILQ/co4KgIxGIB/3/x66EGqCgxPieiTCAMzgaAHevGAneVHfZg6 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe53c927-9c0f-4057-2b63-08db7dd0f17b X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 03:27:36.3994 (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: N1M5ADtMuvfpEyTLtge4KLvH+hPZ1S861opcApzpqqvBnyThsFA7BEyZ5p7kE8mxwpcEptHniMUc7W1qt3LXPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5468 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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 Reviewed-by: Haibo Chen Acked-by: Thierry Reding --- drivers/spi/spi-atmel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 152cd6773403..8a9c8b92be8c 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1450,10 +1450,6 @@ static int atmel_spi_probe(struct platform_device *pdev) /* Select default pin state */ pinctrl_pm_select_default_state(&pdev->dev); - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!regs) - return -ENXIO; - irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; @@ -1490,7 +1486,7 @@ static int atmel_spi_probe(struct platform_device *pdev) spin_lock_init(&as->lock); as->pdev = pdev; - as->regs = devm_ioremap_resource(&pdev->dev, regs); + as->regs = devm_platform_get_and_ioremap_resource(pdev, 0, ®s); if (IS_ERR(as->regs)) { ret = PTR_ERR(as->regs); goto out_unmap_regs; From patchwork Thu Jul 6 03:27: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: 700327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57F20EB64DD for ; Thu, 6 Jul 2023 03:27:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232789AbjGFD1o (ORCPT ); Wed, 5 Jul 2023 23:27:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233200AbjGFD1n (ORCPT ); Wed, 5 Jul 2023 23:27:43 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2125.outbound.protection.outlook.com [40.107.117.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B0EF1BCA; Wed, 5 Jul 2023 20:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X+FLUMenfUl7vllmKgBmjEtN2FKSVV28xI0KjRfepqSTAjBCHRgKSVJOGxBLF7yaHqtAJytmY8lS49UI53Pfp+vQntvPokbbZ5y8GrFXv66L82LWPQwTM6zTFSOFq2z9/Soc4SUWZxtZ5a01SaNIS6ecI81RvWuIoshvv/FJwh4KFodvLvA848naHOiY+Xb4cu4uendioZrgy2mGVOSK59zkYHEBAxPt4PadBFYDAI+7MQBQDyh/yFNqVxAg+wxyJ4igsQKuvOcjpnZrLEcWY37oh1PAqvlMobYAb7aIwMjcTMcwUz8v8TueAok6KYEPi0Qo0FigOxCK3r1R9BeS4A== 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=iCozXhCFyD/XrU9B2Ybd3Lyt1YGWHmw9Wfxon709hpw=; b=B0HEsr2mprzsV8NmYJDZB5KmjYkagAqTNByOyVAX2zcB0z3qZL8DeRbC5QBsaL4HRRdnpvZke6tzYPTF95wwx7pN5JahCzP1NxYmrDU3oPB6sJ3AwIbsOwKyMeSRqZT6C7M/0c5/G9D4Kd1Ztnvc912xzYz4Ca7DMozw/7AVPfibJY5ZHxoUf7Lx6WA3HgBB79ppK7qp+hT8hpCYvLnuyt0xf+7csE6jZNR3n3xUTMFYQbe5BHP3Ap09QylxIWV1HMDGxWIgKletvW3a7UADTfh4LeG+Xib9YQqGcc6ESbPxZZmt80BhrdbOY/XjVYlhr5avsyUyPWdTUP6ds1g33A== 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=iCozXhCFyD/XrU9B2Ybd3Lyt1YGWHmw9Wfxon709hpw=; b=KxuHbO5F8g0/17iI6JX8EMZLm/le0AkLcAvxnR/B5R/sVIrA0atG7RiI8a5Ntpl4yYcy21W2VVjme0IOGkBZkrhD52UlOeWt77FvdrJBJGPSwK2YUMOR1qZ/ItMHHtHikDtQQHEVnivkhA8N2baftywYGq5675Wduj/Voi+oRGzdsjZQ2Ox2gvvmtXAc79VjueZIm8y66OuDPQe5CrjbfLmhbe4xTKWfh2f0Q8Aeft4IkHxe7VUXJqhfPZDiURE8MKRDbRP4NlsiLIaVQZzCGwuyn2uWSwc8jZ8USydk+RUGrjkcMuG/Tbn+fnRGoPctsnwkeaJ29nIf/riRKiyiGQ== 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 SEYPR06MB5468.apcprd06.prod.outlook.com (2603:1096:101:b5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 03:27:39 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Thu, 6 Jul 2023 03:27:38 +0000 From: Yangtao Li To: Mark Brown Cc: Yangtao Li , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] spi: davinci: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 11:27:21 +0800 Message-Id: <20230706032727.9180-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706032727.9180-1-frank.li@vivo.com> References: <20230706032727.9180-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0174.apcprd04.prod.outlook.com (2603:1096:4::36) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB5468:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b2c2474-d4dc-4c54-55b7-08db7dd0f2fd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W4GIOB7ZLGQbxYoz/ZwhL2SHM1GbIPEung2U/Peip7poM+BsaMTfTZxONjXXttTiXolCHXa+NYEINnBv5dND9mXL2j1uq6JZvSvm+IjM0Ixi2X3ksowPL0JREyWROjAMKGG1PMBY+CmMIGUXWnLdsLvvFR+AWV7pIEnZvKbClKoXS14iCE29ljOv3oRSNBH84mEt0zHF1ydsXS800XR2HUIs3tqgFeuEGtdf2uLmhz0zO4BsEMuOYtRdlCONd/W0TTWw//8bdTBKYlZOf+YsjK+QNnrIfeF/XU47PRjskNYeJIXtRTed/oucfq6pQVRiT9L48akw10OCdPqJL/XMU4fudx35RE4Yz0hztKXwzvW9py/z1vTP+YbSB3zUgOeA3pgG2fl8bEhyqBy1mtgaL0IbqUERJ7L6Ck8fDuBoXBHFnpRqpFd5eMPKEkDTzz0GskHHqeaWaVv6laQ/yncr5anzjZx0EEZFXoJ2tEOx4Nnzi7aQz1Zr3Dz0Ct6koAhpS5yvYgjkbcaAIpU+1cwVaBM4+jIKkgi4915xO6H0HSvUEybQaLXvyGgEbublyAk4qlysAk/O+A42yBin8Uj/bI6L1Wge3HJv/3oP85jzk64= 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)(136003)(39860400002)(396003)(376002)(366004)(346002)(451199021)(41300700001)(478600001)(6512007)(52116002)(86362001)(38100700002)(38350700002)(6666004)(36756003)(6486002)(316002)(66476007)(6916009)(4326008)(83380400001)(66556008)(66946007)(8676002)(2906002)(8936002)(2616005)(26005)(5660300002)(1076003)(6506007)(186003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JHRWBo3+FhRkCOZXBKxjNp1+0Iea1WXLH8h+/RMzoDSX4PvT0vJTAbFlsI6HzTt09Wp1C/sr7gGj4vAOmUMn5MLwJ/ciJopbTncVYgVzNQK/gqg3OStD+/7noa3B3OKEt9CHfOUAmeJqbokgvF+2+N5p++rI9Scz6qrdtJHaWTEMr3FdDqqBTVkICKnUvfSRdlMRHKelreXd74Zug+w9fhNBmxTeV4gsUy1GCXqcLgULoO4CiZItgLpqPSQzQsrXMmaOGE0IxX8tmmU4ZKxidVZTiC5Ai2XUpz56PMA1xrmMZUEotNV7wpxKJQzSH7oLMvaNwtk55Byiip+JYLY2bzOuhGKOcxbcbB6NfhcUrKQeIm9mFKORM4+iyaMCaACbrKRGmqAhofK5YbP+IiaUW9DxvbsrtpvNwf6N2l2Y5K/ON+omtY51bJv3r3/swlG3ru7pMolRPBE82vZRa/3rGYX7IWo+VxGtQReDGF4zcO0cPYTN+woPb9mqDWvOvb0iU+UggCQw9hI8zAtcOrrNiYeKA6VsC5K7SL3xJvuoxE85xgix6N71412WWBeiUeMfs0YimJlpr3VeH6e0Y7wQaSZSJJHPSzBW+iqJBKE5Ds+G3bvMlsNhqPpuoRCWOJ7UUdTit821EAbM/rcb+jzoN535jvtiB6LYmpOoYFTM37/U90A0OrLxRTkF74zREFMxJSK4PyB0Aot9zDvPU2BwX3z2tCi3m9WR11M/ZmmzrRolRxn63kL6SQL059pas63nILmAEuQjdeqrpz/vu7GlTPUeTcrLHTOJk5L2D840EoDms9yUM1deHryg9g0JOosYhxW7/TVFgTfUHbHuO0oEOLxMVTz/WJCqmo55ECfdwPvYrO5Dcqh9tQOF3GGr2h3a3CK7tas5l39I2HRHb7AJtruVjExPnKGEMsiddywih5b9OU+TdLNmFu4XgR2D9xhoxP2u6ZzVtbNdzFp1UwSgMJyVFVoxQrtnQGxEZ6Bge2Z2qmFyNenuR6AX5j8zAfzeeoEPkni8MlJmNXQoI33y3Cu46IxGU1pUgXpCZrLNtuMf6EOU4pIlRpYK39IInAazxnmDBFSh7uRHH7vrEgGP6bS4RGV3hft68GZhFdMCo0MAx28PjvWqPdVrdswdWhDJ1KkFiVb+jBDDTJOsebpGj5atTby50vc2hTVQK6o5v1mGm/etB6A63wreae6q6MAHzqb2HWyYkxW4myPnY+gNmAF9uKWTqs/Fb/zDP1lQ4ug0975KGa8kfaNBWnWPqPi3ixQuxlMFdhwz9uiYvagVz4BLclePKP7KAhnXhiq+xfI7cJBygSGC8Acw3m0rWQH7R8oTLxEu2iDuK7yXS3i6ZWY1lYhsb9lIJ7gKksqfelaE9M5hVoVrZzN+VIFlET8LH1ZgVrwSbHrij8SjA7XtXsyF/8faabymxTcnmlRkdrRighC6nqeKhPjbDqRav1h5y0ia3t4MnxEs2t8NgDoCCUCl0tmn7YZ9UYEksR+/FYtASkyBpyXilSlnjmeE5BiqdBW3gDjFDDMtBA6tOycsNBtfqrFTB88i9/vfu+UGkZDzUMIuHhZj7eRk5hNSBN0T X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b2c2474-d4dc-4c54-55b7-08db7dd0f2fd X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 03:27:38.8791 (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: Houh2TWJaZX0OQfYaW0g6QDOjWvsJv5YX7yUdD338GI4NkmXmi7/agFqx9QbI5o+6CxOEQQvOD3ROyu6KFdGhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5468 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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/spi/spi-davinci.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index b04811c911e2..a85fd0cb4a5e 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -895,25 +895,16 @@ static int davinci_spi_probe(struct platform_device *pdev) goto free_master; } - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (r == NULL) { - ret = -ENOENT; - goto free_master; - } - - dspi->pbase = r->start; - - dspi->base = devm_ioremap_resource(&pdev->dev, r); + dspi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(dspi->base)) { ret = PTR_ERR(dspi->base); goto free_master; } + dspi->pbase = r->start; init_completion(&dspi->done); ret = platform_get_irq(pdev, 0); - if (ret == 0) - ret = -EINVAL; if (ret < 0) goto free_master; dspi->irq = ret; From patchwork Thu Jul 6 03:27: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: 699994 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 399B3EB64DA for ; Thu, 6 Jul 2023 03:27:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233314AbjGFD1q (ORCPT ); Wed, 5 Jul 2023 23:27:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjGFD1p (ORCPT ); Wed, 5 Jul 2023 23:27:45 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2125.outbound.protection.outlook.com [40.107.117.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7E061BC8; Wed, 5 Jul 2023 20:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cqu1kaHTUYf9uoi0V/XtgsQOZ5YnbX8AxPmRAqI2MMy3NcMvo2yNbn8ld2rpzlUF4eXbpqcgRtSYDIJnIoKbbHqT6VFyz9aGHc8en9FFTVAeg2gj5WReL6EZIUcl0zCphwPJpaor65BoJJLwYMxl0Gj9EflRXyThhJFT1LX8aS83WGSmAApaR3NFMobPae1S207NgkGDEmR7BKKXpsrQRGlMPd3u/CL1PdN+J1Lkzh7/jZtR95Lb/jTZ6CBdsG+6Bd6oZxRpiRmMy0IJzBQR687O0D21sqDf11j/6UJR3iF8J8uz8DE/uENBjAd6y0UiQ0GKSLdBxD4GnKQuu7ifnw== 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=UaDQ0vwX9HldvBjFoyHQr+L8pqJOBa4iWflW0cp9eJ0=; b=SrHDhD3W247cKwksO33+1zxEbmun+zcJvRIefiN5C3rEyId8C+je9trpn6lzZW0/tLQg2tqj2zduFjDL/go0b5s0JjVAoo57lZWb2GVBfKeFynpkFfbJiRk+haCQweY0/vAaMVJXI3qZ5klco7g56YeXjxe8KlnX0IExRWe+tCP8jh3ihtCw9XyNLfiUEv4F2XRDwcvbrn2QDzSWPwYN+aIiHipi+f0E1hK8Es/R/swjRPZDSkSyTF1aEvh8RH1thqXqwL9E/Flgs8HEqZxN3laKTk4mCSuwY12vQHAPEVLHc+iN57ko4EBCPE8jq+gHM4G9Dhz4tbxRwSFE20YSuQ== 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=UaDQ0vwX9HldvBjFoyHQr+L8pqJOBa4iWflW0cp9eJ0=; b=KdCXvFKkNqPbhGxZ6QgE5nO3rjW6afe5K0xgpdQhhV9mgzab6XFuZiwkJxceXHmAHiy23yWtNRDLTGaLpASBWoO9cUqXd59yS3YqtdV6dINg2gQnDqI163NWuzLXg9W44FEkbAy0RLWsWA+82DuvVBa33MjrFAwq/WUGMnY4StrS5z2ZAcWe1hi8alHJxHrZbS0cCmHbvbJs6teH2+VuMmlGvLvjaSnqGHa1Co3QdwzDIn+IFvN/knwEDt+9a1UMszGBJoX5yHPImXVmxZrv/t7qTePFqp73aMH2pEjngNQpK/+3F81pvWzhtAxCl0k24/Leq9qySqOEN+Gy89EzRQ== 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 SEYPR06MB5468.apcprd06.prod.outlook.com (2603:1096:101:b5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 03:27: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.016; Thu, 6 Jul 2023 03:27:40 +0000 From: Yangtao Li To: Mark Brown Cc: Yangtao Li , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] spi: ep93xx: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 11:27:22 +0800 Message-Id: <20230706032727.9180-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706032727.9180-1-frank.li@vivo.com> References: <20230706032727.9180-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0174.apcprd04.prod.outlook.com (2603:1096:4::36) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB5468:EE_ X-MS-Office365-Filtering-Correlation-Id: ae5e0a72-85cb-4d1a-c718-08db7dd0f3fe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 36AvyyM5WwQlWp9mu+pZSwZ6O/EVkySSnVkbkjWsAEyFH2OWcFS4BGrSf2ptIQxEEVq8YVEqbwMXXyZST7/34FHB7oY38mbYmRWQmVtsofUccXQDFvZlffwSUtcjHP32IH/yxrWcUP50fHRgeMlX5dLeeRweBimzRGzjJjYuKArJWQt7Fp3zgxNS2kJxcc4oROHEX5ypsPvaUmKUtjJVf4w8QM3fw67+wp74XUppDWK5fMEE4O//pbbzj9lv77X6GRAeCi16HFnVYzDBHNAOjAFQYSI/M0bUmWPQNAdkCHRmVUTrM+RI7LIO0cOJNbD5xnY+Mb/mvi4pI5COycsJPWXq/0S96IZb+TSVw0KjGkOYQa0TSUfpUI49OUNovKeiSdyXKbhtnUjsdnL8cCRbccOu9bPT4ey6iDl+tbGIpOu5w1augpJnFin2FWPN6mQLvmKBWYFdxNlot868/WsD6UpQEU50O4F/PU4IpNfRBjd/3qG36ha/ays4DYXZdb67WyL4VvGJaPm6m70kMj7Yvu09dr8+pb4v9FxKGMfs3cRYjVCl4XMCa1wxv/dU7vXPLYFJY5LAj7KoqCjEGWGmtKGBYgPnDQY6mCwTduhciCEOa3gO9nude1EzzTz8Dh5n 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)(136003)(39860400002)(396003)(376002)(366004)(346002)(451199021)(41300700001)(478600001)(6512007)(52116002)(86362001)(38100700002)(38350700002)(6666004)(36756003)(6486002)(316002)(66476007)(6916009)(4326008)(83380400001)(66556008)(66946007)(8676002)(2906002)(8936002)(2616005)(26005)(5660300002)(1076003)(6506007)(186003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FXQt0U4/5HKv2KjNLv3N9icNx1vf30oZrvdfwaXgiG4h2mORu0dcsJLDtvfQ+yv1D4Uo5nIgYTHfInswsvsO1B46uZfTiQE0knns0EanLq3Lhxq1RjFntAApBNxLY2zE1z5FfzW9qYcgYrQrFkZE9oQ3SRED6jlRcHpZ+LdXq4EljHNPhI5exLqnHC12Wm3jKq5dsONqLM00EpeTvHa1uiZSt8it2avTykNIgoL+Agmg8DV8x80sNN6RW2WfvEzTNxSU7vLd/+K/dfMzS3YQDSFOj5Rwe+FMUgceqJv4C1j80EpA/TT4Q5PzSgGmZXIEdengU/Oo3GmvM42+MGLP5dZD5Dotsu6jtiRoyWHeZ2YG3jdWa8ZvsdQPLj1SWaAw/2L5qRBX+IXyd6DKe+v2XhkPhfg8UDkfbCnDMAAA6MHUd37eUFdWiNoMPW1YSwNJmAVtAoxr+ggpVJHrbGahnY042DezubaOWnZ1bZ5A6ZGCEfpLs6br1kcQLrZYOO1sb79FqhuVinGGuvV4bmFvLl5ZTUGw9NwKC2P4lUsKWmZSl3Bc940Q5G0y9eLTQYR+j9oESFdPPtr3jnZaFjeBwiOMN7233zoqCzMp7LBXDO4RLRudc/yJDhvYiaB6aZrYQc7b4yoPaxqNNybcFFTf2Jdsh0bijQDxc9KX0/ADdQ1DHDbKeI8kgM2jlbMk8MkcWwl7I8e+Rsne1Zzux/1lPZ0uuhT6Ao+EKixlCNdbVeAD7kW3CygrM0tb7eLNRZWWrX8/HTvlInMtaU7qjRYiFwL7yUX6jhQVuXLA0MpWr8F0BrnCix66CYixukFyZBJhDUMbRfa7MFG3V9xezzySwosCwWhOoW1B947KEgRqj+z+Nvo3RkgMQYmxRJABV58jYRl75RkdTfqhR65mpkUSkTNv5Bg3BduuavNtSfYsXX8QTmOgM6yGdUPsBehJob6+/maigNtWl5PZsyNF44yxoDGAn9p0929uSWBoxWBbjXwHaxTxhriBwYPK5hr0jdoU0h6rn+vdQSZgDJGgI71MwM+5QoFxHHwTvj9coSvC7loM1zLOv1HjwSsLbZU+UcLBtzdjkk6KxzfPhwMGK46+Z2hxXu05UWMMUn0tGjzR84IVhLPcjb9ut9o1iUN6NL4D0iFH+Yq3x86JhBZsJ0bUSHOmhjm09Q1GXAk5HX9RELKj84lb8qG6wxnX/mSYJ8v5ILXw/SFkGUX3nzVr2CYp4u4itjwBI5AQUy/sFHdupE8L33MgVqj6cFIQZU9TAq9PK3sYAicsJ9EbxuVk+2fcsrh3HtP5/cqMY33kcXfnNbxZkf1tjPHfI5KgijyxDGyqNhIha9R7aRZhzN6HxLQ/JDFrR5xkFS8dtOqd6F79MrPRlioidEN6ktSENlyBCuuEatrUlvOJMdHH5nPr2cBfxIt7zmpnIJaAp9FCdl/1ULYQnPROjZGGDJ9Gctx9gfB63A0yjy7I+UdLVmwobM71V6vEO8ZhUqoFdWrz5oCHbePUKwJwQt2CpbZGaURdrbfLre/7f/crebHyAmSvYAFf8yObUvljJK4SAQW4dVumU+IYx/2zMbBQmgy4khn00y4r X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae5e0a72-85cb-4d1a-c718-08db7dd0f3fe X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 03:27:40.4788 (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: llBM/2anIc0zivl/W6MTdsjWdwHr/XhR3d+3z+jdIE0wPs14z4bS9xhXf/tNWRzPWLxhJxhsN93QIlNO5bPang== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5468 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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/spi/spi-ep93xx.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index 1615fd22f9a2..3693b3d425c7 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c @@ -661,13 +661,7 @@ static int ep93xx_spi_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) - return -EBUSY; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "unable to get iomem resource\n"); - return -ENODEV; - } + return irq; master = spi_alloc_master(&pdev->dev, sizeof(*espi)); if (!master) @@ -705,13 +699,12 @@ static int ep93xx_spi_probe(struct platform_device *pdev) master->max_speed_hz = clk_get_rate(espi->clk) / 2; master->min_speed_hz = clk_get_rate(espi->clk) / (254 * 256); - espi->sspdr_phys = res->start + SSPDR; - - espi->mmio = devm_ioremap_resource(&pdev->dev, res); + espi->mmio = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(espi->mmio)) { error = PTR_ERR(espi->mmio); goto fail_release_master; } + espi->sspdr_phys = res->start + SSPDR; error = devm_request_irq(&pdev->dev, irq, ep93xx_spi_interrupt, 0, "ep93xx-spi", master); From patchwork Thu Jul 6 03:27:23 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: 700326 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A60EEB64DD for ; Thu, 6 Jul 2023 03:27:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233433AbjGFD1v (ORCPT ); Wed, 5 Jul 2023 23:27:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233339AbjGFD1q (ORCPT ); Wed, 5 Jul 2023 23:27:46 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2125.outbound.protection.outlook.com [40.107.117.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E1241BCA; Wed, 5 Jul 2023 20:27:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OlooU4Ki/UXDtZD4av/p4tezHyzcfajQDPjzzcgQ08uX0tMxs44iz8eIFUIIkt7RpW+M8z6er7P3YJwqJ3AMov4Ap61DpkO8oAEELrShGaZIGRl5bAVR1rXlKFMXyBqIXNQWB3YmtJReAZAPgsish9ZPvQW4ZfMV0/Co2gFNfYwNqoLCS22CA1pQnjNztp54Vx43N59vkUHktoJHTkQJ1EE83ho6siNaJT0FaDAXX4RpRwFm7/QIujWyYEintIvJE6thj1WvPnDf39uE6j8e6TMmwd/gMAcSbC72yTinYdbDS9Zh0DD7nCz/SaiWTMJuqaGblWQJkrCRFDFdIOO8Qw== 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=J38d30aTpIQfC4mNjrjxXuDl3D9wgHNmq2biXk44o/E=; b=Ud1vNfO2M1tAjoVgMDDiakwnz0RS1ADtwQCLaGJjXVmbT8f4AgDPgEGGM0jiWxxZzBZHDfSldsGB7CAvKlU/3tIRZHOSUWC54n8TS5tT/tD0SAS7tmjJr87IcqBv9rM0Jyqnbc5QkohWE/2Ig4ztm+qE/sSOPY/D68G8m1LG6d3YQT9hB9jb+HMYZyPym1kTHEangSUnMHrKh0eTPWH9WED1IAvgVMpilqEJFOQONCo44bs1unDZppO1cY70MA0p4wDc8EP5DXHawAKT6e6IyDf6ghn7oBwqI6/Kf5u1Zl9vtZ1jBoNq0CPdAax5X6N5FuLPzpNbQcFEykuBk0eVTQ== 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=J38d30aTpIQfC4mNjrjxXuDl3D9wgHNmq2biXk44o/E=; b=Wnk7qZDb5/OjIySRJUpGwoqwwpYK5jP2IEZMWb6dwlvG2oG7IATpZcqXcmOk+oaZBm3gDoIwZl9RNuR3I+h2UfTiKENewh7Ab4zobVO2KYV4UU9MPyllURBQ64e2YjjRtyGCUOHrR2yMT9D9Cs1jK++aKOdsd3MzBsPkg2lSjGE0QRx+OlP19k/0lLoMIYIIJcZ7YNvNY633e6obM5YVmveSGONJrbpTO7g5R+nb+rHKWgmNOF8l27QyBPj5+WObBhsS+i9Jr+Tnh5Qh7mwwIVPTCpj76up7pCCiWBpBn3L3uYp9zEcxuNjY6aO7f/eD4TgOulNWkL31VHJXZ6MbYQ== 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 SEYPR06MB5468.apcprd06.prod.outlook.com (2603:1096:101:b5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 03:27: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.016; Thu, 6 Jul 2023 03:27:42 +0000 From: Yangtao Li To: Han Xu , Haibo Chen , Yogesh Gaur , Mark Brown Cc: Yangtao Li , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] spi: spi-nxp-fspi: Convert to devm_platform_ioremap_resource() and devm_platform_ioremap_resource_byname() Date: Thu, 6 Jul 2023 11:27:23 +0800 Message-Id: <20230706032727.9180-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706032727.9180-1-frank.li@vivo.com> References: <20230706032727.9180-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0174.apcprd04.prod.outlook.com (2603:1096:4::36) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB5468:EE_ X-MS-Office365-Filtering-Correlation-Id: d0be662c-f4ae-4086-0f04-08db7dd0f518 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z7GC/S39orlfrRdHbUUB/dFtb5njmNqAUI3TxRwp01ULFhKQdGmDuL4y0qp7VATdhaNoMcZbdAWEaaUB4fDSlOxK86ZqwyvvBzLXthsq9YGJ5U0fM1xSwbRs9p1obuJgew3JV2Yd5toP5fwuhr4i8Ayo9BmdLstv/6IJqr9/On2DY4tohqH+ctXpsc6pQISwUrDiv1gBagpCIMDzyHgl0tJ2FRYsMEO7+VnX8P3ppJjhDTwG/QNbRNg9N6BmiIZIxxZqeNQfshbUTaipvUT9GXBgIRHHUz8UPbKTlRiR12DY7ZYjLRifEP5VflsjTscYxxZn2IZPyucx3Rpz1h1E0/+lG0+MXJavYZBGT3f6NiI7Q9iZLiIDwFwh7I0yRfXpiwTpG4CuP36Br6Xvqj8nqkzkoUSdNLgtMmWCPgtryNHhaur3uLyiFoB2K+zyJq3ndt0t7b5nXZF+Kt8g/alVgZT1NXB+NL/seLfBBoy7Ae3j57uQOJURonNdxy34RCC08ILgYool/peMMjdc3N+PW3V0W2UezhJ8HNc+FJ8/KtGj7UHgwm5/pzEBy42/fPPa+Ir8XKw0CNxH6mu6Meuh1req2DwfA/yoxLdp161squQPMeQLaGoPPOYkuAW9V7HC 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)(136003)(39860400002)(396003)(376002)(366004)(346002)(451199021)(41300700001)(4744005)(478600001)(6512007)(110136005)(52116002)(86362001)(38100700002)(38350700002)(6666004)(36756003)(6486002)(316002)(66476007)(4326008)(83380400001)(66556008)(66946007)(8676002)(2906002)(8936002)(2616005)(26005)(5660300002)(1076003)(6506007)(186003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RNMG3ShvImXYti50aHu+HlcBXeW92x/t2ysommgVDZHaL3IFMFvp9R8OO3RmqqibzceIwqE+VCBUTrtEn/8eRokqkqQ2CvHtaO2Lp8s3RoBvjOykogyboaJNMWgDuaxWs6M4Kle26og7Hev5jsUnEY+TvVWoS2Nd90ewVl2MhLvYG5inkRTCUSsFgopzHuwmwCXo+GsrtABEQxBm/uzMVt8ldqp3shGXo8egpIqQY/Ou0Qb0otwhwl+ORguKGcI844wgKSgYrMI3NJ6o8vbYSOAMop/ZTyMwSj4JLDfQRC2ul/FWyR9EXw/h8nxVQfEvRm2ptgtArM+uNfTFHxncVg0a0tAIy3mOzs0PaO0fTid31KsLkVNO/yxt8giq/I1U132SE4ngKFKwxFGeKhs7dTGX03fNb5IoA3qGcZSQCQrEA4C7p+HNMTELozxFOXULUUBDAykvnURD03h8YlGlJC3EGVNxEt84kn2wawYDi6UzWQC4Xz9Be29O06HmgsX3fTiwUEXMQCaEObwyVOBVW/5dcDFhJNQ0RpQnNBayj6yVp71Lu/sTvBsEt2rr9V8IFCIVXJRZ5cNhgn/6eEChyO0/hgqlVdxqpTLiW6eBtbFSQ+2YxZmdQcFpv9y4GsWhbdCa2caB76zDgHI99YqmDqDmXNzbewvG0NZiPs0q3dRQKrxHVE7vgrJxTcQ/IKIHEcyXB97b/UAVx1MDa9xJykbJWO2ZCLJFC3I8EQ4YC7vnUnFKLh53lfZl8OG4Md+awUYD21LRuqcF9zs8p7/PqaKl1s3MsqsChkZ05YoijqJW0J5XZys05zl4nXSRuW+Y4aajkPnyBv9Mgm9m2UpF3eqQmLMG95LahGX8OSPx12E/RWFZWLPeH0sFik6WPBJoXu/bw+5I1Ig2nox548lXUlGG/K3PdlLaeVANLdKA+DSq5Otjs22lt63HlhZ7sJdEA2QSnlttP4wdGX0lDUsRd7uJ7T2B3pg1jHSacm1ec4UD5vHISOu/hFQUFgwhuhUFH63q38oTXw1+Bz9u6iFEP1ga1xqstrFZqCr5qJQM664nbH5++Yjdtwz5OzK2DMnoWRyK9cY1N2mpPd8uEd1rYQtCsLTYCM27x/Id8CXC9exNMzCMvP6L5AkRJ8klun/c8qfs3xY0wb0OB8iG8Lf137dv12rbIJv2uNixpbzKHJdgHk6dxRG8cnP/+IW8/cWmoudCnPFzPfwj2y+plKH6Z7OdJWhc/0FKJXE3fyojea1CISHu1aOdSJUT9RhJN+KsShcDROT3FI3ZJK5+GDgBcBaDkiBj3YGAl+vFs3xKot11+lzxczu+O/LjxOJeqd5Fg5qEoG9qfUvBadLhsGTbKWkVkbs80ON3UVGGk4K+bRMS/3aTCVD8JJOZC3F8eKuTuSdA0VB7fvYNA1vvumc7uMrY2VYdkNjU9yDFrRR4C6HOxvs1V+qNmcIB/xM1HWBTsnRaxe6AfubOpAJ5A+AzNDZKZfW5fMIa/qsnaSxlGp5mK2uMpB3frp0nhoG0RgUs+iihvrBEqmAOo5c/ZdACsk8xp+KcW5loab1HuLq109y40Gbdy6MaHKIBq9HE/qsL X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0be662c-f4ae-4086-0f04-08db7dd0f518 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 03:27:42.3729 (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: m+usL/bNQP7QsRnDrrFs/eQ9XMe0GUewJa3GUCIXE2Vrvj5VkQ36ejub4kAMZq2OmTKAagdIgsDLoKKIV36fxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5468 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Use devm_platform_ioremap_resource() and devm_platform_ioremap_resource_byname() to simplify code. Signed-off-by: Yangtao Li --- drivers/spi/spi-nxp-fspi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index 544017655787..4cf9b3bf7b57 100644 --- a/drivers/spi/spi-nxp-fspi.c +++ b/drivers/spi/spi-nxp-fspi.c @@ -1157,12 +1157,10 @@ static int nxp_fspi_probe(struct platform_device *pdev) /* find the resources - configuration register address space */ if (is_acpi_node(dev_fwnode(f->dev))) - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + f->iobase = devm_platform_ioremap_resource(pdev, 0); else - res = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "fspi_base"); + f->iobase = devm_platform_ioremap_resource_byname(pdev, "fspi_base"); - f->iobase = devm_ioremap_resource(dev, res); if (IS_ERR(f->iobase)) { ret = PTR_ERR(f->iobase); goto err_put_ctrl; From patchwork Thu Jul 6 03:27:24 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: 699993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AA95EB64DA for ; Thu, 6 Jul 2023 03:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233460AbjGFD2Q (ORCPT ); Wed, 5 Jul 2023 23:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233459AbjGFD1z (ORCPT ); Wed, 5 Jul 2023 23:27:55 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2115.outbound.protection.outlook.com [40.107.255.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 282421BCA; Wed, 5 Jul 2023 20:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MK2/a+e78ah8pxVxjf/fUgDuiUcRAoiAcMATdDh0GjCtKHF0x4U2AXhYc5nHnE3XRoK/VpLTZfFpwz1b/BjmOv2Isp5YoeyY1M2/402Jd2ElcDGsxSsgaM9BnudmlOnSuM/2Q7Q0Rnz9LK7eW4tCrzOaE5PQUSQyvI4oyvPW0RKSPg3itNV1WmsXfolc8ay+DumawAR8ApiwoqE84pDOxUN8An0rmJEpThrSZN9uM9gUL933ZmdMeoEAxtnxxvXIqbuE1PuuVfE97yvEhtuQX6mC0KQVAkxejdt4YcPHpXx9urGZW7RHgyujeiEQwKnXO8ByeaJ9uPjZAKvtVwv8pQ== 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=Ns0m40CcGvHiMhch9ByAoFwsTf5wKU3Ra5aiSpfZNmA=; b=jo9PlF4F3+kmzwCEDLdYO8RWKaMI/daIZ62zsvSCz9dhOj/EXmVFa+o+o55X+GMZ154BdZ3hUYiPM75kMGwgHLjJ+53Sy0jVTZ6ltqZ63GbrsiF8+VT5KDKUfGsIGLeJjnh3QurPDwQd537mB2PVxney8Y5MXG6OQClkfdQuGqTeM2z1f479XiVp3z3NXgUG0+sqyhIq3Zu5ZgYHlPlYxtWRz8KGymsqtZugtfsNNxNA19zsojfkyuMen4uuXDyLp33Ej5Luhl000zR1umt6juv+2yzXKW0A9HuSXh6AGz5e76BSDW6LDYvA55SwpsPFFLo32Z1op1vytR5b6RhDUA== 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=Ns0m40CcGvHiMhch9ByAoFwsTf5wKU3Ra5aiSpfZNmA=; b=lRJIR/DZclp0q6yuCmg9vzUbS1QhV67o6jaq4LKUOYE1oG4EeqP3QvyxTtGTEnEHa0aUl+U+Qri4qpHKMMeUY1MkNLXTDsOUpY5gK8YFMvshpsFSvraft6Lel3V9DQktBkC26ZVaVVUcgyySZVZ7x2SQgKRrR/xKd9TVoj+Vn3oGytF9o5MPxmisda8d6ykS5W6LbMvlORhC7fmiEEsTGE/PsaAaVJj9EqhgFqpf2H7IA3KyhFi/6EuAtrmfG6J4V3cetpcSd1brAgvfwe3R8q/fJ0pUL0GFJug+onHYX6URQteQQrkmwewGJ7AHR5+ByQssWWh65cVzPt5b+8EMsA== 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 SI2PR06MB5043.apcprd06.prod.outlook.com (2603:1096:4:1a6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 03:27: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.016; Thu, 6 Jul 2023 03:27:44 +0000 From: Yangtao Li To: Mark Brown Cc: Yangtao Li , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] spi: rspi: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 11:27:24 +0800 Message-Id: <20230706032727.9180-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706032727.9180-1-frank.li@vivo.com> References: <20230706032727.9180-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0174.apcprd04.prod.outlook.com (2603:1096:4::36) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB5043:EE_ X-MS-Office365-Filtering-Correlation-Id: 41e753d8-24d2-4d5b-d0db-08db7dd0f608 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zs5cq2x7oa6NXygGjhfs7GkuKclWrb2nX2F0zUjwfR1i9pwKdqdzOiI/lBGa5P0zaGgIdm61lREAGs8ACEsQifOSs8KB/njSwUBL0kJiQYil48CGywRaOvcAykJ0DVKpbAiErmyPDhxQI10z0dXBDwNuHzFJecBwxpScmfIe2zVj4bJk48itgPz793CjomwhNcfEapDyHCScAUocKOjFvhz7/aERRBgZf5XbYDxXYGhta01s8LbfS4bsE1hj7esNFOs0EIlQelm+++AyhDce//mNp9Qr8eDXotNz0eTUAjJNQXFfOXRCkX5S3/6tUPjUv4PnfTPP4djSBE4Mb2MtDRzkARtWPFa5NaBkZHY/+XWSC016Ik/ukIgQcr0zl5gMO0lJ985pZ8rpnHw5TAHaTu33dUCa0LMjcBISjw5L8P9qQy0UsPMiPijpCQU3ayDt0FUYTRcGgATNcNYN4yikaBGa+/plczda97cVR+vrx4p4hwM0O3EWEJgMTqNOcI+mWRUHGUp1pfvcHCsemgBu83y9JieticXs61Ui2KRzLu6eNkCNcGn2BsNzblB32qWE1kVGUmytlcgawbT4xLnKSnEvvn++sIsS9GqeLyLXtDT/APhayRRGH5VMQp6UBXgS 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)(346002)(39860400002)(366004)(396003)(136003)(376002)(451199021)(5660300002)(2616005)(8676002)(86362001)(8936002)(83380400001)(38100700002)(38350700002)(41300700001)(316002)(66556008)(66476007)(36756003)(6916009)(4326008)(66946007)(6512007)(186003)(52116002)(1076003)(6666004)(6486002)(478600001)(26005)(6506007)(4744005)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: U28qL5yAt+MrQM31S72a9upVjsKL4gS+gUWdWWx4IyUn8H/e4EXGAXGKCNa0aq+bDPghXrs/otpZ91A0G+pNguh9iwu3pvDtOpMynxHMn8NfiLdktp+4oRaNGfTxSJN39Kk0KJij+KLIWL3I3wLL+et/q3IXYZgajMAVMZWMs9F7AM1twE9XEXzzEywjGAcHSpZMfckJd9OYb1vYIVrdS17w1pNamJlvkUD0n/sOJ48W5wZ6qFOqtchO4ePd005PH/zYYmYIzhSLVVt/FFPt1kNjRd8sWCXQAPZQEhWlqOv/H8kz1vfj/DAWFHWr3Ix6BIkpKL5GpOuEm2GfTxybZtrysrqaOQ168pT0UL17pm3m/mrNeQkgwNWZjHiVXdeDb9hA8vUfYlfQAUkSfobcap4b82Wz/gpMaiEN7AbBZ7ey3roSaSJTfYlEJUkFudIzUf6ZyQie0u2nVL6pu4Ha2K1V97eCoHbzr3QbaCAk8jQQxGxrWh9vSplrywmjCPtKzVGFQmxmWEBXQvkGRAu7PSNAhfsXLcddlp8ijClrt+o+zOj6bmhQ2tyaEUQjThe7IGqJoEVjtSQpccGN2liQpEoAgUWwPOFOeVMNVpWDEeUPsDfDpGazYmEXsyaITVFT2kYm0a2yZ5vqsjU8As1iXBX3UvE+4Bp3zqhbleSCsffvcjaUp5oPKzk3/53hEUx0xhtBRA1Uk6K2zViRM/5QJur3SuxDnkwzIv8ewQd31bTZv7wqthFzejzj1IF1Qp71b6OhqfRlyCw2EmXTwNpfYH/lJtIeb56IS7sG0hILHqVgzkaKZNRHg04HlrvTE5oWzTptN5TqFJfKGHryjV6Ys8BkZ4fdcE3NmGR1URqxo2I5gEEj9aqyVofpURwigW5RcRrtqD1kguMrUE5l54KEGq+a+TyXiKh9wT190tdCv2hL16HHaeVJi7zKPXZsK+pogR3UK8A4ZiGPyWcnjC/2+5g1/xPGBaxEnZbetG1gUUK+6uc+DUMzS2Uxf7Lr2auMvUjUkhch6az6xIEDy/TO+dAfRgHMhqW21fmN398kPxY7tx4OP2o9EeWEwjwncsANFDzWiuLjfdCkrcdsQhvx1QErQg78x5gd/Me2HiGam0o5pkzkiGCwIeZwRyVMjCFmjb+b8ABi8g2XtDbk51pSdVXwb1IFxNvNc5830aWMtwg/+E3Xc4fVeQChXKq/WG1L76RTo8bYH/16FwDOrtR/0WPmdocyg/nxIzaYqhP3PhcoYm5F9UbUIMLtVm7t2DYk/5jLP7iUVLcVvD42+0OlUrN6RMDwhIng88ipPaiMJLMdgruqEVY/4m61fftbWbn9CknkQj79N7bs/zGD+YU2ZqyY3Ii51mXIJ/G40ORoc/rsspx/hdDrKVbH1dtvTgTIvNMu9VZ2eXdbE3041M3thVuD1XL9MKJ9LfEzi6lNfZ9IG830fqOADcBRzGjLV8Y13AKo1XR3zE9r18oZXmLk9ud7jtjaD1JRfFDglXn4FGluG0TLxeDc2CpAf3uYPwah0avk05wEEqNMwhpEyrBqeiAaa3H8Y8PgC1gRuVoVPVJK1Px6258SoVnMkq96g+49 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41e753d8-24d2-4d5b-d0db-08db7dd0f608 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 03:27:43.9517 (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: /0HXDm0kExPRbvVvCdIJywrvqAir6h9nxzBaGyHePVY52bM0A7NSHUQ9L1HtnHC37ayJSB2SaIJbRWNasiTLBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5043 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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/spi/spi-rspi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 08ceebbaf69b..9312a9d58a1b 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -1317,8 +1317,7 @@ static int rspi_probe(struct platform_device *pdev) rspi->ops = ops; rspi->ctlr = ctlr; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rspi->addr = devm_ioremap_resource(&pdev->dev, res); + rspi->addr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(rspi->addr)) { ret = PTR_ERR(rspi->addr); goto error1; From patchwork Thu Jul 6 03:27:25 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: 700325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9750CC0015E for ; Thu, 6 Jul 2023 03:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233486AbjGFD20 (ORCPT ); Wed, 5 Jul 2023 23:28:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233200AbjGFD2A (ORCPT ); Wed, 5 Jul 2023 23:28:00 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2115.outbound.protection.outlook.com [40.107.255.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99A271BCE; Wed, 5 Jul 2023 20:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dUmFmJmoF4L9wQSjUfLpW5v8VjFs5P5gUh2utaYlOIK6iqIhMqNQKKAAZmPl5Y39EWrXJIQBR6GWkCola1zPLFcXLT2R3W1c5yeEmp3OWQeFZlokZiNu3sX9EtQUG5f1DdljUNYTQl2xFqrvra1PRnZcDFE462JjRYL89oamOgWcE1I26o0/E7dHRytPt4ufKXnQyaxAxliUXuWRPBxPslnmylVx6YnsfWYIvAa9ppqj24q2st9R4UNVFRO46Gt85bFKHC0VYJMDD7kPDQQFjBDv59Ff5LfghM3ionXJMkXRToe55HlAnTTza8ewIUcVQ/OaTNAeXwVb4DXo/6bvrg== 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=BKI/rVNfZtNwKlVj+7meBFBoKvhYCYDFWGA5L1MgsKQ=; b=cxLoW1vx43SsUzXnORiFJ9HGglMXx0gIiwV2Pgb8IIKDROCdPLkiA+ac5kKEBJSaIIpm6WMAsycIZkNhTa9DC8EUljeT/rvBibsM0wkhFQskjNr+CSKn+PbhLm3N0zJnZExBVOO0MOFRvLB3wRRnkr6YmXADH5HlgTNm5kLGoCAs3/hTiVW7sDP7cBxlV+ebL05IstSn7WrU4ZK9mK0BkCC3GYGbOqampCr7mPokCsDRU9JVk7/qu3LICV0qkoHm4IYNjOPvNMUp/eY6Eso2q93EcHuw7UJpeg+dnYpfgJS+CcfBLr3tzVvfoMuKuQqUhWE/Iq1mTD5LAvKaNGdTlQ== 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=BKI/rVNfZtNwKlVj+7meBFBoKvhYCYDFWGA5L1MgsKQ=; b=OR1naNlAWkY9rRuZ4WVvM7MYEX0oKKUJ2Cw3c3JMmoahXCNMBAnrNXZC7rGhUE1Yjykxo14xeQoB581tjXVtaLWP5SjPt6RKGvWpVc3E/1E+VdLX2FVJiiiy6Wez5NUzMn9zVUyF78t/KTTknYM2eYWwKMFrev5DckTjM3xvYUC7MGPmCbVuQeh09Ao0nIxcDmnYwuZGsLY9jHtsYkw2njQOAZ/nKe5bRm6AVQ1GpND7/+Dj2zVXyMhBuopONHrkPK3PPvJJLqmPU7CWf5+WTgrz7K9pUvIUSRrQYdBH4aoOtzlfeiif3BPbcf8IMhDkFh2XcRXxWoowH26CKc1gqQ== 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 SI2PR06MB5043.apcprd06.prod.outlook.com (2603:1096:4:1a6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 03:27: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.016; Thu, 6 Jul 2023 03:27:46 +0000 From: Yangtao Li To: Laxman Dewangan , Mark Brown , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , linux-spi@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] spi: tegra20-slink: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 11:27:25 +0800 Message-Id: <20230706032727.9180-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706032727.9180-1-frank.li@vivo.com> References: <20230706032727.9180-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0174.apcprd04.prod.outlook.com (2603:1096:4::36) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB5043:EE_ X-MS-Office365-Filtering-Correlation-Id: 03a8cdb5-48a8-4ddc-9eaa-08db7dd0f74a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: odQebywnfEL4Ebt3BtRctRKtg28wnkQ9ULxH/l059hY3mXwgiEQ4mIkaKq7ImINFEaLRuI7oOQbrjABM5UUGnJKafilSA8IF/qoMecPwGt0z/DVRNsKkxc+4u97WfGdHkuML2h7QBYZHVfzlnwwePsAUUxNlpzNAo6hku1psq33jYIPCdbX8jWs/7nnDmlCRNTZzNljXYKwuexglXv0phC8aQIT+aoOXTaXAfu9/8AaYNLXC0h5WXdIDw5jXdcGx+UpFDPOsss7JSg358RYcw/l8GYmE9WmYbsuxfZVb7RbfLSEGybJKLbYo5kGrQaMtoGpwZLCPrO6K/S58wCoe/g1mrhsAo2Alm9d+zJKIJ+u4kavMU3+uLZXR3qvCa30giGE9OrdKhertpnkPwi9gC7qjDRZTXsuD7adGgvzddhItmagPoMMTas2H8K/2wjbrnhbcYGSHXkpwEFNqtqPn1/7+d0jU7UozuUvqPnjW58VzMawZi0DEp80V6qmiFSGCwguVf3LmjO04w91HCr64zsqQeXRp35GGdjG/0KrSCjXToZmwRu5s+YFofnYHN+Keb2EezRh4T0mEArE2TRy2DfBM8wILRok2MCeBm/Dtrqhf740oFR4YspeWeuIBUCqI 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)(346002)(39860400002)(366004)(396003)(136003)(376002)(451199021)(5660300002)(2616005)(8676002)(86362001)(8936002)(83380400001)(38100700002)(38350700002)(41300700001)(316002)(66556008)(66476007)(36756003)(4326008)(66946007)(6512007)(186003)(52116002)(110136005)(1076003)(6666004)(6486002)(478600001)(26005)(6506007)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uOKNZoSKKrnEKxqIVtVXhOSE6MlHDYP2Jz+LNQ84S2BnBq/Sh8z5TvY2/ZFjexa6BUDxFbMx6/y/ERCQawlGr2AJsjGIBUUJ42F54rlkQcbO30l7a8fNHFAUV2r01U8fgqiT+c1IGuIEIZiZffql4KIYeRA7rfSF9q4CM0yyOrSk5c3RwmglwILuwD0dfxTysMlswTSIgJhCIptKsvdMPae8GoX6gU1oW8T9L4nSivGpB0k12n9SXXONI8K1zl/XcxJZTT792tC5JKBpKWE2q7J8v6MnJBlx08doloB78erz3f71iYqof0zmkiy3okH2aAhQT52PAqFZ4Yqe57v9yxi93KJOgH08b7lSi/2NzE/r3eROCIFH+CBpMK0tt2lPFdhtNPA5Ub7m2RnrqQylqsLKQbi/txC7xRV5kvLk3v8fIjgzXEJgZsdkrOg3+V81Bq/j1cD5XudxbD4J4a0pjfyV05FM5MwcLrZEmdCfbrihrZpJFsu8pgHrRs3eR5DAYk43kgvSQkD4RjNcdd9qas0zDwF2diKmPtsfMgnU2+qJCxJ8FdHufWy2Ltf5yTHhv+XSCK4cKlui+0hNJ1yOia1aHP5e/R7TnayZcfRbYspFta2o3Qcw4T4x36LkhnH/bhSjKDddd/bgGsAFCXeOFqHatl21zvP9PP9ElHMMGvS79u1UOANqbrEFzcbJoePBgPQKjRdHRQnr1oToGc2R79MJzQZuk5aYwOGFDL4/eBS1c+ALKKW1iXEdNCd/xWYzlNqTPZoBcF0KWrH7lWHVylaV6Zs0wSjAFf7rYZhuTPuzF315pDDfvLh1J03bjvazdSj01nxLZSAVnKDx001GVnHjQcxLDFX4ZxNqJAwMqsE2H1ayaQ6h8aYw8P1TT4IZLBCf1tCGqBnYEH2K78nQ8selAfphT5f2O1ayflDt0RsKl2vRz1wNJE1A3ymdznuRYVsv98/IEpCkr/7j2BA2Gjh41wB8OxbRFl+Brz+mdT5tU9COEd2sDkc8Y/uCfuNarq/xxrCOAM77+GtlEa+MVthHpPK3EHy8XHeBJby1iEGZG25cwRc96vyKSZXGXms8kCtEp7GG2iztKewVwIQ/6KJqVzVqdYFV7YJFfGghBex7PT+EsmWXpmV2NB420uX3gjLQcXp1hHmdsYj7xI/5ukLvRWqfWYpN8s3KslSUaXG46F201pARAbzUt7FkyNDOAm19SdovCD8Prfan9VGt0Tc934jjsYJFWXJKQZ9jIz+o6Zk+KCjqloZ7hkKDnddVD8mPRuOdoNS4YEBItvgWynI72vlQYtyZB0UI9SeEE9OnDFxUMlmiPYWAyK0EkIDhVJ+A5o8SBtqMst84JLVROh0WcLFLXPN/4PRqda99YGWwMvBccYaQNFGR2NHcb+D31JlSvScC1GerYveLqZNCz34BcKLpXFjI6Iphzlt8UrB7Yk/3rMGRJEUnyNp3wEa4hlXXO9/SyaZ41Dz4aHWpleAEu9dpFrNjW1py2Sw0m2OYfUCt2eEJ9fNKWDqg2b8xYJmYSpiSt7GCkTNnw1yREZdCQdqiaO3jh5ZhxpcTggzCzDdjHetJCsbfmeck+dS5 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03a8cdb5-48a8-4ddc-9eaa-08db7dd0f74a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 03:27:46.0607 (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: P+UQX8k45AUzO7RfmCDHpX/W7eCM1UWVdwqXfLTm4V5NBFg6iWuJ1TSumeFXQ4zon63Yy5LMZge95PPgrTal/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5043 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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/spi/spi-tegra20-slink.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index c2915f7672cc..8cfd9e4f60b5 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1034,18 +1034,12 @@ static int tegra_slink_probe(struct platform_device *pdev) &master->max_speed_hz)) master->max_speed_hz = 25000000; /* 25MHz */ - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r) { - dev_err(&pdev->dev, "No IO memory resource\n"); - ret = -ENODEV; - goto exit_free_master; - } - tspi->phys = r->start; - tspi->base = devm_ioremap_resource(&pdev->dev, r); + tspi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(tspi->base)) { ret = PTR_ERR(tspi->base); goto exit_free_master; } + tspi->phys = r->start; /* disabled clock may cause interrupt storm upon request */ tspi->clk = devm_clk_get(&pdev->dev, NULL); From patchwork Thu Jul 6 03:27:26 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: 699992 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EF14EB64DD for ; Thu, 6 Jul 2023 03:28:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233483AbjGFD2l (ORCPT ); Wed, 5 Jul 2023 23:28:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233065AbjGFD20 (ORCPT ); Wed, 5 Jul 2023 23:28:26 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2115.outbound.protection.outlook.com [40.107.255.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AF641FE0; Wed, 5 Jul 2023 20:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h4FM8NrT1b8a7/OFTkzbZlFQ2bdSddtX+YWOdpXd/8+atYANPFkcX3e9lqSL6jGRsFxtMntcfLDABECmSEjmxCmcB92GIGMaDh01K9V/tUCGZkClZRmtWl8RUOoEZo9vjbHbNSweV2ZD0IVyIlSBmpTuYFjwUDfMfUP1Ub9YG0uzE9GfzBp15y0NhWmMzl4aJPxpZiH0a1hTobivlrUgCLwftIXgqlIwk/dkOh38N668obpEgSBJfsJkm5z063y6L2gxlY9GSCfSxfo+RaPxtoeC5lfJSN3N7yqjaE9QOQ0H3Dscq4n/vQRQmslk3+eYSiTIcAvZGQH3p9q7AMnBiQ== 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=FpEhsLAKRGIJgSocqGoL0oTWylJP/5TecRrwzNrP1rY=; b=mepAR2MgxZM/wzjmi1Ui3KKNcN40C7FVGJ033oBuluhmjEjrCuQh2wbyZHp7aQfLLjEy1Xrcs3cuVo24uUiECfRuzfs2vNvpEL+jWpWF16P6DRKc91TbUJ1iINGBxaXKrbWhLjhD2rdFssS+0WoQfDJPac/TP1YwVL2boKrIkFlfffwNNrUp5vHytgQObDknxGfMZ7iReyk7E26dGOumZWyhb/5uugqs4PDslkyh3huGQvG3uq3WicpZFiNVteuU2FS1GTbCfotpMfNHx7KMnFAsLRHvkpx0lbib/jsdFduJ2VPsuwZqx/gpJFQUwRJK8Ljc5vKoHiDalEeYkErm8A== 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=FpEhsLAKRGIJgSocqGoL0oTWylJP/5TecRrwzNrP1rY=; b=mhMkf8eyBl0erdPdLuWU8G4QhhVwpCtrT0Qf4tClRuHxcbprvDqIua7JHvA+cnIE+WrqaoOSTPSFzFlaCwh71jjbwTzHuBCU4V1aBQB+xydDqaZsrDS5okLsRxLeA3CtHfMYPx7hYGleFZmtjdx3ajoE5Ty9I1H1FBECkNKqJWyzwMbUDNw9eVjzfOHBv4y8zVEYoQtEkXCbI1HHHydtSro0X4lrlivsXNPDAemBfqpuwi8IzZYYMkf4m7OK0GoXLpRmhQFd8am6vJDHXQlX5lTz5zE/Cv2vXqoiLR4slZFpJ1kzmZ+kqmh7lVH04dHHUMzY3BMgSJVY3k1g0MJgxg== 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 SI2PR06MB5043.apcprd06.prod.outlook.com (2603:1096:4:1a6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 03:27: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.016; Thu, 6 Jul 2023 03:27:48 +0000 From: Yangtao Li To: Andi Shyti , Mark Brown , Krzysztof Kozlowski , Alim Akhtar Cc: Yangtao Li , linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] spi: s3c64xx: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 11:27:26 +0800 Message-Id: <20230706032727.9180-7-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706032727.9180-1-frank.li@vivo.com> References: <20230706032727.9180-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0174.apcprd04.prod.outlook.com (2603:1096:4::36) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB5043:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e3ce505-4152-4019-1c45-08db7dd0f89d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rQ2m535yG0Yi0PIIefDI/ixhHso/3GI84srYCHS8nq5o3uc3piRNn8YBEpKIXWXAYMLdIDaBQn26nHeVrh0Wc8nOQtcYBkI8rRTmj836ofDrs2cwmSPgfN1d6AhKZ0e7KcUVMaMTEkaEeHTQGi4bjSRKmMkX47X8URSCE9zt0wkkqCnPLbHJGyU0covoqrEDNmWBC6fgX3T3FGX4eP0U/6NbeOJSomjHOuy8D5kZcgaaMEWTHgjz1xmVpk/dmsgjQUI7xZmPRj58u8MhCZy9pQB5xbrJJSclYaXDkO7eRvCdNENEH6m1CibZTU+YyG8F9bIUugylIb4ouQ3UQnZ91XgiEEVdGPRDz2Sv8ehHd4l+iXhsJJvDLIIEixlvyr1nV8APwUiLxbBF8D72msZ1Ex87cAS3Fid8c6c/4lZGn97ijuv9lApbZYZ1xdIwiMPAYU0Kxmn0R524ZERtqgFQ73lJzGeYvqhKlBtR6ijVOWgBAWNBgBJds6Hd46oa/c+R53425gCQsE8yEl+iSR7QSuutBLPVXYNahSYk3Np5ax+g4awU097iBIwbHgoyTot1ygB+unLxTqF3m5cmSQZw8Cj4C47KWEqT2DTC5qPDtbkG5Id7C5yoQqMMx/L2Ze41 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)(346002)(39860400002)(366004)(396003)(136003)(376002)(451199021)(5660300002)(2616005)(8676002)(86362001)(8936002)(83380400001)(38100700002)(38350700002)(41300700001)(316002)(66556008)(66476007)(36756003)(4326008)(66946007)(6512007)(186003)(52116002)(110136005)(1076003)(6666004)(6486002)(478600001)(26005)(6506007)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fe9zm4KPwY4+ymEDbt5n8cPpAfRwzOv/dYUr1k4uqwdhKfcZMECMXl5j2nbyNf0uUMW6hFi9Y4563luLeArlG14bUr/JX7a+NXTjS1HoEVpVJFTceS2US7wiyfjOaDaqmyAslxZTZVAuYLtvPCnMB79fe30cI7iV2z2oYQv8hAuwmr4G04/HfOFo3jR0qXdVI+PqnlsPGdXwehLWeYN/fvOub1GepjWByMJvqJd6MPrlo5J9Y9eP9tEY85esobWsj9S265lRHs6Me2YVf1vWZL8qQ9rR9ymc1AwI3O5Kt+cnoMG3HDeSgNYIW3sYLV8HBup+ru73pl6yFdh3yNo5OKlBAmC04aCCw5zJFOhs8sLvW1zGupyeyo6mMxZdNCejbjly7M/+iOOU/6hwcndefWYza1bJPbomlwo7H7/XA/wA9AdKPA97hdvjsAn8FUS0+SJ4P74OayyfepQxdXMihrSv6cuFk3UXhl3fVu3x8vFjthNjyY50LzOu0Xp8jMwJ6SBy6N8Gc1E+wgNmuXw0x/ejRChttnJMqbvq2ZprjPA4AJZRo2Su5NXkY9Me0AZLstEEpSUIHe35L/bfvxBuG+v+ulp0QSXeLsMKDts7tWvmiAcyh06IpOeEipvcM4yZoNERWFEozUdCb4xfqV/ZEll2ga8XvceN/eraQJAkYyE5WYteo5w8iI67pT5BNrqIi6jupN38eeR+lbBIGStvTd25f0BsKhoHmJBg9NgpAyMQff7rhv+NdwWSuoJknWFwkGsJeygGY+LGjHpNCj9w16hXoKPAyRXSms4mktWbgpXaQgS9JeXCXSTrv9blSG0M8GVdOO84qBIT83S5RTOBXcTKr/Lx59yhm8Wc66QyH9RfDCFTBDamCUse8YQ5OEpI6H4dap3gcxSwZ0G3uZDP2lvSna5JTEYZOc7h8uPoKKivlpz4LpkeFRkU1VPtyYBoGR0vcZg9TXn8guIfgPNpTqMr0v8o4zwHMpYKH0bOZ7heUugwS/KtFrdFtBxW1C6vEh1jy1Ap8GwsGY66ia3lNamMt5IrLhm2FTYwoDCiLIP1BtHHjuvdkzvrhbq6IeupTI3kTKrnVXDrdaz9u7XyKenSoMMOlQssMup8IBD61cv09YlN7qP3AwP6d/w2hlvFbMlKmfzHdf0gISRWSWZMw3qqX7VW78oIxpq/1cyF/WKbS884puO/kHXok+rvFKnA9zYXhZD8rI9x5fJ0TKPJZpoo9YNt66bfaNYu8V6SG7nRS4oVRcYtD3hBdmA+XyirYR5wqKtGzm5lHIwQZzxmRmWYskmStHdCTOOFavXB5SQt/ldyt0jWsnw9wyQ8ph963LTQwp8zjG0R/vzi6cVAoygCACt/EJFGXvAgF/V3zc9ypEbw2aJwF415bluddq0Cu6Ny+iz9tVGrWwATc0sXhLtYh+6WFA99nyi+f6dMcTDzmZKSgDje60hJQdkUPmHWjkApkqgaFaAsJlB2MX9VMrK+FBZrrV4JnHqGbBVxr1ScD9am+zYf+oGKX/fE5PqTpA4Bvw3/XMyM1dl/myu50QjImXis8uvvTOAAXs+wHc+QxJUBZu3uLh5pleEx6MW1 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e3ce505-4152-4019-1c45-08db7dd0f89d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 03:27:48.2411 (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: Iwgt+agqlrKVDuHeKfcIcP4R5g5ui9hyB/OGlvK0uhjEF4NKR7aTjJDx/zD+CnyvQ0vu6zbw5B8616DvJsMD0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5043 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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/spi/spi-s3c64xx.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index fd55697144cc..ad008597c7d8 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1164,11 +1164,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, -ENODEV, "Platform_data missing!\n"); - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!mem_res) - return dev_err_probe(&pdev->dev, -ENXIO, - "Unable to get SPI MEM resource\n"); - irq = platform_get_irq(pdev, 0); if (irq < 0) return dev_err_probe(&pdev->dev, irq, "Failed to get IRQ\n"); @@ -1185,7 +1180,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) sdd->master = master; sdd->cntrlr_info = sci; sdd->pdev = pdev; - sdd->sfr_start = mem_res->start; if (pdev->dev.of_node) { ret = of_alias_get_id(pdev->dev.of_node, "spi"); if (ret < 0) @@ -1223,9 +1217,10 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) if (!is_polling(sdd)) master->can_dma = s3c64xx_spi_can_dma; - sdd->regs = devm_ioremap_resource(&pdev->dev, mem_res); + sdd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res); if (IS_ERR(sdd->regs)) return PTR_ERR(sdd->regs); + sdd->sfr_start = mem_res->start; if (sci->cfg_gpio && sci->cfg_gpio()) return dev_err_probe(&pdev->dev, -EBUSY,