Skip to content

Commit b5ac008

Browse files
andy-shevBenjamin Tissoires
authored andcommitted
HID: cp2112: Don't call ->to_irq() explicitly
GPIO library guarantees that ->to_irq() is always exists. Moreover, it tending to become a nische thingy and has to not be used in ordinary drivers. Hence, replace that by irq_find_mapping(). Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent ecb42bb commit b5ac008

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/hid/hid-cp2112.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,10 +1112,9 @@ static void cp2112_gpio_poll_callback(struct work_struct *work)
11121112

11131113
gpio_mask = ret;
11141114
for_each_set_bit(virq, &dev->irq_mask, 8) {
1115-
if (!dev->gc.to_irq)
1116-
break;
1117-
1118-
irq = dev->gc.to_irq(&dev->gc, virq);
1115+
irq = irq_find_mapping(dev->gc.irq.domain, virq);
1116+
if (!irq)
1117+
continue;
11191118

11201119
d = irq_get_irq_data(irq);
11211120
if (!d)

0 commit comments

Comments
 (0)