[PATCH] mfd: Fix test of unsigned in twl4030_configure_resource()

From: Roel Kluin
Date: Wed Dec 16 2009 - 08:40:13 EST


devgroup is unsigned so the test did not work.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
Found using coccinelle: http://coccinelle.lip6.fr/

see
vi arch/arm/mach-omap2/board-rx51-peripherals.c +512

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index d423e0c..f207e28 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -335,7 +335,7 @@ static int __init twl4030_configure_resource(struct twl4030_resconfig *rconfig)
return err;
}

- if (rconfig->devgroup >= 0) {
+ if (rconfig->devgroup != -1) {
grp &= ~DEVGROUP_MASK;
grp |= rconfig->devgroup << DEVGROUP_SHIFT;
err = twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/