Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2325872ybb; Sun, 12 Apr 2020 03:14:40 -0700 (PDT) X-Google-Smtp-Source: APiQypL1EW7y2wZoTtJQF8RAt/5qSk/Gn7o61TFCLBrIJiZ5KZgRkgh8E/hRn1uPNxrmLEqQXcII X-Received: by 2002:ac8:3665:: with SMTP id n34mr6756046qtb.227.1586686480344; Sun, 12 Apr 2020 03:14:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586686480; cv=none; d=google.com; s=arc-20160816; b=Tsl5gSEJLxKxp/j6Xfw3+ieEHs8UBeWz0O+V1b3wDMAXd0geQu4jBNrgn2GOWyf8NV XdwcviPdrVFRQcRRF/TrNl8Fsi4772wk8gdnKXW17+p05MYeJeeoScYIoVo6hdRCOB71 zvVHp23NsbilrkgAIz3Jv1oCOca5N1FTGxJMAvKFHBRR4PobKkUWcHU6PhmzQoi1KKZW VUWfQ1ufrCIRS5pZKBwfKuFG4vI1C7jlA0FpF5sJ5MnvHDUUBU1PnEYOwchE+I9imLOh ChsZibF6qOAh6OeGJ8BVaPYT81xW4xUOla/92Ldvr1jXpYAexUje/lVAAHnmnxUVuaTB Y1Ug== 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=hQ2Cak1EeQrLxzhOExCUaW0KFSvpMWSgSV5NsE5bUmk=; b=Vt+L1xHEYo8ESqbTCaWZudlZrmmyeR+DKOJAEOhkxxh2sPt9zpb/GRqI5cqZGDFPuO AzqBqP6KOh2/KofxV+MPndC42WQHIDwuSG2ZGfzeWKJFtjZCK2SOVL9PzSxrK878ssX5 2HS+PzdNUOfT9gWFRBgC2/BnYet7l2VdKzYfZSqnFu4X8nj9a1syQBN+aAYyNR8TucSv P+ZO2Aml6Hf2lNdslRXvB1AeHfIx/FiH3pTuVMBgeCtXd7l2fe8DGWqEouiFIrEXreqZ n/1p7rH1HAzdhHHJkcJ1Ix6o4vTLl0ybda9QgASPBT3YqgXRq1NrwFcrNht5OTmFR4Sh kTCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qzml9lHL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id c19si3272700qtg.376.2020.04.12.03.14.25; Sun, 12 Apr 2020 03:14:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qzml9lHL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726962AbgDLKNj (ORCPT + 99 others); Sun, 12 Apr 2020 06:13:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:48172 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbgDLKNj (ORCPT ); Sun, 12 Apr 2020 06:13:39 -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 65C37206DA; Sun, 12 Apr 2020 10:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586686419; bh=Km3t+lTTTiSV9AJxSvLGxQM3QWc8v3EtPhvy9GxYp78=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Qzml9lHLuO8FdM9NYT7jYkBqWHM6OLkPUa8ELk6Sf1wwaRdUqyubGjC7KWZSte/46 Ffjlrk8ffBoBUlVAjOIN5rrAfmDym//KFhTZIaemZ0nVggKQJMq8h8ZqpSXj4Me+oh AtPgDLjtkkuEM4tJ7/lOsxzLGYeq2UgD3HsuUkJs= Date: Sun, 12 Apr 2020 11:13:34 +0100 From: Jonathan Cameron To: Aishwarya R Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Thomas Gleixner , Allison Randal , Kefeng Wang , Stephen Boyd , 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: <20200412111334.46fccd20@archlinux> In-Reply-To: <20200409151125.32677-1-aishwaryarj100@gmail.com> References: <20200409151125.32677-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 Thu, 9 Apr 2020 20:41:23 +0530 Aishwarya R wrote: > Use the helper function that wraps the calls to > platform_get_resource() and devm_ioremap_resource() > together. > > Signed-off-by: Aishwarya R Hi Aishwarya R, Thanks for the patch. Good to add a little more detail to the description and note that I do prefer one patch per driver for IIO drivers. One other thing. Please use full name for the signed-off-by. I see you use a longer form in your email later in the thread. The DCO is a formal legal statement https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin so we tend to be fussy! 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); >