tree-wide: convert open calls to remove spaces to skip_spaces() lib function
[linux-2.6.git] / drivers / leds / ledtrig-timer.c
index 3d65313..38b3378 100644 (file)
@@ -83,7 +83,7 @@ static ssize_t led_delay_on_store(struct device *dev,
        unsigned long state = simple_strtoul(buf, &after, 10);
        size_t count = after - buf;
 
-       if (*after && isspace(*after))
+       if (isspace(*after))
                count++;
 
        if (count == size) {
@@ -127,7 +127,7 @@ static ssize_t led_delay_off_store(struct device *dev,
        unsigned long state = simple_strtoul(buf, &after, 10);
        size_t count = after - buf;
 
-       if (*after && isspace(*after))
+       if (isspace(*after))
                count++;
 
        if (count == size) {
@@ -166,7 +166,7 @@ static void timer_trig_activate(struct led_classdev *led_cdev)
 
        timer_data->brightness_on = led_get_brightness(led_cdev);
        if (timer_data->brightness_on == LED_OFF)
-               timer_data->brightness_on = LED_FULL;
+               timer_data->brightness_on = led_cdev->max_brightness;
        led_cdev->trigger_data = timer_data;
 
        init_timer(&timer_data->timer);