[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1247591015-2428-3-git-send-email-cascardo@holoscopio.com>
Date: Tue, 14 Jul 2009 14:03:35 -0300
From: Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
To: me@...ipe.balbi.com
Cc: linux-kernel@...r.kernel.org, rpurdie@...ux.intel.com,
rpurdie@...ys.net, srcvale@...oscopio.com,
Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
Subject: [PATCH 3/3] After setting inverted attribute, we must update the LED.
If we change the inverted attribute to another value, the LED will not
be inverted until we change the GPIO state.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
---
drivers/leds/ledtrig-gpio.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/leds/ledtrig-gpio.c b/drivers/leds/ledtrig-gpio.c
index 7c9aff9..1136f50 100644
--- a/drivers/leds/ledtrig-gpio.c
+++ b/drivers/leds/ledtrig-gpio.c
@@ -117,6 +117,9 @@ static ssize_t gpio_trig_inverted_store(struct device *dev,
gpio_data->inverted = !!inverted;
+ /* After inverting, we need to update the LED. */
+ schedule_work(&gpio_data->work);
+
return n;
}
static DEVICE_ATTR(inverted, 0644, gpio_trig_inverted_show,
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists