Skip to content

Commit

Permalink
regulator: max8660: fix build warnings
Browse files Browse the repository at this point in the history
Fix a build warning for !CONFIG_OF and a cast from void* to
unsigned int which is invalid on 64bit machines.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Daniel Mack authored and Mark Brown committed Aug 8, 2013
1 parent abe4c51 commit d6c7e11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/regulator/max8660.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ static int max8660_pdata_from_dt(struct device *dev,
#else
static inline int max8660_pdata_from_dt(struct device *dev,
struct device_node **of_node,
struct max8660_platform_data **pdata)
struct max8660_platform_data *pdata)
{
return 0;
}
Expand All @@ -380,7 +380,7 @@ static int max8660_probe(struct i2c_client *client,
struct max8660 *max8660;
int boot_on, i, id, ret = -EINVAL;
struct device_node *of_node[MAX8660_V_END];
unsigned int type;
unsigned long type;

if (dev->of_node && !pdata) {
const struct of_device_id *id;
Expand All @@ -395,7 +395,7 @@ static int max8660_probe(struct i2c_client *client,
return ret;

pdata = &pdata_of;
type = (unsigned int) id->data;
type = (unsigned long) id->data;
} else {
type = i2c_id->driver_data;
memset(of_node, 0, sizeof(of_node));
Expand Down

0 comments on commit d6c7e11

Please sign in to comment.