mfd: tps65910: Rid data size incompatibility warn when building for 64bit
authorLee Jones <lee.jones@linaro.org>
Wed, 2 Jul 2014 13:34:13 +0000 (14:34 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 9 Jul 2014 15:38:01 +0000 (16:38 +0100)
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>
drivers/mfd/tps65910.c
include/linux/mfd/tps65910.h

index f9e42ea1cb1a852784738773fff3e4f436d4d621..f243e75d28f31198a19ad7442aa4159595088622 100644 (file)
@@ -387,7 +387,7 @@ static const struct of_device_id tps65910_of_match[] = {
 MODULE_DEVICE_TABLE(of, tps65910_of_match);
 
 static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
-                                               int *chip_id)
+                                               unsigned long *chip_id)
 {
        struct device_node *np = client->dev.of_node;
        struct tps65910_board *board_info;
@@ -401,7 +401,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
                return NULL;
        }
 
-       *chip_id  = (int)match->data;
+       *chip_id  = (unsigned long)match->data;
 
        board_info = devm_kzalloc(&client->dev, sizeof(*board_info),
                        GFP_KERNEL);
@@ -431,7 +431,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
 #else
 static inline
 struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
-                                        int *chip_id)
+                                        unsigned long *chip_id)
 {
        return NULL;
 }
@@ -453,14 +453,14 @@ static void tps65910_power_off(void)
 }
 
 static int tps65910_i2c_probe(struct i2c_client *i2c,
-                                       const struct i2c_device_id *id)
+                             const struct i2c_device_id *id)
 {
        struct tps65910 *tps65910;
        struct tps65910_board *pmic_plat_data;
        struct tps65910_board *of_pmic_plat_data = NULL;
        struct tps65910_platform_data *init_data;
+       unsigned long chip_id = id->driver_data;
        int ret = 0;
-       int chip_id = id->driver_data;
 
        pmic_plat_data = dev_get_platdata(&i2c->dev);
 
index 16c2335c28564af0ea0f549cc932df0e47f79329..6483a6fdce594a9036cad2cd859dff64c81e87cf 100644 (file)
@@ -892,7 +892,7 @@ struct tps65910 {
        struct device *dev;
        struct i2c_client *i2c_client;
        struct regmap *regmap;
-       unsigned int id;
+       unsigned long id;
 
        /* Client devices */
        struct tps65910_pmic *pmic;