Commit 37f5b858 authored by Danny Kaehn's avatar Danny Kaehn Committed by Benjamin Tissoires

HID: cp2112: Fix driver not registering GPIO IRQ chip as threaded

The CP2112 generates interrupts from a polling routine on a thread,
and can only support threaded interrupts. This patch configures the
gpiochip irq chip with this flag, disallowing consumers to request
a hard IRQ from this driver, which resulted in a segfault previously.
Signed-off-by: default avatarDanny Kaehn <kaehndan@gmail.com>
Link: https://lore.kernel.org/r/20230210170044.11835-1-kaehndan@gmail.comSigned-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
parent 22ef7d7b
...@@ -1354,6 +1354,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id) ...@@ -1354,6 +1354,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
girq->parents = NULL; girq->parents = NULL;
girq->default_type = IRQ_TYPE_NONE; girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_simple_irq; girq->handler = handle_simple_irq;
girq->threaded = true;
ret = gpiochip_add_data(&dev->gc, dev); ret = gpiochip_add_data(&dev->gc, dev);
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment