drivers/mfd/max8998.c: fix pointer-integer size mismatch warning in max8998_i2c_get_d...
authorDavid Howells <dhowells@redhat.com>
Thu, 23 Jan 2014 23:54:04 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:55 +0000 (16:36 -0800)
Fix up the following pointer-integer size mismatch warning in
max8998_i2c_get_driver_data():

drivers/mfd/max8998.c: In function 'max8998_i2c_get_driver_data':
drivers/mfd/max8998.c:178:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
return (int)match->data;
       ^

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Mark Brown <broonie@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mfd/max8998.c

index f47eaa70eae076f172f4e72977f98dfe26e680da..612ca404e1502d6c736eaf239d9b721e522664f9 100644 (file)
@@ -175,7 +175,7 @@ static inline int max8998_i2c_get_driver_data(struct i2c_client *i2c,
        if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) {
                const struct of_device_id *match;
                match = of_match_node(max8998_dt_match, i2c->dev.of_node);
-               return (int)match->data;
+               return (int)(long)match->data;
        }
 
        return (int)id->driver_data;