Skip to content

Commit 37f5b85

Browse files
kaehndbentiss
authored andcommitted
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: Danny Kaehn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 22ef7d7 commit 37f5b85

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/hid-cp2112.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
13541354
girq->parents = NULL;
13551355
girq->default_type = IRQ_TYPE_NONE;
13561356
girq->handler = handle_simple_irq;
1357+
girq->threaded = true;
13571358

13581359
ret = gpiochip_add_data(&dev->gc, dev);
13591360
if (ret < 0) {

0 commit comments

Comments
 (0)