diff options
Diffstat (limited to 'drivers/video/backlight/adx_bl.c')
-rw-r--r-- | drivers/video/backlight/adx_bl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c index a683dd1be4bc..b0624b983889 100644 --- a/drivers/video/backlight/adx_bl.c +++ b/drivers/video/backlight/adx_bl.c | |||
@@ -70,6 +70,7 @@ static const struct backlight_ops adx_backlight_ops = { | |||
70 | 70 | ||
71 | static int __devinit adx_backlight_probe(struct platform_device *pdev) | 71 | static 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 | ||