diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-02-21 19:43:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:24 -0500 |
commit | 47cf076b4407010573dee9eadc998ff9ecf8397c (patch) | |
tree | 2d0457b7a9a68fee2e4f60447713adc4808d8188 | |
parent | 5f42d5b27f7db19dbe9d587164e441008e66ef89 (diff) |
backlight: corgi_lcd: use lcd_get_data instead of dev_get_drvdata
Use the wrapper function for getting the driver data using lcd_device
instead of using dev_get_drvdata with &ld->dev, so we can directly pass a
struct lcd_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/video/backlight/corgi_lcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index 13ef511ae9a4..aa782f302983 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c | |||
@@ -337,7 +337,7 @@ static void corgi_lcd_power_off(struct corgi_lcd *lcd) | |||
337 | 337 | ||
338 | static int corgi_lcd_set_mode(struct lcd_device *ld, struct fb_videomode *m) | 338 | static int corgi_lcd_set_mode(struct lcd_device *ld, struct fb_videomode *m) |
339 | { | 339 | { |
340 | struct corgi_lcd *lcd = dev_get_drvdata(&ld->dev); | 340 | struct corgi_lcd *lcd = lcd_get_data(ld); |
341 | int mode = CORGI_LCD_MODE_QVGA; | 341 | int mode = CORGI_LCD_MODE_QVGA; |
342 | 342 | ||
343 | if (m->xres == 640 || m->xres == 480) | 343 | if (m->xres == 640 || m->xres == 480) |
@@ -364,7 +364,7 @@ static int corgi_lcd_set_mode(struct lcd_device *ld, struct fb_videomode *m) | |||
364 | 364 | ||
365 | static int corgi_lcd_set_power(struct lcd_device *ld, int power) | 365 | static int corgi_lcd_set_power(struct lcd_device *ld, int power) |
366 | { | 366 | { |
367 | struct corgi_lcd *lcd = dev_get_drvdata(&ld->dev); | 367 | struct corgi_lcd *lcd = lcd_get_data(ld); |
368 | 368 | ||
369 | if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power)) | 369 | if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power)) |
370 | corgi_lcd_power_on(lcd); | 370 | corgi_lcd_power_on(lcd); |
@@ -378,7 +378,7 @@ static int corgi_lcd_set_power(struct lcd_device *ld, int power) | |||
378 | 378 | ||
379 | static int corgi_lcd_get_power(struct lcd_device *ld) | 379 | static int corgi_lcd_get_power(struct lcd_device *ld) |
380 | { | 380 | { |
381 | struct corgi_lcd *lcd = dev_get_drvdata(&ld->dev); | 381 | struct corgi_lcd *lcd = lcd_get_data(ld); |
382 | 382 | ||
383 | return lcd->power; | 383 | return lcd->power; |
384 | } | 384 | } |