mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 02:01:18 -04:00
Input: sx8654 - use IRQF_NOAUTOEN when requesting interrupt
Instead of requesting interrupt normally and immediately disabling it with call to disable_irq() use IRQF_NOAUTOEN to keep it disabled until it is needed. This avoids a tiny window when interrupt is enabled but not needed. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
@@ -391,9 +391,13 @@ static int sx8654_probe(struct i2c_client *client)
|
||||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
* Start with the interrupt disabled, it will be enabled in
|
||||
* sx8654_open().
|
||||
*/
|
||||
error = devm_request_threaded_irq(&client->dev, client->irq,
|
||||
NULL, sx8654->data->irqh,
|
||||
IRQF_ONESHOT,
|
||||
IRQF_ONESHOT | IRQF_NO_AUTOEN,
|
||||
client->name, sx8654);
|
||||
if (error) {
|
||||
dev_err(&client->dev,
|
||||
@@ -402,9 +406,6 @@ static int sx8654_probe(struct i2c_client *client)
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Disable the IRQ, we'll enable it in sx8654_open() */
|
||||
disable_irq(client->irq);
|
||||
|
||||
error = input_register_device(sx8654->input);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user