tizen: Use unique directory prefix for baselibs packages
[platform/kernel/linux-rpi.git] / drivers / leds / leds-pwm.c
index 29194cc..2b3bf13 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
 #include <linux/leds.h>
 #include <linux/err.h>
 #include <linux/pwm.h>
@@ -53,7 +53,7 @@ static int led_pwm_set(struct led_classdev *led_cdev,
                duty = led_dat->pwmstate.period - duty;
 
        led_dat->pwmstate.duty_cycle = duty;
-       led_dat->pwmstate.enabled = duty > 0;
+       led_dat->pwmstate.enabled = true;
        return pwm_apply_state(led_dat->pwm, &led_dat->pwmstate);
 }
 
@@ -146,7 +146,7 @@ static int led_pwm_create_fwnode(struct device *dev, struct led_pwm_priv *priv)
                        led.name = to_of_node(fwnode)->name;
 
                if (!led.name) {
-                       ret = EINVAL;
+                       ret = -EINVAL;
                        goto err_child_out;
                }