OSDN Git Service

clk: use platform_{get,set}_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Fri, 24 May 2013 01:11:46 +0000 (10:11 +0900)
committerMike Turquette <mturquette@linaro.org>
Fri, 31 May 2013 01:19:34 +0000 (18:19 -0700)
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk-twl6040.c
drivers/clk/clk-wm831x.c

index 3af729b..1ada79a 100644 (file)
@@ -95,14 +95,14 @@ static int twl6040_clk_probe(struct platform_device *pdev)
        if (IS_ERR(clkdata->clk))
                return PTR_ERR(clkdata->clk);
 
-       dev_set_drvdata(&pdev->dev, clkdata);
+       platform_set_drvdata(pdev, clkdata);
 
        return 0;
 }
 
 static int twl6040_clk_remove(struct platform_device *pdev)
 {
-       struct twl6040_clk *clkdata = dev_get_drvdata(&pdev->dev);
+       struct twl6040_clk *clkdata = platform_get_drvdata(pdev);
 
        clk_unregister(clkdata->clk);
 
index 58d08a6..1b3f8c9 100644 (file)
@@ -384,7 +384,7 @@ static int wm831x_clk_probe(struct platform_device *pdev)
        if (IS_ERR(clkdata->clkout))
                return PTR_ERR(clkdata->clkout);
 
-       dev_set_drvdata(&pdev->dev, clkdata);
+       platform_set_drvdata(pdev, clkdata);
 
        return 0;
 }