Commit af8a6e6
USB: serial: set driver owner when registering drivers
Modules registering drivers with usb_serial_register_drivers() might
forget to set .owner field. The field is used by some of other kernel
parts for reference counting (try_module_get()), so it is expected that
drivers will set it.
Solve the problem by moving this task away from the drivers to the core
USB serial code, just like we did for platform_driver in
commit 9447057 ("platform_device: use a macro instead of
platform_driver_register").
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[ johan: amend commit summary ]
Signed-off-by: Johan Hovold <johan@kernel.org>1 parent 47ac09b commit af8a6e6
2 files changed
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
1462 | | - | |
| 1462 | + | |
1463 | 1463 | | |
| 1464 | + | |
1464 | 1465 | | |
1465 | 1466 | | |
1466 | 1467 | | |
1467 | 1468 | | |
1468 | 1469 | | |
1469 | 1470 | | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
1473 | 1474 | | |
1474 | 1475 | | |
1475 | 1476 | | |
| |||
1514 | 1515 | | |
1515 | 1516 | | |
1516 | 1517 | | |
| 1518 | + | |
1517 | 1519 | | |
1518 | 1520 | | |
1519 | 1521 | | |
| |||
1532 | 1534 | | |
1533 | 1535 | | |
1534 | 1536 | | |
1535 | | - | |
| 1537 | + | |
1536 | 1538 | | |
1537 | 1539 | | |
1538 | 1540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| |||
0 commit comments