diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 16:07:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 16:07:32 -0700 |
commit | ea541686d8454efac4f2b5c0767affb12d4b6a52 (patch) | |
tree | ef0812fcc3e07c067042add6388146b3485c793e /drivers/leds/ledtrig-timer.c | |
parent | 0d876c6a96e2cabf8632e8066b617d9c2dec9518 (diff) | |
parent | 601a1b92ed3ce0025f7bec6fc591cceaef8d9d69 (diff) | |
download | linux-3.10-ea541686d8454efac4f2b5c0767affb12d4b6a52.tar.gz linux-3.10-ea541686d8454efac4f2b5c0767affb12d4b6a52.tar.bz2 linux-3.10-ea541686d8454efac4f2b5c0767affb12d4b6a52.zip |
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
leds/acpi: Fix merge fallout from acpi_driver_data change
leds: Simplify logic in leds-ams-delta
leds: Fix trigger registration race
leds: Fix leds-class.c comment
leds: Add driver for HP harddisk protection LEDs
leds: leds-pca955x - Mark pca955x_led_set() static
leds: Remove uneeded leds-cm-x270 driver
leds: Remove uneeded strlen calls
leds: Add leds-wrap default-trigger
leds: Make default trigger fields const
leds: Add backlight LED trigger
leds: da903x: Add support for LEDs found on DA9030/DA9034
Diffstat (limited to 'drivers/leds/ledtrig-timer.c')
-rw-r--r-- | drivers/leds/ledtrig-timer.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c index 5c99f4f0c69..db681962d7b 100644 --- a/drivers/leds/ledtrig-timer.c +++ b/drivers/leds/ledtrig-timer.c @@ -70,9 +70,7 @@ static ssize_t led_delay_on_show(struct device *dev, struct led_classdev *led_cdev = dev_get_drvdata(dev); struct timer_trig_data *timer_data = led_cdev->trigger_data; - sprintf(buf, "%lu\n", timer_data->delay_on); - - return strlen(buf) + 1; + return sprintf(buf, "%lu\n", timer_data->delay_on); } static ssize_t led_delay_on_store(struct device *dev, @@ -116,9 +114,7 @@ static ssize_t led_delay_off_show(struct device *dev, struct led_classdev *led_cdev = dev_get_drvdata(dev); struct timer_trig_data *timer_data = led_cdev->trigger_data; - sprintf(buf, "%lu\n", timer_data->delay_off); - - return strlen(buf) + 1; + return sprintf(buf, "%lu\n", timer_data->delay_off); } static ssize_t led_delay_off_store(struct device *dev, |