From: makarand.karvekar Date: Mon, 8 Nov 2010 23:11:03 +0000 (-0600) Subject: leds: cpcap: HACK: turn off led for brightness of 0 and 1. X-Git-Tag: firefly_0821_release~9834^2~310 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d791b66f35e963d6b50d9f6809198d94ddd5bb1c;p=firefly-linux-kernel-4.4.55.git leds: cpcap: HACK: turn off led for brightness of 0 and 1. brightness 0 triggers delay_on and delay_off device file removal. setting timer trigger creates new device files with root permissions. Avoid device file removal by treating brightness 1 as 0. Change-Id: Idfc2dd1c43e5962c173f8ed69f61e4b207c80cbb Signed-off-by: makarand.karvekar --- diff --git a/drivers/leds/leds-ld-cpcap.c b/drivers/leds/leds-ld-cpcap.c index 0c114f18c608..df0e697de019 100755 --- a/drivers/leds/leds-ld-cpcap.c +++ b/drivers/leds/leds-ld-cpcap.c @@ -84,7 +84,7 @@ static void cpcap_brightness_work(struct work_struct *work) brightness = cpcap_led_data->brightness; - if (brightness > 0) { + if (brightness > 1) { brightness = (cpcap_led_data->pdata->cpcap_reg_period | cpcap_led_data->pdata->cpcap_reg_duty_cycle | cpcap_led_data->pdata->cpcap_reg_current |