linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: <a.zummo@towertech.it>, <alexandre.belloni@bootlin.com>,
	<joel@jms.id.au>,  <andrew@aj.id.au>,
	<nicolas.ferre@microchip.com>, <ludovic.desroches@microchip.com>,
	<computersforpeace@gmail.com>, <gregory.0xf0@gmail.com>,
	<f.fainelli@gmail.com>, <bcm-kernel-feedback-list@broadcom.com>,
	<linus.walleij@linaro.org>, <baruch@tkos.co.il>,
	<paul@crapouillou.net>, <vz@mleia.com>, <slemieux.tyco@gmail.com>,
	<khilman@baylibre.com>, <eddie.huang@mediatek.com>,
	<sean.wang@mediatek.com>, <matthias.bgg@gmail.com>,
	<patrice.chotard@st.com>, <mcoquelin.stm32@gmail.com>,
	<alexandre.torgue@st.com>, <mripard@kernel.org>,  <wens@csie.org>,
	<thierry.reding@gmail.com>, <jonathanh@nvidia.com>,
	<linux@prisktech.co.nz>, <michal.simek@xilinx.com>
Cc: linux-rtc@vger.kernel.org, linux-aspeed@lists.ozlabs.org,
	YueHaibing <yuehaibing@huawei.com>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH -next 30/34] rtc: tegra: use devm_platform_ioremap_resource() to simplify code
Date: Sun, 6 Oct 2019 18:29:49 +0800	[thread overview]
Message-ID: <20191006102953.57536-31-yuehaibing@huawei.com> (raw)
In-Reply-To: <20191006102953.57536-1-yuehaibing@huawei.com>

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/rtc/rtc-tegra.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index 69d695b..0159069 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -277,15 +277,13 @@ MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match);
 static int tegra_rtc_probe(struct platform_device *pdev)
 {
 	struct tegra_rtc_info *info;
-	struct resource *res;
 	int ret;
 
 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
 	if (!info)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	info->base = devm_ioremap_resource(&pdev->dev, res);
+	info->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(info->base))
 		return PTR_ERR(info->base);
 
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2019-10-06 10:43 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-06 10:29 [PATCH -next 00/34] rtc: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-10-06 10:29 ` [PATCH -next 01/34] rtc: asm9260: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 02/34] rtc: rtc-aspeed: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 03/34] rtc: brcmstb-waketimer: " YueHaibing
2019-10-07 18:15   ` Florian Fainelli
2019-10-06 10:29 ` [PATCH -next 04/34] rtc: at91sam9: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 05/34] rtc: cadence: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 06/34] rtc: coh901331: " YueHaibing
2019-10-09  7:46   ` Linus Walleij
2019-10-06 10:29 ` [PATCH -next 07/34] rtc: davinci: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 08/34] rtc: digicolor: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 09/34] rtc: ds1216: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 10/34] rtc: ds1511: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 11/34] rtc: ds1553: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 12/34] rtc: ep93xx: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 13/34] rtc: jz4740: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 14/34] rtc: lpc24xx: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 15/34] rtc: lpc32xx: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 16/34] rtc: meson: " YueHaibing
2019-10-07 18:09   ` Kevin Hilman
2019-10-07 20:01   ` Martin Blumenstingl
2019-10-06 10:29 ` [PATCH -next 17/34] rtc: mt7622: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 18/34] rtc: mv: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 19/34] rtc: omap: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 20/34] rtc: pic32: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 21/34] rtc: rtd119x: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 22/34] rtc: s3c: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 23/34] rtc: sa1100: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 24/34] rtc: spear: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 25/34] rtc: stk17ta8: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 26/34] rtc: ds1286: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 27/34] rtc: st-lpc: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 28/34] rtc: stm32: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 29/34] rtc: sunxi: " YueHaibing
2019-10-07  8:11   ` Chen-Yu Tsai
2019-10-06 10:29 ` YueHaibing [this message]
2019-10-06 10:29 ` [PATCH -next 31/34] rtc: tx4939: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 32/34] rtc: vt8500: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 33/34] rtc: xgene: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 34/34] rtc: zynqmp: " YueHaibing
2019-10-07 10:10 ` [PATCH -next 00/34] rtc: " Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191006102953.57536-31-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@aj.id.au \
    --cc=baruch@tkos.co.il \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=computersforpeace@gmail.com \
    --cc=eddie.huang@mediatek.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=joel@jms.id.au \
    --cc=jonathanh@nvidia.com \
    --cc=khilman@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=ludovic.desroches@microchip.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=mripard@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=patrice.chotard@st.com \
    --cc=paul@crapouillou.net \
    --cc=sean.wang@mediatek.com \
    --cc=slemieux.tyco@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=vz@mleia.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).