]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: max77686: Ensure device type IDs are architecture agnostic
authorLee Jones <lee.jones@linaro.org>
Thu, 24 Jul 2014 16:07:16 +0000 (17:07 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 25 Jul 2014 14:31:48 +0000 (15:31 +0100)
Extinguishes:

../drivers/mfd/max77686.c: In function ‘max77686_i2c_probe’:
../drivers/mfd/max77686.c:254:20:
warning: cast from pointer to integer of different size

Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/max77686.c
include/linux/mfd/max77686-private.h

index c65332291bb4c9e94964f1155698227a44e7ba9f..86e552348db499a913eee239f62a93a2f4958818 100644 (file)
@@ -251,10 +251,9 @@ static int max77686_i2c_probe(struct i2c_client *i2c,
                if (!match)
                        return -EINVAL;
 
-               max77686->type = (int)match->data;
-       } else {
+               max77686->type = (unsigned long)match->data;
+       } else
                max77686->type = id->driver_data;
-       }
 
        i2c_set_clientdata(i2c, max77686);
        max77686->dev = &i2c->dev;
index 0d60b38e5b5c94515e937a76989aa411449d68bb..960b92ad450d5a642bc8ff168f165134b590566b 100644 (file)
@@ -439,7 +439,7 @@ struct max77686_dev {
        struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */
        struct i2c_client *rtc; /* slave addr 0x0c */
 
-       int type;
+       unsigned long type;
 
        struct regmap *regmap;          /* regmap for mfd */
        struct regmap *rtc_regmap;      /* regmap for rtc */