Commit 3a7f08f
iio: gyro: HID: hid-sensor-gyro-3d: Refactor channel initialization
Replace the local gyro_3d_adjust_channel_bit_mask() function with a
compound literal for scan_type initialization to improve code
readability. Additionaly, clean up the channel initialization
loop by iterating directly over the channel scan indices.
Signed-off-by: Natália Salvino André <natalia.andre@ime.usp.br>
Co-developed-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br>
Signed-off-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>1 parent ab568cb commit 3a7f08f
1 file changed
Lines changed: 9 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 86 | | |
97 | 87 | | |
98 | 88 | | |
| |||
248 | 238 | | |
249 | 239 | | |
250 | 240 | | |
251 | | - | |
252 | 241 | | |
253 | | - | |
| 242 | + | |
254 | 243 | | |
255 | 244 | | |
256 | 245 | | |
257 | | - | |
258 | | - | |
| 246 | + | |
| 247 | + | |
259 | 248 | | |
260 | 249 | | |
261 | | - | |
262 | | - | |
263 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
264 | 255 | | |
265 | 256 | | |
266 | 257 | | |
| |||
0 commit comments