]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
backlight: da903x_bl: use dev_get_drvdata() instead of platform_get_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Thu, 25 Oct 2012 01:14:56 +0000 (12:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 29 Oct 2012 03:17:25 +0000 (14:17 +1100)
dev_get_drvdata() can be used instead of platform_get_drvdata()
to make the code smaller.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/da903x_bl.c

index 573c7ece0fde88f7b1990bd3989f17ccd8a86ed9..6891754143d4a0a94ffb176f5681ac3c29f57470 100644 (file)
@@ -164,15 +164,14 @@ static int da903x_backlight_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int da903x_backlight_suspend(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct backlight_device *bl = platform_get_drvdata(pdev);
+       struct backlight_device *bl = dev_get_drvdata(dev);
+
        return da903x_backlight_set(bl, 0);
 }
 
 static int da903x_backlight_resume(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct backlight_device *bl = platform_get_drvdata(pdev);
+       struct backlight_device *bl = dev_get_drvdata(dev);
 
        backlight_update_status(bl);
        return 0;