aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/adp8860_bl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 3c449d2f68b9..99d14ed88571 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -16,6 +16,7 @@
16#include <linux/fb.h> 16#include <linux/fb.h>
17#include <linux/backlight.h> 17#include <linux/backlight.h>
18#include <linux/leds.h> 18#include <linux/leds.h>
19#include <linux/slab.h>
19#include <linux/workqueue.h> 20#include <linux/workqueue.h>
20 21
21#include <linux/i2c/adp8860.h> 22#include <linux/i2c/adp8860.h>
@@ -647,6 +648,7 @@ static int __devinit adp8860_probe(struct i2c_client *client,
647 struct adp8860_bl *data; 648 struct adp8860_bl *data;
648 struct adp8860_backlight_platform_data *pdata = 649 struct adp8860_backlight_platform_data *pdata =
649 client->dev.platform_data; 650 client->dev.platform_data;
651 struct backlight_properties props;
650 uint8_t reg_val; 652 uint8_t reg_val;
651 int ret; 653 int ret;
652 654
@@ -683,10 +685,13 @@ static int __devinit adp8860_probe(struct i2c_client *client,
683 data->current_brightness = 0; 685 data->current_brightness = 0;
684 i2c_set_clientdata(client, data); 686 i2c_set_clientdata(client, data);
685 687
688 memset(&props, 0, sizeof(props));
689 props.max_brightness = ADP8860_MAX_BRIGHTNESS;
690
686 mutex_init(&data->lock); 691 mutex_init(&data->lock);
687 692
688 bl = backlight_device_register(dev_driver_string(&client->dev), 693 bl = backlight_device_register(dev_driver_string(&client->dev),
689 &client->dev, data, &adp8860_bl_ops); 694 &client->dev, data, &adp8860_bl_ops, &props);
690 if (IS_ERR(bl)) { 695 if (IS_ERR(bl)) {
691 dev_err(&client->dev, "failed to register backlight\n"); 696 dev_err(&client->dev, "failed to register backlight\n");
692 ret = PTR_ERR(bl); 697 ret = PTR_ERR(bl);