diff options
author | Lee Jones <lee.jones@linaro.org> | 2014-01-23 09:35:28 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-02-19 08:30:23 -0500 |
commit | 05fb7a56ad65ceaa1907bb9c66bfa1108847667f (patch) | |
tree | d0d19b7006cf50a06cefc6b267a29bf405a780e5 | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
mfd: max8997: Naturalise cross-architecture discrepancies
If we compile the MAX8997 for a 64bit architecture we receive the following
warnings:
drivers/mfd/max8997.c: In function ‘max8997_i2c_get_driver_data’:
drivers/mfd/max8997.c:173:10:
warning: cast from pointer to integer of different size
return (int)match->data;
^
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/max8997.c | 6 | ||||
-rw-r--r-- | include/linux/mfd/max8997-private.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index be88a3bf7b85..5adede0fb04c 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c | |||
@@ -164,15 +164,15 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata( | |||
164 | return pd; | 164 | return pd; |
165 | } | 165 | } |
166 | 166 | ||
167 | static inline int max8997_i2c_get_driver_data(struct i2c_client *i2c, | 167 | static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c, |
168 | const struct i2c_device_id *id) | 168 | const struct i2c_device_id *id) |
169 | { | 169 | { |
170 | if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { | 170 | if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { |
171 | const struct of_device_id *match; | 171 | const struct of_device_id *match; |
172 | match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node); | 172 | match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node); |
173 | return (int)match->data; | 173 | return (unsigned long)match->data; |
174 | } | 174 | } |
175 | return (int)id->driver_data; | 175 | return id->driver_data; |
176 | } | 176 | } |
177 | 177 | ||
178 | static int max8997_i2c_probe(struct i2c_client *i2c, | 178 | static int max8997_i2c_probe(struct i2c_client *i2c, |
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index ad1ae7f345ad..78c76cd4d37b 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h | |||
@@ -387,7 +387,7 @@ struct max8997_dev { | |||
387 | struct i2c_client *muic; /* slave addr 0x4a */ | 387 | struct i2c_client *muic; /* slave addr 0x4a */ |
388 | struct mutex iolock; | 388 | struct mutex iolock; |
389 | 389 | ||
390 | int type; | 390 | unsigned long type; |
391 | struct platform_device *battery; /* battery control (not fuel gauge) */ | 391 | struct platform_device *battery; /* battery control (not fuel gauge) */ |
392 | 392 | ||
393 | int irq; | 393 | int irq; |