Commit 837b05f
HID: cp2112: hold the lock for the entire direction_output() call
We currently take the lock, set direction to output, release it,
reacquire it and set the desired value. That doesn't look correct.
Introduce a helper function that sets the value without taking the lock
and use it where applicable in order to combine the critical sections.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>1 parent a99548b commit 837b05f
1 file changed
+15
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
221 | | - | |
| 222 | + | |
| 223 | + | |
222 | 224 | | |
223 | | - | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
228 | | - | |
229 | | - | |
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
| |||
236 | 235 | | |
237 | 236 | | |
238 | 237 | | |
| 238 | + | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
241 | 248 | | |
242 | 249 | | |
243 | 250 | | |
| |||
306 | 313 | | |
307 | 314 | | |
308 | 315 | | |
309 | | - | |
310 | | - | |
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
314 | 319 | | |
315 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
316 | 323 | | |
317 | 324 | | |
318 | 325 | | |
| |||
0 commit comments