diff options
Diffstat (limited to 'drivers/video/backlight/tosa_bl.c')
-rw-r--r-- | drivers/video/backlight/tosa_bl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c index e14ce4d469f5..f57bbf170049 100644 --- a/drivers/video/backlight/tosa_bl.c +++ b/drivers/video/backlight/tosa_bl.c | |||
@@ -80,6 +80,7 @@ static const struct backlight_ops bl_ops = { | |||
80 | static int __devinit tosa_bl_probe(struct i2c_client *client, | 80 | static int __devinit tosa_bl_probe(struct i2c_client *client, |
81 | const struct i2c_device_id *id) | 81 | const struct i2c_device_id *id) |
82 | { | 82 | { |
83 | struct backlight_properties props; | ||
83 | struct tosa_bl_data *data = kzalloc(sizeof(struct tosa_bl_data), GFP_KERNEL); | 84 | struct tosa_bl_data *data = kzalloc(sizeof(struct tosa_bl_data), GFP_KERNEL); |
84 | int ret = 0; | 85 | int ret = 0; |
85 | if (!data) | 86 | if (!data) |
@@ -99,15 +100,16 @@ static int __devinit tosa_bl_probe(struct i2c_client *client, | |||
99 | i2c_set_clientdata(client, data); | 100 | i2c_set_clientdata(client, data); |
100 | data->i2c = client; | 101 | data->i2c = client; |
101 | 102 | ||
102 | data->bl = backlight_device_register("tosa-bl", &client->dev, | 103 | memset(&props, 0, sizeof(struct backlight_properties)); |
103 | data, &bl_ops); | 104 | props.max_brightness = 512 - 1; |
105 | data->bl = backlight_device_register("tosa-bl", &client->dev, data, | ||
106 | &bl_ops, &props); | ||
104 | if (IS_ERR(data->bl)) { | 107 | if (IS_ERR(data->bl)) { |
105 | ret = PTR_ERR(data->bl); | 108 | ret = PTR_ERR(data->bl); |
106 | goto err_reg; | 109 | goto err_reg; |
107 | } | 110 | } |
108 | 111 | ||
109 | data->bl->props.brightness = 69; | 112 | data->bl->props.brightness = 69; |
110 | data->bl->props.max_brightness = 512 - 1; | ||
111 | data->bl->props.power = FB_BLANK_UNBLANK; | 113 | data->bl->props.power = FB_BLANK_UNBLANK; |
112 | 114 | ||
113 | backlight_update_status(data->bl); | 115 | backlight_update_status(data->bl); |