diff options
| author | Frieder Schrempf <[email protected]> | 2019-08-02 10:04:09 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-09-04 12:43:50 +0200 |
| commit | e8b2a6187544e79fbc4863fe5cc746de8bba07ff (patch) | |
| tree | a764f498f81b05e62072fa9a0cbf152eb3cbc1df /tools/perf/scripts/python | |
| parent | 72169e4234d4cd3cd177d3021efde82bbdfa43e8 (diff) | |
serial: mctrl_gpio: Avoid probe failures in case of missing gpiolib
If CONFIG_GPIOLIB is not enabled, mctrl_gpio_init() and
mctrl_gpio_init_noauto() will currently return an error pointer with
-ENOSYS. As the mctrl GPIOs are usually optional, drivers need to
check for this condition to allow continue probing.
To avoid the need for this check in each driver, we return NULL
instead, as all the mctrl_gpio_*() functions are skipped anyway.
We also adapt mctrl_gpio_to_gpiod() to be in line with this change.
Reviewed-by: Fabio Estevam <[email protected]>
Signed-off-by: Frieder Schrempf <[email protected]>
Reviewed-by: Uwe Kleine-Knig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions