From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C725DEB64DA for ; Sat, 8 Jul 2023 14:35:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=scEXilYqAKpuGCqnDGTJ1vsayaD2d397JZWBxIVSDyM=; b=lJmu+gmd4mL1Fv Na+E67BrpCDVb4d/jph6YdusXT4D/sBT60nsvWNZWS95IhnLVHlhruqSA0USI462Pq/lSVwDe6wvS mXiFA49fOclTv+Q2iIjFSLKfQ4xYPTKbTc7TNVuiOC/4KRP6J2HqtnpsLf29IM9GYIrokNzYvpZF6 jbpo0RoBit8gllh+CSn/ADQrSAr1WtHnsC4fLcKRE22atALJUEpRrXV83cB+GAeSMf2ue8GU9Seli WBVojiH89KZfC61P6gOn0tz975wgy3MmfaUuVIr7bMUn9s2C2+O6wF+9qKr+i+GXRLES9ruRoy0h4 5OtWGlC7Dvy3sbH1KWqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qI91K-007PdX-2o; Sat, 08 Jul 2023 14:34:46 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qI91I-007Pd8-0u for linux-arm-kernel@lists.infradead.org; Sat, 08 Jul 2023 14:34:45 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ABF5960CF7; Sat, 8 Jul 2023 14:34:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F600C433C8; Sat, 8 Jul 2023 14:34:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688826883; bh=7jMPJJXe6YudyGoC/69GZ6MFHuwLHFpgrY1Zr/jDDW8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MEC4LxZcvVtS1h3J0pFwK0rp7E/9enrurNn+WbSP7VTMWcnhk5C9eKygp29zVl1Ai NP2TnK4TlNHG83UIUKuIzhD8mMNuPnNsyxhadAvWxCjoNoTZ04Gm4ZDweTBomWWV3X qVRAYJ7kWUg8/Ek/dqrwpeNuAHjaRuj4jqLjNQewvrQbSt2rVIuFU9lXX49jyHsWtB u9M6V4hzXTdw6O+BatMafrJscQ4QFqM5llJuELYSNz60JeL+BHLob2XFM5+NvzCLwe 8LkXZFL4GzXnl+BXMUiOidWs6w8duL3JiGcLQv9k12HWhOuNvz2aLDPNBlKk/Hs/Jm h7VxQZ5GylzrA== Date: Sat, 8 Jul 2023 15:34:35 +0100 From: Jonathan Cameron To: Yangtao Li Cc: Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue , linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: stm32-adc: Use devm_platform_get_and_ioremap_resource() Message-ID: <20230708153435.6da5fee5@jic23-huawei> In-Reply-To: <20230704095808.33780-1-frank.li@vivo.com> References: <20230704095808.33780-1-frank.li@vivo.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230708_073444_364082_ACD137BC X-CRM114-Status: GOOD ( 16.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 4 Jul 2023 17:58:08 +0800 Yangtao Li wrote: > 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 Applied. Thanks, Jonathan > --- > drivers/iio/adc/stm32-adc-core.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c > index 48f02dcc81c1..99062a0ba1d9 100644 > --- a/drivers/iio/adc/stm32-adc-core.c > +++ b/drivers/iio/adc/stm32-adc-core.c > @@ -723,8 +723,7 @@ static int stm32_adc_probe(struct platform_device *pdev) > priv->nb_adc_max = priv->cfg->num_adcs; > spin_lock_init(&priv->common.lock); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - priv->common.base = devm_ioremap_resource(&pdev->dev, res); > + priv->common.base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(priv->common.base)) > return PTR_ERR(priv->common.base); > priv->common.phys_base = res->start; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel