Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp569746ybi; Wed, 17 Jul 2019 01:24:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJyhlQYqfmO8J43D7rmY4mA+83PEt9YYenc/73NzAkUkkVGBWRFmcjlstWRGneXzaXYqoh X-Received: by 2002:a65:6497:: with SMTP id e23mr38136035pgv.89.1563351861278; Wed, 17 Jul 2019 01:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563351861; cv=none; d=google.com; s=arc-20160816; b=oEjyqXRQHNX3MiUojRu+vvG7XnOYPApze0VwOiuzHRN5mSi5bkZy6vk6UIq3E2BVkw cZ7Q9qrjPPDqorQ1yCtDmtJUw3RgmDjxoKeO4Nyhk098kaxKdSPJQB/8e5Wmipv/+BRc VOUrXmMqqClSzpLrdfxCxDgfWLG1JfnxWeU92VGV+lfx/ShYcABZLOy0u5VjG9zXI56Q lKHaj4qEnRFwMxPEj/z1J0D647PpnO6VjceP0DYN61a4B19le+0QYlYohKDG9BoLpU3o lekHdLxan2pk9Snoaj6LtQ1rmKCQkg+ghDPFYb9fBHDA/0Rxy3XX50VcM2zsoXbvGqeY p9aw== 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:cc:to:from; bh=/RSs/SEyCas45nqokEn/NA4U+JZlnD6I5Od/rOxDYCU=; b=GGeYu0XLPwMsGE2Ypp0rN6qvLGRn4TeFisYkEX+JbAKJAqBjUYl9oJTVDY9sfVTfpB HUppQig26qva9GFyWzSnyhumdz0mu2JWcPuL6b9zImXGx0wRP/MLYHspjOXFhhOjCeTP f/9IANz4ywXHAixmo963WhihXk10kdZTVpBayZXOnaoGc1RksqKs/e2CrLxuNnWbpbJn pNURVUvsIMfJODPIhSewTJKo4sAPsWETg8ADGeIIrxCoZlInSvNW29Nnp8xBB3opasL2 yftu0qdUwDBKIvT0I3LqoNm0JyoAWOZO44jOhusb1evQdWfR0MlynjMIt2fxP3SoFT54 NVxw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a21si23640544pfo.249.2019.07.17.01.24.04; Wed, 17 Jul 2019 01:24:21 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726276AbfGQIXc (ORCPT + 99 others); Wed, 17 Jul 2019 04:23:32 -0400 Received: from inva020.nxp.com ([92.121.34.13]:47910 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbfGQIXc (ORCPT ); Wed, 17 Jul 2019 04:23:32 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C20EF1A00A0; Wed, 17 Jul 2019 10:23:30 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5D7E81A0085; Wed, 17 Jul 2019 10:23:25 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7A458402C3; Wed, 17 Jul 2019 16:23:18 +0800 (SGT) From: Anson.Huang@nxp.com To: a.zummo@towertech.it, alexandre.belloni@bootlin.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] rtc: imxdi: use devm_platform_ioremap_resource() to simplify code Date: Wed, 17 Jul 2019 16:14:11 +0800 Message-Id: <20190717081411.30622-1-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.9.5 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang --- drivers/rtc/rtc-imxdi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c index 3f3d652..f21dc6b 100644 --- a/drivers/rtc/rtc-imxdi.c +++ b/drivers/rtc/rtc-imxdi.c @@ -740,7 +740,6 @@ static void dryice_work(struct work_struct *work) */ static int __init dryice_rtc_probe(struct platform_device *pdev) { - struct resource *res; struct imxdi_dev *imxdi; int norm_irq, sec_irq; int rc; @@ -751,8 +750,7 @@ static int __init dryice_rtc_probe(struct platform_device *pdev) imxdi->pdev = pdev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - imxdi->ioaddr = devm_ioremap_resource(&pdev->dev, res); + imxdi->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(imxdi->ioaddr)) return PTR_ERR(imxdi->ioaddr); -- 2.7.4