diff options
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/hp680_bl.c | 2 | ||||
-rw-r--r-- | drivers/video/backlight/platform_lcd.c | 4 | ||||
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 10 |
3 files changed, 12 insertions, 4 deletions
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c index fbea2bd129c7..6fa0b9d5559a 100644 --- a/drivers/video/backlight/hp680_bl.c +++ b/drivers/video/backlight/hp680_bl.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
19 | #include <linux/backlight.h> | 19 | #include <linux/backlight.h> |
20 | 20 | ||
21 | #include <asm/cpu/dac.h> | 21 | #include <cpu/dac.h> |
22 | #include <asm/hp6xx.h> | 22 | #include <asm/hp6xx.h> |
23 | #include <asm/hd64461.h> | 23 | #include <asm/hd64461.h> |
24 | 24 | ||
diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index 72d44dbfce82..738694d23889 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c | |||
@@ -92,7 +92,7 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev) | |||
92 | 92 | ||
93 | plcd->us = dev; | 93 | plcd->us = dev; |
94 | plcd->pdata = pdata; | 94 | plcd->pdata = pdata; |
95 | plcd->lcd = lcd_device_register("platform-lcd", dev, | 95 | plcd->lcd = lcd_device_register(dev_name(dev), dev, |
96 | plcd, &platform_lcd_ops); | 96 | plcd, &platform_lcd_ops); |
97 | if (IS_ERR(plcd->lcd)) { | 97 | if (IS_ERR(plcd->lcd)) { |
98 | dev_err(dev, "cannot register lcd device\n"); | 98 | dev_err(dev, "cannot register lcd device\n"); |
@@ -101,6 +101,8 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev) | |||
101 | } | 101 | } |
102 | 102 | ||
103 | platform_set_drvdata(pdev, plcd); | 103 | platform_set_drvdata(pdev, plcd); |
104 | platform_lcd_set_power(plcd->lcd, FB_BLANK_NORMAL); | ||
105 | |||
104 | return 0; | 106 | return 0; |
105 | 107 | ||
106 | err_mem: | 108 | err_mem: |
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 6338d0e2fe07..ea07258565f0 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c | |||
@@ -68,8 +68,10 @@ static int pwm_backlight_probe(struct platform_device *pdev) | |||
68 | struct pwm_bl_data *pb; | 68 | struct pwm_bl_data *pb; |
69 | int ret; | 69 | int ret; |
70 | 70 | ||
71 | if (!data) | 71 | if (!data) { |
72 | dev_err(&pdev->dev, "failed to find platform data\n"); | ||
72 | return -EINVAL; | 73 | return -EINVAL; |
74 | } | ||
73 | 75 | ||
74 | if (data->init) { | 76 | if (data->init) { |
75 | ret = data->init(&pdev->dev); | 77 | ret = data->init(&pdev->dev); |
@@ -79,6 +81,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) | |||
79 | 81 | ||
80 | pb = kzalloc(sizeof(*pb), GFP_KERNEL); | 82 | pb = kzalloc(sizeof(*pb), GFP_KERNEL); |
81 | if (!pb) { | 83 | if (!pb) { |
84 | dev_err(&pdev->dev, "no memory for state\n"); | ||
82 | ret = -ENOMEM; | 85 | ret = -ENOMEM; |
83 | goto err_alloc; | 86 | goto err_alloc; |
84 | } | 87 | } |
@@ -91,7 +94,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) | |||
91 | dev_err(&pdev->dev, "unable to request PWM for backlight\n"); | 94 | dev_err(&pdev->dev, "unable to request PWM for backlight\n"); |
92 | ret = PTR_ERR(pb->pwm); | 95 | ret = PTR_ERR(pb->pwm); |
93 | goto err_pwm; | 96 | goto err_pwm; |
94 | } | 97 | } else |
98 | dev_dbg(&pdev->dev, "got pwm for backlight\n"); | ||
95 | 99 | ||
96 | bl = backlight_device_register(pdev->name, &pdev->dev, | 100 | bl = backlight_device_register(pdev->name, &pdev->dev, |
97 | pb, &pwm_backlight_ops); | 101 | pb, &pwm_backlight_ops); |
@@ -183,3 +187,5 @@ module_exit(pwm_backlight_exit); | |||
183 | 187 | ||
184 | MODULE_DESCRIPTION("PWM based Backlight Driver"); | 188 | MODULE_DESCRIPTION("PWM based Backlight Driver"); |
185 | MODULE_LICENSE("GPL"); | 189 | MODULE_LICENSE("GPL"); |
190 | MODULE_ALIAS("platform:pwm-backlight"); | ||
191 | |||