The patch titled leds-add-output-inversion-option-to-backlight-trigger-fix has been removed from the -mm tree. Its filename was leds-add-output-inversion-option-to-backlight-trigger-fix.patch This patch was dropped because it was folded into leds-add-output-inversion-option-to-backlight-trigger.patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: leds-add-output-inversion-option-to-backlight-trigger-fix From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> make output match input, tighten input checking Cc: Janusz Krzysztofik <jkrzyszt@xxxxxxxxxxxx> Cc: Paul Mundt <lethal@xxxxxxxxxxxx> Cc: Richard Purdie <richard.purdie@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/leds/ledtrig-backlight.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff -puN drivers/leds/ledtrig-backlight.c~leds-add-output-inversion-option-to-backlight-trigger-fix drivers/leds/ledtrig-backlight.c --- a/drivers/leds/ledtrig-backlight.c~leds-add-output-inversion-option-to-backlight-trigger-fix +++ a/drivers/leds/ledtrig-backlight.c @@ -65,7 +65,7 @@ static ssize_t bl_trig_invert_show(struc struct led_classdev *led = dev_get_drvdata(dev); struct bl_trig_notifier *n = led->trigger_data; - return sprintf(buf, "%s\n", n->invert ? "yes" : "no"); + return sprintf(buf, "%u\n", n->invert); } static ssize_t bl_trig_invert_store(struct device *dev, @@ -73,16 +73,17 @@ static ssize_t bl_trig_invert_store(stru { struct led_classdev *led = dev_get_drvdata(dev); struct bl_trig_notifier *n = led->trigger_data; - unsigned invert; + unsigned long invert; int ret; - ret = sscanf(buf, "%u", &invert); - if (ret < 1) { - dev_err(dev, "invalid value\n"); + ret = strict_strtoul(buf, 10, &invert); + if (ret < 0) + return ret; + + if (invert > 1) return -EINVAL; - } - n->invert = !!invert; + n->invert = invert; /* After inverting, we need to update the LED. */ if ((n->old_status == BLANK) ^ n->invert) _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are origin.patch leds-add-output-inversion-option-to-backlight-trigger.patch include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit.patch include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix.patch include-linux-unaligned-packed_structh-use-__packed.patch ihex-fix-unused-return-value-compiler-warning-fix.patch kptr_restrict-for-hiding-kernel-pointers-from-unprivileged-users.patch kptr_restrict-for-hiding-kernel-pointers-from-unprivileged-users-fix.patch kptr_restrict-for-hiding-kernel-pointers-v7-fix.patch fs-select-fix-information-leak-to-userspace-fix.patch gpio-ml_ioh_gpio-ml7213-gpio-driver-fix.patch drivers-telephony-ixjc-fix-warning.patch fs-proc-basec-kernel-latencytopc-convert-sprintf_symbol-to-%ps-checkpatch-fixes.patch sysctl-remove-obsolete-comments-fix.patch user_ns-improve-the-user_ns-on-the-slab-packaging-fix.patch pps-add-parallel-port-pps-signal-generator-fix.patch memstick-factor-out-transfer-initiating-functionality-in-mspro_blockc-fix.patch scatterlist-new-helper-functions-fix.patch aio-remove-unused-aio_run_iocbs-checkpatch-fixes.patch cramfs-generate-unique-inode-number-for-better-inode-cache-usage-fix.patch cramfs-generate-unique-inode-number-for-better-inode-cache-usage-checkpatch-fixes.patch ramoops-fix-types-remove-typecasts.patch fs-ext4-inodec-use-pr_warn_ratelimited.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