Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1382622pxb; Sun, 19 Sep 2021 16:00:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYd8NDNhXWdLgij9Kjm53OvztRQztKh/7KYTCqr6cSMoKOppspOafZ1dSPcsev14eZWHVe X-Received: by 2002:a05:6402:14c3:: with SMTP id f3mr26016781edx.312.1632092436715; Sun, 19 Sep 2021 16:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632092436; cv=none; d=google.com; s=arc-20160816; b=yG4Rr/fjcHAKLXLe6QygdmkPtadPseQe6jGywmgfjs7QKJdK55AaIhx1zgOJw3HfFy ED0a8oh/h+bjkYg4s+47982lBuz3mpP29INdnUBuNzr4GKwpbY+apLwTp9ZzHr6QWgis 8cxnpqU5yy32c+yO4p4n2d/UI4uuGZ1gT4OOuiC+XyLJIDoRNiNEKXsyBQCnzQ5IcIE5 dKj4yQQDSiEJcYTYk3Vc2A5meR9UKjm0+0d1BVJEI3YEAe/E8gEXR28P/Yzil4d7pA8W dCH+vBIM7kqSAj5KWNrE4dJxaffGsdjQ3wyRFHImEvCqNGbti/pgolfAajbUyU3zODq4 bV8w== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=xi7YxkUw/pxQXaBVFgdcT1HlOp4smCmDd1zG67WxeHA=; b=Ymf2E/+LdqIWNOWeL0aTWfV3Fnd7z3iWRslVX8NbrGKi0vz5X+tZZI4LJJWnWUEkdn wVB/ASiVUNWqpug/QUSuxw8jYE4bOqX4V30tbjYg871YIuLGY5j4xKwc6yok9bbuzLwB D5+mDNFAoX7hp3IwI6E8o0jPJgikliaKvN82z8Vjj1zqpr7T+eNAWN/Ky1mKsfQeXkVI NtkzuKH6MLKE4BIO1uRu3VubOTQoEwssVLWfiL/A8Pvj7os+G/766jqfNUjrf6zIISh8 hi221I8VyJMMngcYu03nlbFKr3DIDTFEPYnojlZth82mOadWXwNN1rIcEm3wBWCNOc2q uWIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y21si14585471eds.53.2021.09.19.16.00.12; Sun, 19 Sep 2021 16:00:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbhISRbP (ORCPT + 99 others); Sun, 19 Sep 2021 13:31:15 -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); >