Commit 65a09ba2 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Martin K. Petersen
Browse files

scsi: core: Store owner from modules with scsi_register_driver()



Modules registering driver with scsi_driver_register() 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
scsi code, just like we did for platform_driver in commit 9447057e
("platform_device: use a macro instead of platform_driver_register").

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240328-b4-module-owner-scsi-v1-1-c86cb4f6e91c@linaro.org


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4e64bbba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment