Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / drivers / regulator / fan53555.c
index f2f5535099a060d5a2f7cc6124e08f60c62e897c..f8e4257aef923d16f32f969e3e74e2e1fb55c6ff 100644 (file)
@@ -267,8 +267,7 @@ static int fan53555_device_setup(struct fan53555_device_info *di,
                ret = fan53555_voltages_setup_silergy(di);
                break;
        default:
-               dev_err(di->dev,
-                       "vendor %d not supported!\n", di->chip_id);
+               dev_err(di->dev, "vendor %d not supported!\n", di->vendor);
                return -EINVAL;
        }
 
@@ -362,6 +361,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
        if (!di)
                return -ENOMEM;
 
+       di->regulator = pdata->regulator;
        if (client->dev.of_node) {
                const struct of_device_id *match;
 
@@ -370,7 +370,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
                if (!match)
                        return -ENODEV;
 
-               di->vendor = (int) match->data;
+               di->vendor = (unsigned long) match->data;
        } else {
                /* if no ramp constraint set, get the pdata ramp_delay */
                if (!di->regulator->constraints.ramp_delay) {
@@ -390,7 +390,6 @@ static int fan53555_regulator_probe(struct i2c_client *client,
                return PTR_ERR(di->regmap);
        }
        di->dev = &client->dev;
-       di->regulator = pdata->regulator;
        i2c_set_clientdata(client, di);
        /* Get chip ID */
        ret = regmap_read(di->regmap, FAN53555_ID1, &val);