Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1744793ybb; Thu, 9 Apr 2020 08:14:15 -0700 (PDT) X-Google-Smtp-Source: APiQypL3RRBeX7FUkLPrfAcr2aRO9dEWR8vqxwOOylUb1GAgk6yOD4DTmo1gkMK/cxeP4mbOg8/j X-Received: by 2002:a05:620a:2f3:: with SMTP id a19mr326896qko.162.1586445255218; Thu, 09 Apr 2020 08:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586445255; cv=none; d=google.com; s=arc-20160816; b=xYBtwYsshJ+E9jvLVxA3GxFRdtNEaurJot34MZzNEQ+Wb9FMdOeZAucK60UEEPJ81w fFyvcWf5Zq/ncajdzoHqZFXAsQtt86gJleztfkaxhFwbrxZFG25Ju1eO9wQ6k0X1zxQQ A4CCotTfQqogUZpjnn6zgkkCHRcZ+i4GK4xL1QzTDK7l0zGfKAZ5AZWh8yN8VNf4XZao hRTanqGzGRbRw41DyJD2YCYpQnpx1bpaQtzNDuNgw9sk0KdnDHCxXLJa4jrgr2kCsMxz TDx3RFjrr6uKPnyi124fvZxJWvRU+2P19ezMt76iuJWVFgcK5Vz2E6HcTC4M4riXmAZS EX9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=Uyv/46Juj5lfxcr3X6PKHvpdHN5/CAT3a4tPfLzARdM=; b=M2P2wOZ55pwKvggT00tDq/4CsKFWpkoN+edkYHhB8LMb9YHQNnjxKN7U6Ix9f5CsMW 3x3JlHJ0GYQQvmh2nhhDla0n6eohfCBGkrm4nQSlThkwDC24uHI/IEZpJJbwEqpGZjVe ADZLZKsshnbFR9jz3qOUCcU+zm3wl9SNKN7JB2KycjX5olfCYVLWxYlmfq2bKWhegcdc ekZATbR6sr9QclYOSfHHVk6YBlmn7+PSwZ4PAjKDjcKIPIIbHqHPaTQYOYmIcH5NIyfq FHjipY4t6iZxvLN0qGoqCXq6nAp3uHWh+M6k9FhwJvRCGLlme8MppBKrEYnktD0wjIx3 8ipw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pnlwXTJG; 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 x1si5770405qvb.11.2020.04.09.08.13.54; Thu, 09 Apr 2020 08:14:15 -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=pnlwXTJG; 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 S1727990AbgDIPLo (ORCPT + 99 others); Thu, 9 Apr 2020 11:11:44 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:39393 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbgDIPLo (ORCPT ); Thu, 9 Apr 2020 11:11:44 -0400 Received: by mail-pj1-f67.google.com with SMTP id z3so1394297pjr.4; Thu, 09 Apr 2020 08:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=Uyv/46Juj5lfxcr3X6PKHvpdHN5/CAT3a4tPfLzARdM=; b=pnlwXTJGzos2ogii+pXTu2z1dU1WlWajjcD9NxY6gBuekvamSXZTdOZiB/DAIr/wsH TG87wBTFk5jBzdeez1DuQe6H6DlPvRz4GFgceEaeQh/ruyeiVhR610KoG+WIVAPBOuIO +u4jh/ujyvta9oWDtpzEXQM/q9HoIPXemre6qYRz6cS2LROgykzVj0GNZ4fatX8G9NEP 7Ql5ru+fn077/80MqdqcJUNH/lVJkwUj13GxCT0zP/L/Craz1AXpgAYn+oK6nUkK8mfz jweku9IBKesjmlxrvRlH43f9PJrAgcwzUz21KqToVjydwo+jPyj4+CJMcTJbdWTiDGlA wlyg== 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; bh=Uyv/46Juj5lfxcr3X6PKHvpdHN5/CAT3a4tPfLzARdM=; b=j7BMHSpyvCtATkcuU1tXB5aM20cNmid5dkzW2c+2oewlvnoc1EJ54YDYSGeHHTHJ/Q LBWeRUu99YQNE4WCyVBqedJ35wxzIZ3pfzfxUk4Nv9OInEPq0ih5ru1qLBfUG+3OW2QR 6YrqSnCeKxuBNk9P9G/ilG6exHBGkSUkYkWqoLbPHYT0GtVXjw7BboB1DRJ158YfDZ+a hq54qlssn1tCWsVK0dNNgaiC231VAGeF/wWK8m8xnBvWQX4FcH+bUJExBcfryeXxsGbW 0rQRBBPKva4AEWFDe1qUxUcxN8AWhmUpthet2SC0+BZr/ghXovuRQgpuzgeH+r3YTwOT 5E7A== X-Gm-Message-State: AGi0PuY/ZzsRdwcvZAi4cgbY/L0oAG4Nol4CryOjwREoi6pM0d+qcqDS og7inRDdNekx1e9pr6Y9dio= X-Received: by 2002:a17:902:8bc7:: with SMTP id r7mr91051plo.12.1586445103298; Thu, 09 Apr 2020 08:11:43 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:700:a20f:d50:b01b:c4e4:35ad]) by smtp.gmail.com with ESMTPSA id s39sm2493358pjb.10.2020.04.09.08.11.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 08:11:42 -0700 (PDT) From: Aishwarya R To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Thomas Gleixner , Allison Randal , Kefeng Wang , Stephen Boyd , 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: Thu, 9 Apr 2020 20:41:23 +0530 Message-Id: <20200409151125.32677-1-aishwaryarj100@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the helper function that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Aishwarya R --- 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