summaryrefslogtreecommitdiff
path: root/drivers/clk/axs10x/i2s_pll_clock.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-10-15 22:22:59 +0800
committerStephen Boyd <sboyd@kernel.org>2019-10-16 16:17:50 -0700
commit21ec8679c2cbb874885b11f7bc1c7e4d6e673c1b (patch)
tree215f6c34104592f70c7dbbb0e865d9a4ef1cd26f /drivers/clk/axs10x/i2s_pll_clock.c
parent0b17159de2c3be6a6b48b40f9c2c370dbdef456f (diff)
clk: axs10x: use devm_platform_ioremap_resource() to simplify code
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/20191015142259.17216-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/axs10x/i2s_pll_clock.c')
-rw-r--r--drivers/clk/axs10x/i2s_pll_clock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/axs10x/i2s_pll_clock.c b/drivers/clk/axs10x/i2s_pll_clock.c
index 71c2e9519ca8..e9da0e69bf6c 100644
--- a/drivers/clk/axs10x/i2s_pll_clock.c
+++ b/drivers/clk/axs10x/i2s_pll_clock.c
@@ -172,14 +172,12 @@ static int i2s_pll_clk_probe(struct platform_device *pdev)
struct clk *clk;
struct i2s_pll_clk *pll_clk;
struct clk_init_data init;
- struct resource *mem;
pll_clk = devm_kzalloc(dev, sizeof(*pll_clk), GFP_KERNEL);
if (!pll_clk)
return -ENOMEM;
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- pll_clk->base = devm_ioremap_resource(dev, mem);
+ pll_clk->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pll_clk->base))
return PTR_ERR(pll_clk->base);