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:
4d3a369
)
clk: hisilicon: use devm_platform_ioremap_resource() to simplify code
author
YueHaibing
<yuehaibing@huawei.com>
Mon, 14 Oct 2019 14:40:14 +0000
(22:40 +0800)
committer
Stephen Boyd
<sboyd@kernel.org>
Wed, 16 Oct 2019 23:17:06 +0000
(16:17 -0700)
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link:
https://lkml.kernel.org/r/20191014144014.20644-1-yuehaibing@huawei.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/hisilicon/reset.c
patch
|
blob
|
history
diff --git
a/drivers/clk/hisilicon/reset.c
b/drivers/clk/hisilicon/reset.c
index 2e22fea2a2e7222ef0396a591e02778e2ee96c68..93cee17db8b160d18f226ee171cd28b0a65c8a96 100644
(file)
--- a/
drivers/clk/hisilicon/reset.c
+++ b/
drivers/clk/hisilicon/reset.c
@@
-90,14
+90,12
@@
static const struct reset_control_ops hisi_reset_ops = {
struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev)
{
struct hisi_reset_controller *rstc;
- struct resource *res;
rstc = devm_kmalloc(&pdev->dev, sizeof(*rstc), GFP_KERNEL);
if (!rstc)
return NULL;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- rstc->membase = devm_ioremap_resource(&pdev->dev, res);
+ rstc->membase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rstc->membase))
return NULL;