File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,16 @@ static void disable_row_irqs(struct matrix_keypad *keypad)
104
104
disable_irq_nosync (keypad -> row_irqs [i ]);
105
105
}
106
106
107
+ static uint32_t read_row_state (struct matrix_keypad * keypad )
108
+ {
109
+ int row ;
110
+ u32 row_state = 0 ;
111
+
112
+ for (row = 0 ; row < keypad -> num_row_gpios ; row ++ )
113
+ row_state |= row_asserted (keypad , row ) ? BIT (row ) : 0 ;
114
+ return row_state ;
115
+ }
116
+
107
117
/*
108
118
* This gets the keys from keyboard and reports it to input subsystem
109
119
*/
@@ -129,9 +139,7 @@ static void matrix_keypad_scan(struct work_struct *work)
129
139
130
140
activate_col (keypad , col , true);
131
141
132
- for (row = 0 ; row < keypad -> num_row_gpios ; row ++ )
133
- new_state [col ] |=
134
- row_asserted (keypad , row ) ? BIT (row ) : 0 ;
142
+ new_state [col ] = read_row_state (keypad );
135
143
136
144
activate_col (keypad , col , false);
137
145
}
You can’t perform that action at this time.
0 commit comments