提交 eaacaa09 编写于 作者: L Laxman Dewangan 提交者: Mark Brown

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: NLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 dcd9ec6a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册