diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2020-06-02 21:38:23 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2020-06-03 22:37:37 +0200 |
commit | 9fa060df65715732655f7f46fe7fa68fc1a5b98e (patch) | |
tree | c8a26b7322df8b175228df18fc9f3875b630638b /drivers/i2c | |
parent | i2c: add 'single-master' property to generic bindings (diff) | |
download | linux-9fa060df65715732655f7f46fe7fa68fc1a5b98e.tar.xz linux-9fa060df65715732655f7f46fe7fa68fc1a5b98e.zip |
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: 7c9ec2c52518 ("i2c: pxa: implement generic i2c bus recovery")'
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index a7885b8b5031..35ca2c02c9b9 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -1348,6 +1348,8 @@ static int i2c_pxa_init_recovery(struct pxa_i2c *i2c) return 0; i2c->pinctrl = devm_pinctrl_get(dev); + if (PTR_ERR(i2c->pinctrl) == -ENODEV) + i2c->pinctrl = NULL; if (IS_ERR(i2c->pinctrl)) return PTR_ERR(i2c->pinctrl); |