aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-04-19 10:05:35 -0400
committerStephen Boyd <sboyd@kernel.org>2018-05-15 17:05:10 -0400
commit5c5e4fe37db02ff90e436c342e922212b6f79f37 (patch)
tree777891ce5dab020024bcdae7979a6fec33c27d57
parent60cc43fc888428bb2f18f08997432d426a243338 (diff)
clk: samsung: simplify getting .drvdata
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r--drivers/clk/samsung/clk-s3c2410-dclk.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/samsung/clk-s3c2410-dclk.c b/drivers/clk/samsung/clk-s3c2410-dclk.c
index 077df3e539a7..f41d89cef0f1 100644
--- a/drivers/clk/samsung/clk-s3c2410-dclk.c
+++ b/drivers/clk/samsung/clk-s3c2410-dclk.c
@@ -219,8 +219,7 @@ static int s3c24xx_dclk1_div_notify(struct notifier_block *nb,
219#ifdef CONFIG_PM_SLEEP 219#ifdef CONFIG_PM_SLEEP
220static int s3c24xx_dclk_suspend(struct device *dev) 220static int s3c24xx_dclk_suspend(struct device *dev)
221{ 221{
222 struct platform_device *pdev = to_platform_device(dev); 222 struct s3c24xx_dclk *s3c24xx_dclk = dev_get_drvdata(dev);
223 struct s3c24xx_dclk *s3c24xx_dclk = platform_get_drvdata(pdev);
224 223
225 s3c24xx_dclk->reg_save = readl_relaxed(s3c24xx_dclk->base); 224 s3c24xx_dclk->reg_save = readl_relaxed(s3c24xx_dclk->base);
226 return 0; 225 return 0;
@@ -228,8 +227,7 @@ static int s3c24xx_dclk_suspend(struct device *dev)
228 227
229static int s3c24xx_dclk_resume(struct device *dev) 228static int s3c24xx_dclk_resume(struct device *dev)
230{ 229{
231 struct platform_device *pdev = to_platform_device(dev); 230 struct s3c24xx_dclk *s3c24xx_dclk = dev_get_drvdata(dev);
232 struct s3c24xx_dclk *s3c24xx_dclk = platform_get_drvdata(pdev);
233 231
234 writel_relaxed(s3c24xx_dclk->reg_save, s3c24xx_dclk->base); 232 writel_relaxed(s3c24xx_dclk->reg_save, s3c24xx_dclk->base);
235 return 0; 233 return 0;