X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=drivers%2Fleds%2Fleds-lp3944.c;h=be60c181222a562f564eb839d470e85ae932f9d9;hb=3513ac743df4a8522270bde4a20d75a42874487e;hp=6c758aea1bbdaa1fb77edf71e9c611e4e131ee0e;hpb=7ff60f58e244a4f74589f5c5af1a1f5d4db227c3;p=deliverable%2Flinux.git diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c index 6c758aea1bbd..be60c181222a 100644 --- a/drivers/leds/leds-lp3944.c +++ b/drivers/leds/leds-lp3944.c @@ -199,8 +199,11 @@ static int lp3944_led_set(struct lp3944_led_data *led, u8 status) if (status > LP3944_LED_STATUS_DIM1) return -EINVAL; - /* invert only 0 and 1, leave unchanged the other values, - * remember we are abusing status to set blink patterns + /* + * Invert status only when it's < 2 (i.e. 0 or 1) which means it's + * controlling the on/off state directly. + * When, instead, status is >= 2 don't invert it because it would mean + * to mess with the hardware blinking mode. */ if (led->type == LP3944_LED_TYPE_LED_INVERTED && status < 2) status = 1 - status;