projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d22808
)
ASoC: rockchip: use devm_platform_ioremap_resource() to simplify code
author
YueHaibing
<yuehaibing@huawei.com>
Sat, 27 Jul 2019 15:07:07 +0000
(23:07 +0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 31 Jul 2019 11:03:52 +0000
(12:03 +0100)
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link:
https://lore.kernel.org/r/20190727150738.54764-4-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rk3328_codec.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/rk3328_codec.c
b/sound/soc/codecs/rk3328_codec.c
index 24f8f86d58e906103f5a5d908229c05a67356c8d..287c962ba00d7126ef5320682f2501cf7add1b53 100644
(file)
--- a/
sound/soc/codecs/rk3328_codec.c
+++ b/
sound/soc/codecs/rk3328_codec.c
@@
-432,7
+432,6
@@
static int rk3328_platform_probe(struct platform_device *pdev)
{
struct device_node *rk3328_np = pdev->dev.of_node;
struct rk3328_codec_priv *rk3328;
- struct resource *res;
struct regmap *grf;
void __iomem *base;
int ret = 0;
@@
-482,8
+481,7
@@
static int rk3328_platform_probe(struct platform_device *pdev)
return ret;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);