i2c: designware: make use of devm_gpiod_get_optional
authorUwe Kleine-König <uwe@kleine-koenig.org>
Thu, 25 Jul 2019 20:21:36 +0000 (22:21 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 1 Aug 2019 12:58:31 +0000 (14:58 +0200)
commit33eb09a02e8d8fad976019694196eec2cc210d62
tree362ea35b949b7499ea8875444761b098eb36112c
parent684ca71259a69c5a3019da72fe718bf983841926
i2c: designware: make use of devm_gpiod_get_optional

There is a semantical change: if devm_gpiod_get_optional returns -ENOSYS
this is passed as error to the caller. This effectively reverts commit
d1fa74520dcd ("i2c: designware: Consider SCL GPIO optional") which
shouldn't be necessary any more since gpiod_get_optional doesn't return
-ENOSYS any more with GPIOLIB=n.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-designware-master.c