Commit f0f13cd0 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

backlight: da903x_bl: use dev_get_drvdata() instead of platform_get_drvdata()

dev_get_drvdata() can be used instead of platform_get_drvdata()
to make the code smaller.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8f06ce3b
...@@ -164,15 +164,14 @@ static int da903x_backlight_remove(struct platform_device *pdev) ...@@ -164,15 +164,14 @@ static int da903x_backlight_remove(struct platform_device *pdev)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int da903x_backlight_suspend(struct device *dev) static int da903x_backlight_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct backlight_device *bl = dev_get_drvdata(dev);
struct backlight_device *bl = platform_get_drvdata(pdev);
return da903x_backlight_set(bl, 0); return da903x_backlight_set(bl, 0);
} }
static int da903x_backlight_resume(struct device *dev) static int da903x_backlight_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct backlight_device *bl = dev_get_drvdata(dev);
struct backlight_device *bl = platform_get_drvdata(pdev);
backlight_update_status(bl); backlight_update_status(bl);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment