The patch titled drivers/leds/ledtrig-gpio.c: make output match input, tighten input checking has been removed from the -mm tree. Its filename was drivers-leds-ledtrig-gpioc-make-output-match-input-tighten-input-checking.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drivers/leds/ledtrig-gpio.c: make output match input, tighten input checking From: Janusz Krzysztofik <jkrzyszt@xxxxxxxxxxxx> Replicate changes made to drivers/leds/ledtrig-backlight.c. Cc: Paul Mundt <lethal@xxxxxxxxxxxx> Cc: Richard Purdie <richard.purdie@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/leds/ledtrig-gpio.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff -puN drivers/leds/ledtrig-gpio.c~drivers-leds-ledtrig-gpioc-make-output-match-input-tighten-input-checking drivers/leds/ledtrig-gpio.c --- a/drivers/leds/ledtrig-gpio.c~drivers-leds-ledtrig-gpioc-make-output-match-input-tighten-input-checking +++ a/drivers/leds/ledtrig-gpio.c @@ -99,7 +99,7 @@ static ssize_t gpio_trig_inverted_show(s struct led_classdev *led = dev_get_drvdata(dev); struct gpio_trig_data *gpio_data = led->trigger_data; - return sprintf(buf, "%s\n", gpio_data->inverted ? "yes" : "no"); + return sprintf(buf, "%u\n", gpio_data->inverted); } static ssize_t gpio_trig_inverted_store(struct device *dev, @@ -107,16 +107,17 @@ static ssize_t gpio_trig_inverted_store( { struct led_classdev *led = dev_get_drvdata(dev); struct gpio_trig_data *gpio_data = led->trigger_data; - unsigned inverted; + unsigned long inverted; int ret; - ret = sscanf(buf, "%u", &inverted); - if (ret < 1) { - dev_err(dev, "invalid value\n"); + ret = strict_strtoul(buf, 10, &inverted); + if (ret < 0) + return ret; + + if (inverted > 1) return -EINVAL; - } - gpio_data->inverted = !!inverted; + gpio_data->inverted = inverted; /* After inverting, we need to update the LED. */ schedule_work(&gpio_data->work); _ Patches currently in -mm which might be from jkrzyszt@xxxxxxxxxxxx are origin.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html