Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4384752ybb; Tue, 14 Apr 2020 06:20:06 -0700 (PDT) X-Google-Smtp-Source: APiQypLhbZNUaZrknYTRpo5+ox1PVjGJ+W85bT7N3Svho/m7F9VjyWR+Fwu9vs45yZkBslrvJnZN X-Received: by 2002:a17:906:524f:: with SMTP id y15mr19172ejm.231.1586870406137; Tue, 14 Apr 2020 06:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586870406; cv=none; d=google.com; s=arc-20160816; b=H2nUO7XvnXBEesibIf86AE4Ghv6/Z9dHQSCl96LKDUJZ9McTE6tYP1kXEthvb9bl9y LHozPbyXklA954q3COWXBNV8zex45wvHGD1wL5yU4uWeNwyLTzieJweweid32rq2Fe+g SbMt5kk2jbfxsrLU3K7guDIqTz3bHnrFE16N81B+GmpeB3QB8km1JtTu50FbpNNck3rj mMPD4mQbsJG6+SW/GCzUab0QnFR+TlpiZtFA5DRHO8HiB6n8quHcF0UUTqcCXMqaU0FO j462yDswrgFFg82Bw35GWRGLy/y60B2+j71X1z0jVy/qqRRT0Te4JK1Ld7XRPV/t31wQ 5nbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=uuJHbLj+ipKXtBWvitatYsCAAL+tDJnrAybQlpu4tV4=; b=opajy7yM0cL3dSJELmnyArI8cYeuoNRBKsNReYhJ9cxtvmNlQF8VTA8f3tgFBvNo7s sj/KjfdMlV5VDJ0IS0GRAYGOSKsj1ok4teM26DkP+5BM2xnohv5vFvuSwMVlCFYIS2m0 IPvMVOfIU8NY73wPqvMZ5XgfKuOJKp9voVyWkZGgJiHuvJIqcdVce/NhACV+iviF1sXj Su+DwZbS4J7p2KJq0NtWroqtXsm1iw1AbR8WBw7jMTyvrPrkOJh8dBYlmamv46qoronh SsDFy3muRMrZDB4cR6A0GmrBugfu/RXVaS7WuKyKhp1HJcOknJSfolNnh/1CwNXwMNXD TP2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k2i6dfph; spf=pass (google.com: best guess record for 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 11si8958712ejx.253.2020.04.14.06.19.42; Tue, 14 Apr 2020 06:20:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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; dkim=pass header.i=@kernel.org header.s=default header.b=k2i6dfph; spf=pass (google.com: best guess record for 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 S1730542AbgDMPgP (ORCPT + 99 others); Mon, 13 Apr 2020 11:36:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:48590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728194AbgDMPgN (ORCPT ); Mon, 13 Apr 2020 11:36:13 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (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 EA5622072C; Mon, 13 Apr 2020 15:36:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586792173; bh=ySJ/GZ+In15NYeLHoiARho05iwPwM96hM78oDSnn3u4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=k2i6dfph/vfNL/JUvwdMldgHGQna7KMCx43iJ0B9PPYZKoRGdbusbuGVzC0ZkzgtI bZt9ct5xW8bBDEiZ0elrES7yPSglluNUH/YQxJmoV3tyXa/FDS+4ABNXA4bH3fQk/N 7/bGXJKBPnBjKzo6QjgwwGud7rg617wrjKbPoBcA= Date: Mon, 13 Apr 2020 16:36:07 +0100 From: Jonathan Cameron To: Aishwarya R Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Richard Fontana , Stephen Boyd , Thomas Gleixner , Kefeng Wang , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: at91-adc: Use devm_platform_ioremap_resource Message-ID: <20200413163607.4fc548a2@archlinux> In-Reply-To: <20200412135644.4027-1-aishwaryarj100@gmail.com> References: <20200409151125.32677-1-aishwaryarj100@gmail.com> <20200412135644.4027-1-aishwaryarj100@gmail.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 12 Apr 2020 19:26:42 +0530 Aishwarya R wrote: > From: Aishwarya Ramakrishnan > > Use the helper function that wraps the calls to > platform_get_resource() and devm_ioremap_resource() > together. It reduces boilerplate and suggested by coccinelle. > > Signed-off-by: Aishwarya Ramakrishnan Same comments as the previous patch. Applied anyway (this time) mostly because it's quicker for me than insisting on a v3. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > drivers/iio/adc/at91_adc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c > index abe99856c823..0368b6dc6d60 100644 > --- a/drivers/iio/adc/at91_adc.c > +++ b/drivers/iio/adc/at91_adc.c > @@ -1152,7 +1152,6 @@ static int at91_adc_probe(struct platform_device *pdev) > int ret; > struct iio_dev *idev; > struct at91_adc_state *st; > - struct resource *res; > u32 reg; > > idev = devm_iio_device_alloc(&pdev->dev, sizeof(struct at91_adc_state)); > @@ -1182,9 +1181,7 @@ static int at91_adc_probe(struct platform_device *pdev) > if (st->irq < 0) > return -ENODEV; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - > - st->reg_base = devm_ioremap_resource(&pdev->dev, res); > + st->reg_base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(st->reg_base)) > return PTR_ERR(st->reg_base); >