Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2474332ybb; Sun, 12 Apr 2020 06:58:05 -0700 (PDT) X-Google-Smtp-Source: APiQypK64eDNteLcdCUcJYj4UgdIxPgbcv5zy91nVFsK+mucMGZ0yQu2LcdNdVlU18tP9WuQV8y3 X-Received: by 2002:ac8:6994:: with SMTP id o20mr1315373qtq.173.1586699885122; Sun, 12 Apr 2020 06:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586699885; cv=none; d=google.com; s=arc-20160816; b=PUZ2bgPE+x9AlkJCEUmN54oqlQPzZSEKjke2BE9Wr/go2J0tc6PjLQV89wVQj1ROly FjJwmD1o0p+pLnNO/iMO3/xtg6ueY/akudzockFqUyI5cAx7pVnwc6ccCJG+jw2P5pZz HD+V83KB8ezeZPml1COJFos/DMqH+MdASuE6BYd6NBiWnmkb1WhZN1G+QvnNx89nNYjz 56mnVGxL1dvnipOE+oD4KLT15/VOItilXsMK+6JYTKEOYPenAAViPFeGsj3GobkoCh+s 1GSRnV5d0UPEkpkvGEbHxVIRGTkv6FkHpVJXAwqfOeG7GHDqwF75+vZM62p4+CYJ3Rrw OlIw== 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=88xbndOYpGPe/NGmyaJojaQNXhzRAvoZsI5qqKDeBKc=; b=X1J1se4mA3TQSFfsk4kA05R22dvu5eJBzGA2cKYFYFL48B9Cj43tpmRDfRnoH6xWqh MuMslJDXGC2Dcv1aP/KD0CodT3h99mexwUGWeO3FqloY35q6exjlEQptwvorxEn0rm8i rlpHJa+eOcy7YaiqSzPEgY5GiWTz+pXhcYP3RJ5KWsljGv0a63ZGnIQqgFaim6vwhCUD qwcymviMhKoNaGWwtLs1Iif9x7LxxdsQizfrtha931gFj8gLIZPczvhOykPFxmqSccRH TDBFwWdXDdJednhMgCszN19wrpHLAhi6iWlFEuWgHp7rBcFJ2l++iSrSGv3zc7nTbmOv 9f6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Cz9w5UUr; 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 z3si2684363qth.96.2020.04.12.06.57.50; Sun, 12 Apr 2020 06:58:05 -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=Cz9w5UUr; 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 S1727018AbgDLN5F (ORCPT + 99 others); Sun, 12 Apr 2020 09:57:05 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42182 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725909AbgDLN5F (ORCPT ); Sun, 12 Apr 2020 09:57:05 -0400 Received: by mail-pg1-f194.google.com with SMTP id g6so3337889pgs.9; Sun, 12 Apr 2020 06:57:05 -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=88xbndOYpGPe/NGmyaJojaQNXhzRAvoZsI5qqKDeBKc=; b=Cz9w5UUrnKe3vHpSv451HrsP+jELlu2KJ/F9ZdaTxYjNFIbLL60xBXWzS9pJNu+q+q lt31gX+qh0g1CrqTZrgSp55NNy8CdMq/nPtykmffOMhrDy8XrQLqE59ovGvPg4J8JGml mACtcCkJAMRanQLr6NR0vhVb3XZeRfbq69VjdPyUTldcbGRw637Hp83U0dxKzEfOB0bM NVmn9PUAB7xJFOOyDwcWwVFP/ohBLiuBjKf7C0GHekrkgUFXEarMHAF2KTG2uHlMJ4vC 6kBMmic6+mT+IvRReQnlD+hmkjOQHMcnErvBzetcBNKJ49tAkvGy0/Hzn/1wHYdTV85o eCLg== 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=88xbndOYpGPe/NGmyaJojaQNXhzRAvoZsI5qqKDeBKc=; b=r3wPTk77ELz4f/w/Ps9Bq7020jzuW9RYD8F76mqkhTQ2S4mDhvk6ztbUUzamz6ILP0 AAeAidvYBGQGE035c94F3BJaHeuMb8WNwHA7m639jvp+xnbYR3cX98xq59rHNlJqh971 Q2HJ+6Y/da19OKdszpRlGA/h6nWdLPNyQ7HMv3H0DSv9WRx23vB9Qg4C8+KdodTZfSZY RSxYOdVjca1+Gsz6nckKJksFhZqbbHYBOIBQI8TQfkzfWlpQpXrBnwEudna6duIb+ODT /pVWhZb5/M+LoCgOUprt7hvQPNddf+8O7RH5/uLjmuACQYF59ESyA0jnl0ziBr14aOub Y4xw== X-Gm-Message-State: AGi0PubrSIjEIhZKg8gtroxCFxUHr/OwaHH8++ShFOWOVUq7hpUhJkvh TNM1bV8g0fpjt1FkSMO3CUM= X-Received: by 2002:a62:8343:: with SMTP id h64mr14488459pfe.166.1586699824643; Sun, 12 Apr 2020 06:57:04 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:992:22ab:f465:67ce:fbea:c439]) by smtp.gmail.com with ESMTPSA id 139sm6139060pfv.0.2020.04.12.06.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2020 06:57:03 -0700 (PDT) From: Aishwarya R To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Richard Fontana , Stephen Boyd , Thomas Gleixner , Kefeng Wang , Aishwarya R , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: adc: at91-adc: Use devm_platform_ioremap_resource Date: Sun, 12 Apr 2020 19:26:42 +0530 Message-Id: <20200412135644.4027-1-aishwaryarj100@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200409151125.32677-1-aishwaryarj100@gmail.com> References: <20200409151125.32677-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. It reduces boilerplate and suggested by coccinelle. Signed-off-by: Aishwarya Ramakrishnan --- 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); -- 2.17.1