hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/input/misc/rotary_encoder.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * rotary_encoder.c
34 *
....@@ -8,10 +9,6 @@
89 *
910 * A generic driver for rotary encoders connected to GPIO lines.
1011 * 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.
1512 */
1613
1714 #include <linux/kernel.h>
....@@ -240,8 +237,10 @@
240237
241238 encoder->gpios = devm_gpiod_get_array(dev, NULL, GPIOD_IN);
242239 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;
245244 }
246245 if (encoder->gpios->ndescs < 2) {
247246 dev_err(dev, "not enough gpios found\n");