From: YueHaibing <yuehaibing@huawei.com>
To: <herbert@gondor.apana.org.au>, <mpm@selenic.com>, <arnd@arndb.de>,
<gregkh@linuxfoundation.org>, <nicolas.ferre@microchip.com>,
<alexandre.belloni@bootlin.com>,
<ludovic.desroches@microchip.com>, <f.fainelli@gmail.com>,
<rjui@broadcom.com>, <sbranden@broadcom.com>,
<bcm-kernel-feedback-list@broadcom.com>, <eric@anholt.net>,
<wahrenst@gmx.net>, <l.stelmach@samsung.com>, <kgene@kernel.org>,
<krzk@kernel.org>, <khilman@baylibre.com>, <dsaxena@plexity.net>,
<patrice.chotard@st.com>
Cc: <linux-crypto@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-rpi-kernel@lists.infradead.org>,
<linux-samsung-soc@vger.kernel.org>,
<linux-amlogic@lists.infradead.org>,
<linuxppc-dev@lists.ozlabs.org>,
YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH -next 01/13] hwrng: atmel - use devm_platform_ioremap_resource() to simplify code
Date: Wed, 16 Oct 2019 18:46:09 +0800 [thread overview]
Message-ID: <20191016104621.26056-2-yuehaibing@huawei.com> (raw)
In-Reply-To: <20191016104621.26056-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/char/hw_random/atmel-rng.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index e557057..b3138ec2 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -62,15 +62,13 @@ static void atmel_trng_disable(struct atmel_trng *trng)
static int atmel_trng_probe(struct platform_device *pdev)
{
struct atmel_trng *trng;
- struct resource *res;
int ret;
trng = devm_kzalloc(&pdev->dev, sizeof(*trng), GFP_KERNEL);
if (!trng)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- trng->base = devm_ioremap_resource(&pdev->dev, res);
+ trng->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(trng->base))
return PTR_ERR(trng->base);
--
2.7.4
next prev parent reply other threads:[~2019-10-16 10:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 10:46 [PATCH -next 00/13] hwrng: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-10-16 10:46 ` YueHaibing [this message]
2019-10-17 9:32 ` [PATCH -next 01/13] hwrng: atmel - " Ludovic Desroches
2019-10-16 10:46 ` [PATCH -next 02/13] hwrng: bcm2835 " YueHaibing
2019-10-16 16:41 ` Florian Fainelli
2019-10-16 10:46 ` [PATCH -next 03/13] hwrng: exynos " YueHaibing
[not found] ` <CGME20191018150543eucas1p1cf4312467597ad7c76f258e924d8184a@eucas1p1.samsung.com>
2019-10-18 15:05 ` Łukasz Stelmach
2019-10-16 10:46 ` [PATCH -next 04/13] hwrng: hisi " YueHaibing
2019-10-16 10:46 ` [PATCH -next 05/13] hwrng: ks-sa " YueHaibing
2019-10-16 10:46 ` [PATCH -next 06/13] hwrng: meson " YueHaibing
2019-10-16 16:26 ` Kevin Hilman
2019-10-16 10:46 ` [PATCH -next 07/13] hwrng: npcm " YueHaibing
2019-10-16 10:46 ` [PATCH -next 08/13] hwrng: omap " YueHaibing
2019-10-16 10:46 ` [PATCH -next 09/13] hwrng: pasemi " YueHaibing
2019-10-16 10:46 ` [PATCH -next 10/13] hwrng: pic32 " YueHaibing
2019-10-16 10:46 ` [PATCH -next 11/13] hwrng: st " YueHaibing
2019-10-16 11:29 ` Patrice CHOTARD
2019-10-16 10:46 ` [PATCH -next 12/13] hwrng: tx4939 " YueHaibing
2019-10-16 10:46 ` [PATCH -next 13/13] hwrng: xgene " YueHaibing
2019-10-16 16:44 ` [PATCH -next 00/13] hwrng: " Florian Fainelli
2019-10-17 1:27 ` Yuehaibing
2019-10-25 15:20 ` Herbert Xu
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=20191016104621.26056-2-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dsaxena@plexity.net \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=kgene@kernel.org \
--cc=khilman@baylibre.com \
--cc=krzk@kernel.org \
--cc=l.stelmach@samsung.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=ludovic.desroches@microchip.com \
--cc=mpm@selenic.com \
--cc=nicolas.ferre@microchip.com \
--cc=patrice.chotard@st.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=wahrenst@gmx.net \
/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).