Skip to content

Commit 56a5732

Browse files
YueHaibingbebarino
authored andcommitted
clk: s3c2410: 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 <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 21ec867 commit 56a5732

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/samsung/clk-s3c2410-dclk.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ static SIMPLE_DEV_PM_OPS(s3c24xx_dclk_pm_ops,
238238
static int s3c24xx_dclk_probe(struct platform_device *pdev)
239239
{
240240
struct s3c24xx_dclk *s3c24xx_dclk;
241-
struct resource *mem;
242241
struct s3c24xx_dclk_drv_data *dclk_variant;
243242
struct clk_hw **clk_table;
244243
int ret, i;
@@ -257,8 +256,7 @@ static int s3c24xx_dclk_probe(struct platform_device *pdev)
257256
platform_set_drvdata(pdev, s3c24xx_dclk);
258257
spin_lock_init(&s3c24xx_dclk->dclk_lock);
259258

260-
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
261-
s3c24xx_dclk->base = devm_ioremap_resource(&pdev->dev, mem);
259+
s3c24xx_dclk->base = devm_platform_ioremap_resource(pdev, 0);
262260
if (IS_ERR(s3c24xx_dclk->base))
263261
return PTR_ERR(s3c24xx_dclk->base);
264262

0 commit comments

Comments
 (0)