Skip to content

Commit

Permalink
mfd: tps65217: Naturalise cross-architecture discrepancies
Browse files Browse the repository at this point in the history
If we compile the TPS65217 for a 64bit architecture we receive the following
warnings:

drivers/mfd/tps65217.c: In function ‘tps65217_probe’:
drivers/mfd/tps65217.c:173:13:
  warning: cast from pointer to integer of different size
   chip_id = (unsigned int)match->data;
             ^

Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Lee Jones committed Feb 19, 2014
1 parent 7f8279c commit 5c6fbd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/mfd/tps65217.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static int tps65217_probe(struct i2c_client *client,
{
struct tps65217 *tps;
unsigned int version;
unsigned int chip_id = ids->driver_data;
unsigned long chip_id = ids->driver_data;
const struct of_device_id *match;
bool status_off = false;
int ret;
Expand All @@ -170,7 +170,7 @@ static int tps65217_probe(struct i2c_client *client,
"Failed to find matching dt id\n");
return -EINVAL;
}
chip_id = (unsigned int)(unsigned long)match->data;
chip_id = (unsigned long)match->data;
status_off = of_property_read_bool(client->dev.of_node,
"ti,pmic-shutdown-controller");
}
Expand Down
4 changes: 2 additions & 2 deletions include/linux/mfd/tps65217.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ struct tps65217_board {
struct tps65217 {
struct device *dev;
struct tps65217_board *pdata;
unsigned int id;
unsigned long id;
struct regulator_desc desc[TPS65217_NUM_REGULATOR];
struct regulator_dev *rdev[TPS65217_NUM_REGULATOR];
struct regmap *regmap;
Expand All @@ -263,7 +263,7 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev)
return dev_get_drvdata(dev);
}

static inline int tps65217_chip_id(struct tps65217 *tps65217)
static inline unsigned long tps65217_chip_id(struct tps65217 *tps65217)
{
return tps65217->id;
}
Expand Down

0 comments on commit 5c6fbd5

Please sign in to comment.