mirror of
https://github.com/sysprog21/lkmpg.git
synced 2025-04-23 13:04:04 +08:00
Pass proper cookies to the request_threaded_irq
The last parameter of request_threaded_irq must be a globally unique cookie[1]. Usually this would be the device struct received by probe(). Since we are not using driver model, pass the gpio structs instead. [1] https://docs.kernel.org/core-api/genericirq.html
This commit is contained in:
parent
65397e2d53
commit
0c3aaac3c1
@ -81,7 +81,7 @@ static int __init bottomhalf_init(void)
|
||||
|
||||
ret = request_threaded_irq(
|
||||
button_irqs[0], button_top_half, button_bottom_half,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "gpiomod#button1", NULL);
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "gpiomod#button1", &buttons[0]);
|
||||
|
||||
if (ret) {
|
||||
pr_err("Unable to request IRQ: %d\n", ret);
|
||||
@ -101,7 +101,7 @@ static int __init bottomhalf_init(void)
|
||||
|
||||
ret = request_threaded_irq(
|
||||
button_irqs[1], button_top_half, button_bottom_half,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "gpiomod#button2", NULL);
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "gpiomod#button2", &buttons[1]);
|
||||
|
||||
if (ret) {
|
||||
pr_err("Unable to request IRQ: %d\n", ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user