projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fe1402
)
iio: dac: stm32-dac: Make use of the helper function devm_platform_ioremap_resource()
author
Cai Huoqing
<caihuoqing@baidu.com>
Wed, 8 Sep 2021 10:56:38 +0000
(18:56 +0800)
committer
Jonathan Cameron
<Jonathan.Cameron@huawei.com>
Sun, 17 Oct 2021 10:05:54 +0000
(11:05 +0100)
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Link:
https://lore.kernel.org/r/20210908105638.1525-1-caihuoqing@baidu.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/stm32-dac-core.c
patch
|
blob
|
history
diff --git
a/drivers/iio/dac/stm32-dac-core.c
b/drivers/iio/dac/stm32-dac-core.c
index
9064367
..
9a6a68b
100644
(file)
--- a/
drivers/iio/dac/stm32-dac-core.c
+++ b/
drivers/iio/dac/stm32-dac-core.c
@@
-90,7
+90,6
@@
static int stm32_dac_probe(struct platform_device *pdev)
const struct stm32_dac_cfg *cfg;
struct stm32_dac_priv *priv;
struct regmap *regmap;
- struct resource *res;
void __iomem *mmio;
struct reset_control *rst;
int ret;
@@
-106,8
+105,7
@@
static int stm32_dac_probe(struct platform_device *pdev)
cfg = (const struct stm32_dac_cfg *)
of_match_device(dev->driver->of_match_table, dev)->data;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mmio = devm_ioremap_resource(dev, res);
+ mmio = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mmio))
return PTR_ERR(mmio);