aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/adx_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/adx_bl.c')
-rw-r--r--drivers/video/backlight/adx_bl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c
index d769b0bab21a..b0624b983889 100644
--- a/drivers/video/backlight/adx_bl.c
+++ b/drivers/video/backlight/adx_bl.c
@@ -56,7 +56,7 @@ static int adx_backlight_get_brightness(struct backlight_device *bldev)
56 return brightness & 0xff; 56 return brightness & 0xff;
57} 57}
58 58
59static int adx_backlight_check_fb(struct fb_info *fb) 59static int adx_backlight_check_fb(struct backlight_device *bldev, struct fb_info *fb)
60{ 60{
61 return 1; 61 return 1;
62} 62}
@@ -70,6 +70,7 @@ static const struct backlight_ops adx_backlight_ops = {
70 70
71static int __devinit adx_backlight_probe(struct platform_device *pdev) 71static int __devinit adx_backlight_probe(struct platform_device *pdev)
72{ 72{
73 struct backlight_properties props;
73 struct backlight_device *bldev; 74 struct backlight_device *bldev;
74 struct resource *res; 75 struct resource *res;
75 struct adxbl *bl; 76 struct adxbl *bl;
@@ -101,14 +102,15 @@ static int __devinit adx_backlight_probe(struct platform_device *pdev)
101 goto out; 102 goto out;
102 } 103 }
103 104
104 bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, bl, 105 memset(&props, 0, sizeof(struct backlight_properties));
105 &adx_backlight_ops); 106 props.max_brightness = 0xff;
107 bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev,
108 bl, &adx_backlight_ops, &props);
106 if (!bldev) { 109 if (!bldev) {
107 ret = -ENOMEM; 110 ret = -ENOMEM;
108 goto out; 111 goto out;
109 } 112 }
110 113
111 bldev->props.max_brightness = 0xff;
112 bldev->props.brightness = 0xff; 114 bldev->props.brightness = 0xff;
113 bldev->props.power = FB_BLANK_UNBLANK; 115 bldev->props.power = FB_BLANK_UNBLANK;
114 116