Krzysztof Kozlowski ffe6176b7f virtio: store owner from modules with register_virtio_driver()
Modules registering driver with register_virtio_driver() might forget to
set .owner field.  i2c-virtio.c for example has it missing.  The field
is used by some 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
virtio code, just like we did for platform_driver in
commit 9447057eaff8 ("platform_device: use a macro instead of
platform_driver_register").

Fixes: 3cfc88380413 ("i2c: virtio: add a virtio i2c frontend driver")
Cc: "Jie Deng" <jie.deng@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Message-Id: <20240331-module-owner-virtio-v2-1-98f04bfaf46a@linaro.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-04-08 04:11:04 -04:00
..
2024-03-13 11:07:37 -07:00
2023-04-27 11:53:57 -07:00
2023-04-26 15:43:19 -07:00
2024-02-16 11:46:32 +01:00
2024-01-27 18:08:55 -08:00
2022-11-15 14:52:38 -07:00
2020-06-02 20:32:53 -03:00
2020-12-10 22:37:32 +01:00
2023-07-08 11:05:05 -04:00
2023-07-24 12:12:24 +02:00
2022-06-10 15:38:14 +02:00
2023-05-09 11:54:42 +02:00