diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-02-21 19:43:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:24 -0500 |
commit | e6e3dbf95cb1d434d26acf3f0197c279ba052df4 (patch) | |
tree | f360a3f440d5a042e96c7e707c806ab19db131da | |
parent | 76cb259819049a932500dea3e6b25b8bc64838f6 (diff) |
pwm_backlight: use bl_get_data instead of dev_get_drvdata
Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 069983ca49ff..f2f4c43d6e22 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c | |||
@@ -37,7 +37,7 @@ struct pwm_bl_data { | |||
37 | 37 | ||
38 | static int pwm_backlight_update_status(struct backlight_device *bl) | 38 | static int pwm_backlight_update_status(struct backlight_device *bl) |
39 | { | 39 | { |
40 | struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev); | 40 | struct pwm_bl_data *pb = bl_get_data(bl); |
41 | int brightness = bl->props.brightness; | 41 | int brightness = bl->props.brightness; |
42 | int max = bl->props.max_brightness; | 42 | int max = bl->props.max_brightness; |
43 | 43 | ||
@@ -83,7 +83,7 @@ static int pwm_backlight_get_brightness(struct backlight_device *bl) | |||
83 | static int pwm_backlight_check_fb(struct backlight_device *bl, | 83 | static int pwm_backlight_check_fb(struct backlight_device *bl, |
84 | struct fb_info *info) | 84 | struct fb_info *info) |
85 | { | 85 | { |
86 | struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev); | 86 | struct pwm_bl_data *pb = bl_get_data(bl); |
87 | 87 | ||
88 | return !pb->check_fb || pb->check_fb(pb->dev, info); | 88 | return !pb->check_fb || pb->check_fb(pb->dev, info); |
89 | } | 89 | } |
@@ -264,7 +264,7 @@ err_alloc: | |||
264 | static int pwm_backlight_remove(struct platform_device *pdev) | 264 | static int pwm_backlight_remove(struct platform_device *pdev) |
265 | { | 265 | { |
266 | struct backlight_device *bl = platform_get_drvdata(pdev); | 266 | struct backlight_device *bl = platform_get_drvdata(pdev); |
267 | struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev); | 267 | struct pwm_bl_data *pb = bl_get_data(bl); |
268 | 268 | ||
269 | backlight_device_unregister(bl); | 269 | backlight_device_unregister(bl); |
270 | pwm_config(pb->pwm, 0, pb->period); | 270 | pwm_config(pb->pwm, 0, pb->period); |
@@ -278,7 +278,7 @@ static int pwm_backlight_remove(struct platform_device *pdev) | |||
278 | static int pwm_backlight_suspend(struct device *dev) | 278 | static int pwm_backlight_suspend(struct device *dev) |
279 | { | 279 | { |
280 | struct backlight_device *bl = dev_get_drvdata(dev); | 280 | struct backlight_device *bl = dev_get_drvdata(dev); |
281 | struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev); | 281 | struct pwm_bl_data *pb = bl_get_data(bl); |
282 | 282 | ||
283 | if (pb->notify) | 283 | if (pb->notify) |
284 | pb->notify(pb->dev, 0); | 284 | pb->notify(pb->dev, 0); |