]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: arizona: Rid data size incompatibility warn when building for 64bit
authorLee Jones <lee.jones@linaro.org>
Wed, 2 Jul 2014 13:28:46 +0000 (14:28 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 9 Jul 2014 15:38:01 +0000 (16:38 +0100)
Extinguishes:

../drivers/mfd/arizona-core.c: In function ‘arizona_of_get_type’:
../drivers/mfd/arizona-core.c:505:10:
warning: cast from pointer to integer of different size

Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/arizona-core.c
drivers/mfd/arizona-i2c.c
drivers/mfd/arizona-spi.c
drivers/mfd/arizona.h

index b4f22e7b87f2a89650b28b0a308cbda317d68b87..e9c3563766a6414a29dc5c0ac2c721865f103ad2 100644 (file)
@@ -497,12 +497,12 @@ const struct dev_pm_ops arizona_pm_ops = {
 EXPORT_SYMBOL_GPL(arizona_pm_ops);
 
 #ifdef CONFIG_OF
-int arizona_of_get_type(struct device *dev)
+unsigned long arizona_of_get_type(struct device *dev)
 {
        const struct of_device_id *id = of_match_device(arizona_of_match, dev);
 
        if (id)
-               return (int)id->data;
+               return (unsigned long)id->data;
        else
                return 0;
 }
index beccb790c9bab93869015044142666dc786b9508..9d4156fb082ae0b8d040e039ba17cd0aadf331d8 100644 (file)
 #include "arizona.h"
 
 static int arizona_i2c_probe(struct i2c_client *i2c,
-                                         const struct i2c_device_id *id)
+                            const struct i2c_device_id *id)
 {
        struct arizona *arizona;
        const struct regmap_config *regmap_config;
-       int ret, type;
+       unsigned long type;
+       int ret;
 
        if (i2c->dev.of_node)
                type = arizona_of_get_type(&i2c->dev);
index 1ca554b18bef76c8dd92156a2c9bf7ed87127fc3..5145d78bf07e0ddfa9556716408eb29bfcb7b132 100644 (file)
@@ -28,7 +28,8 @@ static int arizona_spi_probe(struct spi_device *spi)
        const struct spi_device_id *id = spi_get_device_id(spi);
        struct arizona *arizona;
        const struct regmap_config *regmap_config;
-       int ret, type;
+       unsigned long type;
+       int ret;
 
        if (spi->dev.of_node)
                type = arizona_of_get_type(&spi->dev);
index b4cef777df73732f451949ef6ef118c24bad387c..2951498ab9a150431189b2661a0f848badf4070f 100644 (file)
@@ -46,9 +46,9 @@ int arizona_irq_init(struct arizona *arizona);
 int arizona_irq_exit(struct arizona *arizona);
 
 #ifdef CONFIG_OF
-int arizona_of_get_type(struct device *dev);
+unsigned long arizona_of_get_type(struct device *dev);
 #else
-static inline int arizona_of_get_type(struct device *dev)
+static inline unsigned long arizona_of_get_type(struct device *dev)
 {
        return 0;
 }