]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
regulator: max8660: fix build warnings
authorDaniel Mack <zonque@gmail.com>
Thu, 8 Aug 2013 10:02:18 +0000 (12:02 +0200)
committerMark Brown <broonie@linaro.org>
Thu, 8 Aug 2013 10:43:10 +0000 (11:43 +0100)
Fix a build warning for !CONFIG_OF and a cast from void* to
unsigned int which is invalid on 64bit machines.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/max8660.c

index a4f2f1a38342af303fe1b74b545c60da0b35629e..144bcacd734dbe39e44801e411990e15a45d18eb 100644 (file)
@@ -364,7 +364,7 @@ static int max8660_pdata_from_dt(struct device *dev,
 #else
 static inline int max8660_pdata_from_dt(struct device *dev,
                                        struct device_node **of_node,
-                                       struct max8660_platform_data **pdata)
+                                       struct max8660_platform_data *pdata)
 {
        return 0;
 }
@@ -380,7 +380,7 @@ static int max8660_probe(struct i2c_client *client,
        struct max8660 *max8660;
        int boot_on, i, id, ret = -EINVAL;
        struct device_node *of_node[MAX8660_V_END];
-       unsigned int type;
+       unsigned long type;
 
        if (dev->of_node && !pdata) {
                const struct of_device_id *id;
@@ -395,7 +395,7 @@ static int max8660_probe(struct i2c_client *client,
                        return ret;
 
                pdata = &pdata_of;
-               type = (unsigned int) id->data;
+               type = (unsigned long) id->data;
        } else {
                type = i2c_id->driver_data;
                memset(of_node, 0, sizeof(of_node));