File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 16
16
* https://www.silabs.com/documents/public/application-notes/an495-cp2112-interface-specification.pdf
17
17
*/
18
18
19
+ #include <linux/bitops.h>
19
20
#include <linux/gpio/consumer.h>
20
21
#include <linux/gpio/machine.h>
21
22
#include <linux/gpio/driver.h>
@@ -1100,7 +1101,6 @@ static void cp2112_gpio_poll_callback(struct work_struct *work)
1100
1101
gpio_poll_worker .work );
1101
1102
struct irq_data * d ;
1102
1103
u8 gpio_mask ;
1103
- u8 virqs = (u8 )dev -> irq_mask ;
1104
1104
u32 irq_type ;
1105
1105
int irq , virq , ret ;
1106
1106
@@ -1111,11 +1111,7 @@ static void cp2112_gpio_poll_callback(struct work_struct *work)
1111
1111
goto exit ;
1112
1112
1113
1113
gpio_mask = ret ;
1114
-
1115
- while (virqs ) {
1116
- virq = ffs (virqs ) - 1 ;
1117
- virqs &= ~BIT (virq );
1118
-
1114
+ for_each_set_bit (virq , & dev -> irq_mask , 8 ) {
1119
1115
if (!dev -> gc .to_irq )
1120
1116
break ;
1121
1117
You can’t perform that action at this time.
0 commit comments