Commit d6c7e113 authored by Daniel Mack's avatar Daniel Mack Committed by Mark Brown

regulator: max8660: fix build warnings

Fix a build warning for !CONFIG_OF and a cast from void* to
unsigned int which is invalid on 64bit machines.
Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent abe4c51a
...@@ -364,7 +364,7 @@ static int max8660_pdata_from_dt(struct device *dev, ...@@ -364,7 +364,7 @@ static int max8660_pdata_from_dt(struct device *dev,
#else #else
static inline int max8660_pdata_from_dt(struct device *dev, static inline int max8660_pdata_from_dt(struct device *dev,
struct device_node **of_node, struct device_node **of_node,
struct max8660_platform_data **pdata) struct max8660_platform_data *pdata)
{ {
return 0; return 0;
} }
...@@ -380,7 +380,7 @@ static int max8660_probe(struct i2c_client *client, ...@@ -380,7 +380,7 @@ static int max8660_probe(struct i2c_client *client,
struct max8660 *max8660; struct max8660 *max8660;
int boot_on, i, id, ret = -EINVAL; int boot_on, i, id, ret = -EINVAL;
struct device_node *of_node[MAX8660_V_END]; struct device_node *of_node[MAX8660_V_END];
unsigned int type; unsigned long type;
if (dev->of_node && !pdata) { if (dev->of_node && !pdata) {
const struct of_device_id *id; const struct of_device_id *id;
...@@ -395,7 +395,7 @@ static int max8660_probe(struct i2c_client *client, ...@@ -395,7 +395,7 @@ static int max8660_probe(struct i2c_client *client,
return ret; return ret;
pdata = &pdata_of; pdata = &pdata_of;
type = (unsigned int) id->data; type = (unsigned long) id->data;
} else { } else {
type = i2c_id->driver_data; type = i2c_id->driver_data;
memset(of_node, 0, sizeof(of_node)); memset(of_node, 0, sizeof(of_node));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment