]> Git Repo - linux.git/commitdiff
clk: samsung: simplify getting .drvdata
authorWolfram Sang <[email protected]>
Thu, 19 Apr 2018 14:05:35 +0000 (16:05 +0200)
committerStephen Boyd <[email protected]>
Tue, 15 May 2018 21:05:10 +0000 (14:05 -0700)
We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Sylwester Nawrocki <[email protected]>
Reviewed-by: Chanwoo Choi <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
drivers/clk/samsung/clk-s3c2410-dclk.c

index 077df3e539a71fef9a1ebfd98424525aeabb4885..f41d89cef0f19bff05bc03fc0c330a436ebbee6c 100644 (file)
@@ -219,8 +219,7 @@ static int s3c24xx_dclk1_div_notify(struct notifier_block *nb,
 #ifdef CONFIG_PM_SLEEP
 static int s3c24xx_dclk_suspend(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct s3c24xx_dclk *s3c24xx_dclk = platform_get_drvdata(pdev);
+       struct s3c24xx_dclk *s3c24xx_dclk = dev_get_drvdata(dev);
 
        s3c24xx_dclk->reg_save = readl_relaxed(s3c24xx_dclk->base);
        return 0;
@@ -228,8 +227,7 @@ static int s3c24xx_dclk_suspend(struct device *dev)
 
 static int s3c24xx_dclk_resume(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct s3c24xx_dclk *s3c24xx_dclk = platform_get_drvdata(pdev);
+       struct s3c24xx_dclk *s3c24xx_dclk = dev_get_drvdata(dev);
 
        writel_relaxed(s3c24xx_dclk->reg_save, s3c24xx_dclk->base);
        return 0;
This page took 0.060038 seconds and 4 git commands to generate.