diff options
Diffstat (limited to 'drivers/video/backlight/max8925_bl.c')
-rw-r--r-- | drivers/video/backlight/max8925_bl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c index c267069a52a3..c91adaf492cf 100644 --- a/drivers/video/backlight/max8925_bl.c +++ b/drivers/video/backlight/max8925_bl.c | |||
@@ -104,6 +104,7 @@ static int __devinit max8925_backlight_probe(struct platform_device *pdev) | |||
104 | struct max8925_backlight_pdata *pdata = NULL; | 104 | struct max8925_backlight_pdata *pdata = NULL; |
105 | struct max8925_backlight_data *data; | 105 | struct max8925_backlight_data *data; |
106 | struct backlight_device *bl; | 106 | struct backlight_device *bl; |
107 | struct backlight_properties props; | ||
107 | struct resource *res; | 108 | struct resource *res; |
108 | char name[MAX8925_NAME_SIZE]; | 109 | char name[MAX8925_NAME_SIZE]; |
109 | unsigned char value; | 110 | unsigned char value; |
@@ -133,14 +134,15 @@ static int __devinit max8925_backlight_probe(struct platform_device *pdev) | |||
133 | data->chip = chip; | 134 | data->chip = chip; |
134 | data->current_brightness = 0; | 135 | data->current_brightness = 0; |
135 | 136 | ||
137 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
138 | props.max_brightness = MAX_BRIGHTNESS; | ||
136 | bl = backlight_device_register(name, &pdev->dev, data, | 139 | bl = backlight_device_register(name, &pdev->dev, data, |
137 | &max8925_backlight_ops); | 140 | &max8925_backlight_ops, &props); |
138 | if (IS_ERR(bl)) { | 141 | if (IS_ERR(bl)) { |
139 | dev_err(&pdev->dev, "failed to register backlight\n"); | 142 | dev_err(&pdev->dev, "failed to register backlight\n"); |
140 | kfree(data); | 143 | kfree(data); |
141 | return PTR_ERR(bl); | 144 | return PTR_ERR(bl); |
142 | } | 145 | } |
143 | bl->props.max_brightness = MAX_BRIGHTNESS; | ||
144 | bl->props.brightness = MAX_BRIGHTNESS; | 146 | bl->props.brightness = MAX_BRIGHTNESS; |
145 | 147 | ||
146 | platform_set_drvdata(pdev, bl); | 148 | platform_set_drvdata(pdev, bl); |