From patchwork Mon Oct 17 17:12:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 3613 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1557645wrs; Mon, 17 Oct 2022 10:16:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4keUF97FEEucbwdQH/QmKSTUp1LfH8NSoZVn2BmXmMD3eQWbyQerm2jxzR5p4q2nqgwQ7G X-Received: by 2002:a63:85c6:0:b0:46b:41a1:6322 with SMTP id u189-20020a6385c6000000b0046b41a16322mr5301766pgd.403.1666026987726; Mon, 17 Oct 2022 10:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666026987; cv=none; d=google.com; s=arc-20160816; b=W6JC9q4LOe3nIpIwvE1saG301eeRodjDEhxbfl/mMFa1f1N/nnyHGg11x5xWHWBo6O Wv9EO8c3qlqKDdANgEedg7OJe2Bg0Vtu0vr6tfGwwKdFM8TpjbsplQaGrNHivwXuriMf X0pZmdfBiU+K06cj8xC1F+ulNO0Ygva99hTvtApPj7yy7qjH8vE7j9OmzIPT1zfXHxFa cYL74BkHzYl6RYToG9Dm7ZYWOIwu8Hp7pyUPlxtzZBju/3FonhrfesfmJ62ZJT3MnxDt nZNPJZ5j7RpxeKrCN+K914MTZXHyf+LgeGCNHMOrF5GhSMZDu88Vu2sTg2HnZbAecoZo kJfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=d+ZsTZrdfEqp9qMcITBBFMTCn477IjCv4tix1fNizDE=; b=sc6E7ujfUUFTPrhdHRZFt59eQQjW6civuqBhv0+Fe00JaDqrZHCge7HRpbdY+1Q7cu wQaYcA/5bFEsqALSOgeyVqWeb5yQlr0Wypk1Mj39tPSl+ROAL+VDgXj/W15XmtV9S/sp JyvDVf/mw8lYth/tClObc7sI258Pf6tNTML7IoQe2Hf8xR/rkvV216+CsEfMGrpLix0Z 4J9PngH9hfQeTpZdUN54oIn/uaxNRRjIH7+C5+fTcND9JMi+mxls9VaxFuMATleTfaIH SqkRsK1f19btWXAkLeAdwvsDrCMl1a2EUDGwU/wuffCdp8JP4ELYNaoaorj9neX44DPb FNMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Mw+WegJS; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a639345000000b0043a345c65f3si11778865pgm.755.2022.10.17.10.16.14; Mon, 17 Oct 2022 10:16:27 -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=@intel.com header.s=Intel header.b=Mw+WegJS; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbiJQRMc (ORCPT + 99 others); Mon, 17 Oct 2022 13:12:32 -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 S229687AbiJQRM3 (ORCPT ); Mon, 17 Oct 2022 13:12:29 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03DA167059; Mon, 17 Oct 2022 10:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666026749; x=1697562749; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eEL0Wkgz2QTB6hPhPIAefByf4yM70/tBp3XIDpf3g4Y=; b=Mw+WegJSWyGn9/wX52ebCAgKuATaxnBjIJdONaBZ/GHuCQn8iMS4nIR+ maJYJgMu4ad+gzAVU+VPBKXZGd1xxIhE4ZGt5c3VyUdws/JTVSPwvp2v8 sxDx7LOOQfEeMdr0DgMtX9KGkRNloV8SBqmIRQvZ3JG3zs6DDUYVhOxoa SJi9sKYDL3yNIzsxS6zDMFdV2LYZkequ+DDSTOD865fKptzodgucHW1xZ UGK9U2QgMhwOGwGLxfBNFAiY917OrwFsapw0Rqap33o0Tqip87hcnU4g2 q+2KUiEnSN4VZ8iT2HYwddU+Hp/B0Gv1K+orqWZb2rYWk9Lwdlzlte51d A==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="367886364" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="367886364" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 10:12:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="733239970" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="733239970" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 17 Oct 2022 10:12:26 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6542426D; Mon, 17 Oct 2022 20:12:47 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Subject: [PATCH v1 1/6] spi: pxa2xx: Simplify with devm_platform_get_and_ioremap_resource() Date: Mon, 17 Oct 2022 20:12:38 +0300 Message-Id: <20221017171243.57078-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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?1746955914836026372?= X-GMAIL-MSGID: =?utf-8?q?1746955914836026372?= 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. No functional changes. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 2bf21c2e7a52..03ed6d4a14cd 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1482,8 +1482,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) ssp = &pdata->ssp; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ssp->mmio_base = devm_ioremap_resource(&pdev->dev, res); + ssp->mmio_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ssp->mmio_base)) return ERR_CAST(ssp->mmio_base);