diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/aat2870_bl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/aat2870_bl.c b/drivers/video/backlight/aat2870_bl.c index f13a3f7e2e8..331f1ef1dad 100644 --- a/drivers/video/backlight/aat2870_bl.c +++ b/drivers/video/backlight/aat2870_bl.c | |||
@@ -44,7 +44,7 @@ static inline int aat2870_brightness(struct aat2870_bl_driver_data *aat2870_bl, | |||
44 | struct backlight_device *bd = aat2870_bl->bd; | 44 | struct backlight_device *bd = aat2870_bl->bd; |
45 | int val; | 45 | int val; |
46 | 46 | ||
47 | val = brightness * aat2870_bl->max_current; | 47 | val = brightness * (aat2870_bl->max_current - 1); |
48 | val /= bd->props.max_brightness; | 48 | val /= bd->props.max_brightness; |
49 | 49 | ||
50 | return val; | 50 | return val; |
@@ -175,7 +175,7 @@ static int aat2870_bl_probe(struct platform_device *pdev) | |||
175 | else | 175 | else |
176 | aat2870_bl->channels = AAT2870_BL_CH_ALL; | 176 | aat2870_bl->channels = AAT2870_BL_CH_ALL; |
177 | 177 | ||
178 | if (pdata->max_brightness > 0) | 178 | if (pdata->max_current > 0) |
179 | aat2870_bl->max_current = pdata->max_current; | 179 | aat2870_bl->max_current = pdata->max_current; |
180 | else | 180 | else |
181 | aat2870_bl->max_current = AAT2870_CURRENT_27_9; | 181 | aat2870_bl->max_current = AAT2870_CURRENT_27_9; |