[PATCH] Fix the start condition of comparing setup mode in lp5521 device.

Matt Hsu matt_hsu at openmoko.org
Tue Mar 10 09:22:48 CET 2009


Signed-off-by: Matt Hsu <matt_hsu at openmoko.org>
---
 drivers/leds/leds-lp5521.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 0415b9e..e5071b1 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -144,7 +144,7 @@ static ssize_t set_mode(struct device *dev, struct device_attribute *attr,
 
 	mask = (0x3 << (id * 2));
 
-	for (i = LP5521_REG_OP_MODE; i <= LP5521_MODE_DIRECT; i++) {
+	for (i = LP5521_MODE_DISABLE; i <= LP5521_MODE_DIRECT; i++) {
 		if (!strncmp(buf, lp5521_ch_mode[i], strlen(lp5521_ch_mode[i]))) {
 			reg_set_bit_mask(lp,
 				LP5521_REG_OP_MODE, mask, (i << (id * 2)));
-- 
1.5.6.5




More information about the openmoko-kernel mailing list