Commit a1927fb
platform/chrome: cros_ec_typec: add remove driver hook
This allows the driver to be unbound and bound again. Otherwise, when
unbinding the driver, there will be leftover sysfs entries.
When rebinding the driver, it also ends up touching freed memory when
adding to the notifier chain as the old one was not removed and ends up
being traversed.
Add a remove_new driver hook, which removes the notifier from the chain and
unregisters the typec ports.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Tzung-Bi Shih <[email protected]>1 parent 62be134 commit a1927fb
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1288 | 1297 | | |
1289 | 1298 | | |
1290 | 1299 | | |
| |||
1316 | 1325 | | |
1317 | 1326 | | |
1318 | 1327 | | |
| 1328 | + | |
1319 | 1329 | | |
1320 | 1330 | | |
1321 | 1331 | | |
| |||
0 commit comments