.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * rotary_encoder.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
8 | 9 | * |
---|
9 | 10 | * A generic driver for rotary encoders connected to GPIO lines. |
---|
10 | 11 | * See file:Documentation/input/devices/rotary-encoder.rst for more information |
---|
11 | | - * |
---|
12 | | - * This program is free software; you can redistribute it and/or modify |
---|
13 | | - * it under the terms of the GNU General Public License version 2 as |
---|
14 | | - * published by the Free Software Foundation. |
---|
15 | 12 | */ |
---|
16 | 13 | |
---|
17 | 14 | #include <linux/kernel.h> |
---|
.. | .. |
---|
240 | 237 | |
---|
241 | 238 | encoder->gpios = devm_gpiod_get_array(dev, NULL, GPIOD_IN); |
---|
242 | 239 | if (IS_ERR(encoder->gpios)) { |
---|
243 | | - dev_err(dev, "unable to get gpios\n"); |
---|
244 | | - return PTR_ERR(encoder->gpios); |
---|
| 240 | + err = PTR_ERR(encoder->gpios); |
---|
| 241 | + if (err != -EPROBE_DEFER) |
---|
| 242 | + dev_err(dev, "unable to get gpios: %d\n", err); |
---|
| 243 | + return err; |
---|
245 | 244 | } |
---|
246 | 245 | if (encoder->gpios->ndescs < 2) { |
---|
247 | 246 | dev_err(dev, "not enough gpios found\n"); |
---|