Commit 172aa36
drivers: usb: udc: stm32: use direct function calls for clock on/off
To enable/disable clocks, the UDC driver used function pointers stored in
the instance private data(!), which *could* be NULL... but in practice,
they were always initialized. Furthermore, the clock configuration is
done through Clock Control API calls so the code can be shared by all
instances.
Replace indirect calls through function pointers with direct calls to the
"priv_clock_(dis|en)able" function, which are renamed to "udc_stm32_..."
for consistency with the rest of the driver. The now-unused function
pointers are also removed from the instance data structure.
Signed-off-by: Mathieu Choplain <[email protected]>1 parent e5fdd46 commit 172aa36
1 file changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
163 | 161 | | |
164 | 162 | | |
165 | 163 | | |
| |||
193 | 191 | | |
194 | 192 | | |
195 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
699 | | - | |
| 700 | + | |
700 | 701 | | |
701 | 702 | | |
702 | 703 | | |
| |||
928 | 929 | | |
929 | 930 | | |
930 | 931 | | |
931 | | - | |
| 932 | + | |
932 | 933 | | |
933 | 934 | | |
934 | 935 | | |
| |||
1239 | 1240 | | |
1240 | 1241 | | |
1241 | 1242 | | |
1242 | | - | |
| 1243 | + | |
1243 | 1244 | | |
1244 | 1245 | | |
1245 | 1246 | | |
| |||
1449 | 1450 | | |
1450 | 1451 | | |
1451 | 1452 | | |
1452 | | - | |
| 1453 | + | |
1453 | 1454 | | |
1454 | 1455 | | |
1455 | 1456 | | |
| |||
1538 | 1539 | | |
1539 | 1540 | | |
1540 | 1541 | | |
1541 | | - | |
1542 | | - | |
1543 | 1542 | | |
1544 | 1543 | | |
1545 | 1544 | | |
| |||
0 commit comments