[PATCH WIP 3/6] fixup gpio_buttons: detect and error-out if a button is requested for wakeup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm fine also with ignoring the value of wakeup as you suggested.

Signed-off-by: Ben Gardiner <bengardiner@xxxxxxxxxxxxxx>
---
 drivers/input/misc/gpio_buttons.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/input/misc/gpio_buttons.c b/drivers/input/misc/gpio_buttons.c
index c34e978..0859b4d 100644
--- a/drivers/input/misc/gpio_buttons.c
+++ b/drivers/input/misc/gpio_buttons.c
@@ -136,6 +136,11 @@ static int __devinit gpio_buttons_probe(struct platform_device *pdev)
 		unsigned int gpio = button->gpio;
 		unsigned int type = button->type ?: EV_KEY;
 
+		if (button->wakeup) {
+			dev_err(dev, DRV_NAME " does not support wakeup\n");
+			goto err_free_gpio;
+		}
+
 		error = gpio_request(gpio,
 				     button->desc ? button->desc : DRV_NAME);
 		if (error) {
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux