OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a09140
)
spi: uniphier: Use devm_platform_get_and_ioremap_resource() to simplify code
author
Kunihiko Hayashi
<hayashi.kunihiko@socionext.com>
Mon, 11 May 2020 08:25:30 +0000
(17:25 +0900)
committer
Mark Brown
<broonie@kernel.org>
Mon, 11 May 2020 17:17:52 +0000
(18:17 +0100)
Use devm_platform_get_and_ioremap_resource() to simplify code instead of
platform_get_resource() and devm_ioremap_resource(). This also gets
the resource that the following code uses.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link:
https://lore.kernel.org/r/1589185530-28170-2-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-uniphier.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-uniphier.c
b/drivers/spi/spi-uniphier.c
index
0457d33
..
6a9ef8e
100644
(file)
--- a/
drivers/spi/spi-uniphier.c
+++ b/
drivers/spi/spi-uniphier.c
@@
-659,8
+659,7
@@
static int uniphier_spi_probe(struct platform_device *pdev)
priv->master = master;
priv->is_save_param = false;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->base = devm_ioremap_resource(&pdev->dev, res);
+ priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(priv->base)) {
ret = PTR_ERR(priv->base);
goto out_master_put;