diff options
Diffstat (limited to 'drivers/video/backlight/tosa_bl.c')
| -rw-r--r-- | drivers/video/backlight/tosa_bl.c | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c index e14ce4d469f..e03e60bbfd8 100644 --- a/drivers/video/backlight/tosa_bl.c +++ b/drivers/video/backlight/tosa_bl.c @@ -18,6 +18,7 @@  #include <linux/gpio.h>  #include <linux/fb.h>  #include <linux/backlight.h> +#include <linux/slab.h>  #include <asm/mach/sharpsl_param.h> @@ -80,6 +81,7 @@ static const struct backlight_ops bl_ops = {  static int __devinit tosa_bl_probe(struct i2c_client *client,  		const struct i2c_device_id *id)  { +	struct backlight_properties props;  	struct tosa_bl_data *data = kzalloc(sizeof(struct tosa_bl_data), GFP_KERNEL);  	int ret = 0;  	if (!data) @@ -99,15 +101,16 @@ static int __devinit tosa_bl_probe(struct i2c_client *client,  	i2c_set_clientdata(client, data);  	data->i2c = client; -	data->bl = backlight_device_register("tosa-bl", &client->dev, -			data, &bl_ops); +	memset(&props, 0, sizeof(struct backlight_properties)); +	props.max_brightness = 512 - 1; +	data->bl = backlight_device_register("tosa-bl", &client->dev, data, +					     &bl_ops, &props);  	if (IS_ERR(data->bl)) {  		ret = PTR_ERR(data->bl);  		goto err_reg;  	}  	data->bl->props.brightness = 69; -	data->bl->props.max_brightness = 512 - 1;  	data->bl->props.power = FB_BLANK_UNBLANK;  	backlight_update_status(data->bl);  |