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 X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A248C433EF for ; Sun, 19 Sep 2021 17:29:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D58C611C3 for ; Sun, 19 Sep 2021 17:29:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230218AbhISRbR (ORCPT ); Sun, 19 Sep 2021 13:31:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:32782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbhISRbM (ORCPT ); Sun, 19 Sep 2021 13:31:12 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 739766101C; Sun, 19 Sep 2021 17:29:44 +0000 (UTC) Date: Sun, 19 Sep 2021 18:33:25 +0100 From: Jonathan Cameron To: Cai Huoqing , Cc: Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue , , , Subject: Re: [PATCH] iio: dac: stm32-dac: Make use of the helper function devm_platform_ioremap_resource() Message-ID: <20210919183325.7bb5a8d9@jic23-huawei> In-Reply-To: <20210908105638.1525-1-caihuoqing@baidu.com> References: <20210908105638.1525-1-caihuoqing@baidu.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Sep 2021 18:56:38 +0800 Cai Huoqing wrote: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing Applied to the togreg branch of iio.git and pushed out as testing for 0-day to see if it can find any problems that we missed. Thanks, Jonathan > --- > drivers/iio/dac/stm32-dac-core.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/iio/dac/stm32-dac-core.c b/drivers/iio/dac/stm32-dac-core.c > index 906436780347..9a6a68b11b2a 100644 > --- a/drivers/iio/dac/stm32-dac-core.c > +++ b/drivers/iio/dac/stm32-dac-core.c > @@ -90,7 +90,6 @@ static int stm32_dac_probe(struct platform_device *pdev) > const struct stm32_dac_cfg *cfg; > struct stm32_dac_priv *priv; > struct regmap *regmap; > - struct resource *res; > void __iomem *mmio; > struct reset_control *rst; > int ret; > @@ -106,8 +105,7 @@ static int stm32_dac_probe(struct platform_device *pdev) > cfg = (const struct stm32_dac_cfg *) > of_match_device(dev->driver->of_match_table, dev)->data; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - mmio = devm_ioremap_resource(dev, res); > + mmio = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(mmio)) > return PTR_ERR(mmio); > 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 X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E358AC433EF for ; Sun, 19 Sep 2021 17:31:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id ACD4A6101C for ; Sun, 19 Sep 2021 17:31:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ACD4A6101C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=NXlv1qjzoMA4mxn1TY23iu1DMq3z+NhRW1Mz6/yCjBA=; b=x3BUVzIUKsVc48 BDOOVFnhLrbawTyTtHtBfWX+l1r7NaP9XmblXPmS+AoIoj511u7i++ED14JaHb2qnzrDaYZylQYFm uiM2KEKcFoSCvCwkuagghRnno83cMHduhAWu05YswESPkjMtf+RKZAdT5n1ioSLQGCLPEQzyAS3RY C4sPCY1nQzYLXxbevKeThOgYKOkOcm5e4eOUzbQj9FNMFmKkvYKoyl/JSD00ZTTYCnLxcp7wGjyVS 1h8kHyNzZDTCLeU+JPn74nXgYIfNi4dQqWQ1gcEVcdXxLLL51fiXXiH5HugjoXUdhfyVAJP2WENl0 bRMrBtZIzyTVT8GjRuug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mS0dU-00HZXV-T0; Sun, 19 Sep 2021 17:29:53 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mS0dP-00HZWu-GO for linux-arm-kernel@lists.infradead.org; Sun, 19 Sep 2021 17:29:48 +0000 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 739766101C; Sun, 19 Sep 2021 17:29:44 +0000 (UTC) Date: Sun, 19 Sep 2021 18:33:25 +0100 From: Jonathan Cameron To: Cai Huoqing , Cc: Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue , , , Subject: Re: [PATCH] iio: dac: stm32-dac: Make use of the helper function devm_platform_ioremap_resource() Message-ID: <20210919183325.7bb5a8d9@jic23-huawei> In-Reply-To: <20210908105638.1525-1-caihuoqing@baidu.com> References: <20210908105638.1525-1-caihuoqing@baidu.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; 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-20210919_102947_620382_2E2D2B1C X-CRM114-Status: GOOD ( 19.66 ) 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 Wed, 8 Sep 2021 18:56:38 +0800 Cai Huoqing wrote: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing Applied to the togreg branch of iio.git and pushed out as testing for 0-day to see if it can find any problems that we missed. Thanks, Jonathan > --- > drivers/iio/dac/stm32-dac-core.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/iio/dac/stm32-dac-core.c b/drivers/iio/dac/stm32-dac-core.c > index 906436780347..9a6a68b11b2a 100644 > --- a/drivers/iio/dac/stm32-dac-core.c > +++ b/drivers/iio/dac/stm32-dac-core.c > @@ -90,7 +90,6 @@ static int stm32_dac_probe(struct platform_device *pdev) > const struct stm32_dac_cfg *cfg; > struct stm32_dac_priv *priv; > struct regmap *regmap; > - struct resource *res; > void __iomem *mmio; > struct reset_control *rst; > int ret; > @@ -106,8 +105,7 @@ static int stm32_dac_probe(struct platform_device *pdev) > cfg = (const struct stm32_dac_cfg *) > of_match_device(dev->driver->of_match_table, dev)->data; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - mmio = devm_ioremap_resource(dev, res); > + mmio = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(mmio)) > return PTR_ERR(mmio); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel