Skip to content

Commit 01a0f4a

Browse files
author
Lee Jones
committed
mfd: tps65910: Rid data size incompatibility warn when building for 64bit
Extinguishes: ../drivers/mfd/tps65910.c: In function ‘tps65910_parse_dt’: ../drivers/mfd/tps65910.c:404:14: warning: cast from pointer to integer of different size Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 942786e commit 01a0f4a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/mfd/tps65910.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static const struct of_device_id tps65910_of_match[] = {
387387
MODULE_DEVICE_TABLE(of, tps65910_of_match);
388388

389389
static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
390-
int *chip_id)
390+
unsigned long *chip_id)
391391
{
392392
struct device_node *np = client->dev.of_node;
393393
struct tps65910_board *board_info;
@@ -401,7 +401,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
401401
return NULL;
402402
}
403403

404-
*chip_id = (int)match->data;
404+
*chip_id = (unsigned long)match->data;
405405

406406
board_info = devm_kzalloc(&client->dev, sizeof(*board_info),
407407
GFP_KERNEL);
@@ -431,7 +431,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
431431
#else
432432
static inline
433433
struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
434-
int *chip_id)
434+
unsigned long *chip_id)
435435
{
436436
return NULL;
437437
}
@@ -453,14 +453,14 @@ static void tps65910_power_off(void)
453453
}
454454

455455
static int tps65910_i2c_probe(struct i2c_client *i2c,
456-
const struct i2c_device_id *id)
456+
const struct i2c_device_id *id)
457457
{
458458
struct tps65910 *tps65910;
459459
struct tps65910_board *pmic_plat_data;
460460
struct tps65910_board *of_pmic_plat_data = NULL;
461461
struct tps65910_platform_data *init_data;
462+
unsigned long chip_id = id->driver_data;
462463
int ret = 0;
463-
int chip_id = id->driver_data;
464464

465465
pmic_plat_data = dev_get_platdata(&i2c->dev);
466466

include/linux/mfd/tps65910.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ struct tps65910 {
892892
struct device *dev;
893893
struct i2c_client *i2c_client;
894894
struct regmap *regmap;
895-
unsigned int id;
895+
unsigned long id;
896896

897897
/* Client devices */
898898
struct tps65910_pmic *pmic;

0 commit comments

Comments
 (0)