Merge tag 'clk-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/clk...
[deliverable/linux.git] / drivers / leds / led-class-flash.c
index 3b2573411a379f8b26aa10bc968d3930dfa56e5f..cf398275a53cbc48ecbf3f49ec9017b26da27dbf 100644 (file)
@@ -108,7 +108,7 @@ static ssize_t flash_strobe_store(struct device *dev,
        if (ret)
                goto unlock;
 
-       if (state < 0 || state > 1) {
+       if (state > 1) {
                ret = -EINVAL;
                goto unlock;
        }
@@ -298,7 +298,7 @@ int led_classdev_flash_register(struct device *parent,
        led_cdev = &fled_cdev->led_cdev;
 
        if (led_cdev->flags & LED_DEV_CAP_FLASH) {
-               if (!led_cdev->brightness_set_sync)
+               if (!led_cdev->brightness_set_blocking)
                        return -EINVAL;
 
                ops = fled_cdev->ops;
@@ -316,10 +316,6 @@ int led_classdev_flash_register(struct device *parent,
        if (ret < 0)
                return ret;
 
-       /* Setting a torch brightness needs to have immediate effect */
-       led_cdev->flags &= ~SET_BRIGHTNESS_ASYNC;
-       led_cdev->flags |= SET_BRIGHTNESS_SYNC;
-
        return 0;
 }
 EXPORT_SYMBOL_GPL(led_classdev_flash_register);
This page took 0.02501 seconds and 5 git commands to generate.