[openwrt/openwrt] gpio-button-hotplug: use dev_err_probe
LEDE Commits
lede-commits at lists.infradead.org
Mon Sep 23 09:22:12 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7c9998f7133b0fdc08956634de792ea41a2e0e6a
commit 7c9998f7133b0fdc08956634de792ea41a2e0e6a
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat Sep 7 14:11:19 2024 -0700
gpio-button-hotplug: use dev_err_probe
Avoids having to handle EPROBE_DEFER manually.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16456
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
package/kernel/gpio-button-hotplug/Makefile | 2 +-
package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/package/kernel/gpio-button-hotplug/Makefile b/package/kernel/gpio-button-hotplug/Makefile
index 04cbb69ada..5b4085887d 100644
--- a/package/kernel/gpio-button-hotplug/Makefile
+++ b/package/kernel/gpio-button-hotplug/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=gpio-button-hotplug
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index 17748219e8..de100777f2 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -525,10 +525,9 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
button->active_low ? GPIOF_ACTIVE_LOW :
0), desc);
if (error) {
- if (error != -EPROBE_DEFER) {
- dev_err(dev, "unable to claim gpio %d, err=%d\n",
- button->gpio, error);
- }
+ dev_err_probe(dev, error,
+ "unable to claim gpio %d",
+ button->gpio);
goto out;
}
More information about the lede-commits
mailing list