Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b7e31bb authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Dmitry Torokhov
Browse files

Input: request threaded-only IRQs with IRQF_ONESHOT



Since commit 1c6c6952 ("genirq: Reject bogus threaded irq requests")
threaded IRQs without a primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail. This patch adds the
IRQF_ONESHOT to input drivers where it is missing. Not modified by
this patch are those drivers where the requested IRQ will always be a
nested IRQ (e.g. because it's part of an MFD), since for this special
case IRQF_ONESHOT is not required to be specified when requesting the
IRQ.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 1cecc5cc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -281,7 +281,8 @@ static int __devinit as5011_probe(struct i2c_client *client,

	error = request_threaded_irq(as5011->button_irq,
				     NULL, as5011_button_interrupt,
				     IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
				     IRQF_TRIGGER_RISING |
					IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
				     "as5011_button", as5011);
	if (error < 0) {
		dev_err(&client->dev,
@@ -295,7 +296,7 @@ static int __devinit as5011_probe(struct i2c_client *client,

	error = request_threaded_irq(as5011->axis_irq, NULL,
				     as5011_axis_interrupt,
				     plat_data->axis_irqflags,
				     plat_data->axis_irqflags | IRQF_ONESHOT,
				     "as5011_joystick", as5011);
	if (error) {
		dev_err(&client->dev,
+2 −1
Original line number Diff line number Diff line
@@ -178,7 +178,8 @@ static int __devinit mcs_touchkey_probe(struct i2c_client *client,
	}

	error = request_threaded_irq(client->irq, NULL, mcs_touchkey_interrupt,
			IRQF_TRIGGER_FALLING, client->dev.driver->name, data);
				     IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
				     client->dev.driver->name, data);
	if (error) {
		dev_err(&client->dev, "Failed to register interrupt\n");
		goto err_free_mem;
+1 −1
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ static int __devinit mpr_touchkey_probe(struct i2c_client *client,

	error = request_threaded_irq(client->irq, NULL,
				     mpr_touchkey_interrupt,
				     IRQF_TRIGGER_FALLING,
				     IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
				     client->dev.driver->name, mpr121);
	if (error) {
		dev_err(&client->dev, "Failed to register interrupt\n");
+2 −1
Original line number Diff line number Diff line
@@ -201,7 +201,8 @@ static int __devinit qt1070_probe(struct i2c_client *client,
	msleep(QT1070_RESET_TIME);

	err = request_threaded_irq(client->irq, NULL, qt1070_interrupt,
		IRQF_TRIGGER_NONE, client->dev.driver->name, data);
				   IRQF_TRIGGER_NONE | IRQF_ONESHOT,
				   client->dev.driver->name, data);
	if (err) {
		dev_err(&client->dev, "fail to request irq\n");
		goto err_free_mem;
+2 −1
Original line number Diff line number Diff line
@@ -278,7 +278,8 @@ static int __devinit tca6416_keypad_probe(struct i2c_client *client,

		error = request_threaded_irq(chip->irqnum, NULL,
					     tca6416_keys_isr,
					     IRQF_TRIGGER_FALLING,
					     IRQF_TRIGGER_FALLING |
						IRQF_ONESHOT,
					     "tca6416-keypad", chip);
		if (error) {
			dev_dbg(&client->dev,
Loading