Skip to content

Commit

Permalink
backlight: da903x_bl: use dev_get_drvdata() instead of platform_get_d…
Browse files Browse the repository at this point in the history
…rvdata()

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Dec 18, 2012
1 parent 8f06ce3 commit f0f13cd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/video/backlight/da903x_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f0f13cd

Please sign in to comment.