Commit 9fa060df authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Wolfram Sang

i2c: pxa: don't error out if there's no pinctrl

The bus recovery patch regresses on OLPC XO-1.75 that has no pinctrl in
its DT.

Fixes: 7c9ec2c5 ("i2c: pxa: implement generic i2c bus recovery")'
Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent fad5972a
...@@ -1348,6 +1348,8 @@ static int i2c_pxa_init_recovery(struct pxa_i2c *i2c) ...@@ -1348,6 +1348,8 @@ static int i2c_pxa_init_recovery(struct pxa_i2c *i2c)
return 0; return 0;
i2c->pinctrl = devm_pinctrl_get(dev); i2c->pinctrl = devm_pinctrl_get(dev);
if (PTR_ERR(i2c->pinctrl) == -ENODEV)
i2c->pinctrl = NULL;
if (IS_ERR(i2c->pinctrl)) if (IS_ERR(i2c->pinctrl))
return PTR_ERR(i2c->pinctrl); return PTR_ERR(i2c->pinctrl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment