summaryrefslogtreecommitdiffstats
path: root/include/linux/i2c
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2009-10-19 21:24:02 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2009-12-13 19:21:25 +0100
commit56baa667973e53d6d38af2ad3731d558566d818b (patch)
treecacc84313e48bb592adb76fe6f28e790e5ab942c /include/linux/i2c
parentb4ead61e570d7b7bcf20a5a1733dd0bc37236c99 (diff)
mfd: fix undefined twl4030-power resconfig value checks
The code tries to skip values initialized with -1, but since the values are unsigned the comparison is always true. The patch eliminates the following compiler warnings: drivers/mfd/twl4030-power.c: In function 'twl4030_configure_resource': drivers/mfd/twl4030-power.c:338: warning: comparison is always true due to limited range of data type drivers/mfd/twl4030-power.c:358: warning: comparison is always true due to limited range of data type drivers/mfd/twl4030-power.c:363: warning: comparison is always true due to limited range of data type Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/i2c')
-rw-r--r--include/linux/i2c/twl4030.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h
index e87cb270d8a..8a4a58ff8da 100644
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -400,6 +400,7 @@ struct twl4030_power_data {
struct twl4030_script **scripts;
unsigned num;
struct twl4030_resconfig *resource_config;
+#define TWL4030_RESCONFIG_UNDEF ((u8)-1)
};
extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts);