htcleo: fixed small BL settings for no sense builds and autobl rights

This commit is contained in:
Markinus 2010-11-04 18:49:09 +01:00
parent e7a2876f71
commit 76df0ff485

View File

@ -85,7 +85,7 @@ static ssize_t htcleo_auto_bl_set(struct device *dev,
}
static DEVICE_ATTR(auto_bl, 0644, htcleo_auto_bl_get, htcleo_auto_bl_set);
static DEVICE_ATTR(auto_bl, 0666, htcleo_auto_bl_get, htcleo_auto_bl_set);
static int htcleo_brightness_onoff_bkl(int enable)
{
@ -131,14 +131,14 @@ static void htcleo_brightness_set(struct led_classdev *led_cdev, enum led_bright
LCMDBG("htcleo_brightness_set: %d\n", val);
if (val > 255) val = 255;
led_cdev->brightness = val;
if (val < 30)
if (val < 1)
{
htcleo_brightness_onoff_bkl(0);
}
else
{
htcleo_brightness_onoff_bkl(1);
htcleo_brightness_set_bkl((val - 30) / 23);
htcleo_brightness_set_bkl((val - 1) / 23);
}
mutex_unlock(&htcleo_backlight_lock);
}