mfd: stmpe: Rid data size incompatibility warn when building for 64bit
authorLee Jones <lee.jones@linaro.org>
Wed, 2 Jul 2014 10:54:32 +0000 (11:54 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 9 Jul 2014 15:37:55 +0000 (16:37 +0100)
Extinguishes:

../drivers/mfd/stmpe-i2c.c: In function ‘stmpe_i2c_probe’:
../drivers/mfd/stmpe-i2c.c:88:13:
warning: cast from pointer to integer of different size
partnum = (int)of_id->data;

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/stmpe-i2c.c
drivers/mfd/stmpe.c
drivers/mfd/stmpe.h

index a45f9c0a330a8e61e3046a55399adab011ceafd4..5c054031c3f86a80a1aee942f395e56efc8f6b36 100644 (file)
@@ -68,7 +68,7 @@ MODULE_DEVICE_TABLE(of, stmpe_of_match);
 static int
 stmpe_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 {
-       int partnum;
+       enum stmpe_partnum partnum;
        const struct of_device_id *of_id;
 
        i2c_ci.data = (void *)id;
@@ -85,7 +85,7 @@ stmpe_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
                dev_info(&i2c->dev, "matching on node name, compatible is preferred\n");
                partnum = id->driver_data;
        } else
-               partnum = (int)of_id->data;
+               partnum = (enum stmpe_partnum)of_id->data;
 
        return stmpe_probe(&i2c_ci, partnum);
 }
index 3b6bfa7184ad7167716bbea2c04f7b4f3375847b..02a17c388e87deff018fc8fc67af89bf4213182a 100644 (file)
@@ -1147,7 +1147,7 @@ static void stmpe_of_probe(struct stmpe_platform_data *pdata,
 }
 
 /* Called from client specific probe routines */
-int stmpe_probe(struct stmpe_client_info *ci, int partnum)
+int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum)
 {
        struct stmpe_platform_data *pdata = dev_get_platdata(ci->dev);
        struct device_node *np = ci->dev->of_node;
index 9e4d21d37a1155378352be5807d2a18a2d7a807f..2d045f26f193eb0e96ecf32ee1cc1f07b39ca99c 100644 (file)
@@ -97,7 +97,7 @@ struct stmpe_client_info {
        void (*init)(struct stmpe *stmpe);
 };
 
-int stmpe_probe(struct stmpe_client_info *ci, int partnum);
+int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum);
 int stmpe_remove(struct stmpe *stmpe);
 
 #define STMPE_ICR_LSB_HIGH     (1 << 2)