gpio-button-hotplug: use dev_err_probe
Avoids having to handle EPROBE_DEFER manually. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16456 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
2eb39308c9
commit
7c9998f713
2 changed files with 4 additions and 5 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=gpio-button-hotplug
|
PKG_NAME:=gpio-button-hotplug
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
|
@ -525,10 +525,9 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
|
||||||
button->active_low ? GPIOF_ACTIVE_LOW :
|
button->active_low ? GPIOF_ACTIVE_LOW :
|
||||||
0), desc);
|
0), desc);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error != -EPROBE_DEFER) {
|
dev_err_probe(dev, error,
|
||||||
dev_err(dev, "unable to claim gpio %d, err=%d\n",
|
"unable to claim gpio %d",
|
||||||
button->gpio, error);
|
button->gpio);
|
||||||
}
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue