regulator: max8973: make default/unset dvs gpio as invalid gpio

If platform data has dvs-gpio value 0 as default/unset then
make this as invalid gpio so that function gpio_is_valid()
can return false on this case.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Laxman Dewangan 2015-05-06 18:20:09 +05:30 committed by Mark Brown
parent dcd9ec6ae3
commit eaacaa09e4
1 changed files with 1 additions and 1 deletions

View File

@ -413,7 +413,7 @@ static int max8973_probe(struct i2c_client *client,
}
if (pdata) {
max->dvs_gpio = pdata->dvs_gpio;
max->dvs_gpio = (pdata->dvs_gpio) ? pdata->dvs_gpio : -EINVAL;
max->enable_external_control = pdata->enable_ext_control;
max->curr_gpio_val = pdata->dvs_def_state;
max->curr_vout_reg = MAX8973_VOUT + pdata->dvs_def_state;