Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2502359ybb; Sun, 12 Apr 2020 07:34:55 -0700 (PDT) X-Google-Smtp-Source: APiQypKw6yIjScmbmYfgg9PjK7dgL6TYDIqiPM4S75aCVZarybn1JBZ4zSt+fUZAze06pwd1Edwf X-Received: by 2002:a37:6356:: with SMTP id x83mr12607783qkb.339.1586702095402; Sun, 12 Apr 2020 07:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586702095; cv=none; d=google.com; s=arc-20160816; b=QtjyqVEh/lYYIomUKyAjCiyCS7Jkf10rQxNzArfU6ynTHW1NMR0OUAfc+QBxRFMPwj lDq9+8Zselm7hTMylzfsdcmBNpA2S3W6v8OwFdBEO2H1fu/J3ENyePsoSz2/fYPFtciL syeRr+3MbG05M8s+qrBdfhEKs+Hn/3UIi0DPlSx5a0wbjlB5YrKCl/0K2mu4w8rP68Vm Dgw8khU/3iwFuGzAo4SPV6Pjhfbj19WeACj0Gd533yqB0OIvhEiWE3gs3bw5dT+LM5fU Q83G5kwUmESKs2nQmQRkFLEVTSZLMsiI5PqDggpgBRd2NaOntvvPZfO2X8RBw7WXgPoz R0dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=/Lj7/UVhiRjtSh2yT7HeljEOXZWQTtN5YOXyQ/wCWCY=; b=vaLmnhIDomzOe9jT80JJIlWharOx9ZMB0KsniIgmRVSwSCVIlwySPn0xWn5JkyoyTk 2wDCcxnb9rV2LrCQ+17M/qypQFgdPzNc32L5xVq5ez2BAOfcd+deIwl9MgAxaBZH2eMv DAPBpby1LZPQC6h2D8DEqcx7FcTFqki8yC8+TfxaPgYNA+txHHHtO55GxAKV/5jDZxCv anZ3AbEeIGrFV7RLCqdAoX34Uxf42exYlRRoIX6wdKEWJipndyvUks97QfY5HTTbIR81 QVbIZrARyieNv5ibxeGTMmAeK+oCTxDVLmxboGFu+mudfN51+Eto2giQrrJvitX5pscC Dl6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XZ7fYEt7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20si4479208qko.362.2020.04.12.07.34.40; Sun, 12 Apr 2020 07:34:55 -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=@gmail.com header.s=20161025 header.b=XZ7fYEt7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727065AbgDLOct (ORCPT + 99 others); Sun, 12 Apr 2020 10:32:49 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:38979 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726689AbgDLOct (ORCPT ); Sun, 12 Apr 2020 10:32:49 -0400 Received: by mail-pj1-f68.google.com with SMTP id o1so1999023pjs.4; Sun, 12 Apr 2020 07:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=/Lj7/UVhiRjtSh2yT7HeljEOXZWQTtN5YOXyQ/wCWCY=; b=XZ7fYEt706nnXOsWwkkXV2znCaV1uZBc/qih5IwvviHtoehAHgl7D2w5sm2q4JkDla bhW1LSzxRFE5g/tbJs7NLpW3VjRMN77n5H+lblLrdJNtzPurzYwrsyzAp9JsGzDndDkf kXm319skeqK3tUz9BETmdCtclFGfvGD6GPfSwpjpkgPZChiJ4iUZ0BP109p11OFQTesx OyVrRBu63ZjOyD/pLRBdpjrgjB6OghdeyMaMMalQh4rl1kqT7CbzLCzTLXsP+xDYlCUa 41wSEX2VxDRSuZEKzIFoU8EGxrinmfawOEiHz/FIIHtFF/Yyv3GeBSVSfFP7I56FiEeC YV4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=/Lj7/UVhiRjtSh2yT7HeljEOXZWQTtN5YOXyQ/wCWCY=; b=UFk9eAJUa6LpT8Y9DIUgxi2+fgdXgxu/cvRhESbG4vek0sqIHIpF3eX8maqFpIKmD4 pcJW9FYzP80G/oAsVx+OIYoEWRGlLDsCEhwJ+cCVV+f3dHrktFWxCqW1zg9EqH3fgE8V g99lrgjLSjt/2BGwc4gT6+wz2H0fqEq1VBq8IoOhl+JSJH0y4QxbNLRSOfS3knKuS5lt nqD1DWdtLS/f901BXwq9XKXcDa3oPcHZkZSJsF4lPTyLcDl2VMkaEbV9aFfAMj++dax/ qakIvp+X1K/ePwhTjboDGIU25NQSBWl6y+mry8xMmtPFL4EZjAzJiMZP+9GDIxTPgAMc QBtg== X-Gm-Message-State: AGi0PuZwCm+YLvD7Yns+PJyP5dKQk7ZwxRpi19Ng2hpth511Y95IVie2 DHlhYPCxxAV9dPX2mv/kthc= X-Received: by 2002:a17:90a:a111:: with SMTP id s17mr17362116pjp.129.1586701966819; Sun, 12 Apr 2020 07:32:46 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:992:22ab:f465:67ce:fbea:c439]) by smtp.gmail.com with ESMTPSA id o11sm5804266pgh.78.2020.04.12.07.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2020 07:32:46 -0700 (PDT) From: Aishwarya R To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Maxime Ripard , Chen-Yu Tsai , Enrico Weigelt , Allison Randal , Yangtao Li , Stephen Boyd , Aishwarya R , Thomas Gleixner , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: adc: sun4i-gpadc-iio: Use devm_platform_ioremap_resource Date: Sun, 12 Apr 2020 20:02:18 +0530 Message-Id: <20200412143220.4476-1-aishwaryarj100@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200409141331.30882-1-aishwaryarj100@gmail.com> References: <20200409141331.30882-1-aishwaryarj100@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aishwarya Ramakrishnan Use the helper function that wraps the calls to platform_get_resource() and devm_ioremap_resource() together.Reduces boilerplate and suggested by coccinelle. Signed-off-by: Aishwarya Ramakrishnan --- drivers/iio/adc/sun4i-gpadc-iio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 176e1cb4abb1..0f2c1738a90d 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -496,7 +496,6 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev, struct iio_dev *indio_dev) { struct sun4i_gpadc_iio *info = iio_priv(indio_dev); - struct resource *mem; void __iomem *base; int ret; @@ -508,8 +507,7 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev, indio_dev->num_channels = ARRAY_SIZE(sun8i_a33_gpadc_channels); indio_dev->channels = sun8i_a33_gpadc_channels; - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, mem); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- 2.17.1