diff mbox series

[1/2] vfio/mdev: turn mdev_init into a subsys_initcall

Message ID 20210726143524.155779-2-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/2] vfio/mdev: turn mdev_init into a subsys_initcall | expand

Commit Message

Christoph Hellwig July 26, 2021, 2:35 p.m. UTC
Without this setups with buіlt-in mdev and mdev-drivers fail to
register like this:

[1.903149] Driver 'intel_vgpu_mdev' was unable to register with bus_type 'mdev' because the bus was not initialized.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/vfio/mdev/mdev_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Cornelia Huck July 26, 2021, 5 p.m. UTC | #1
On Mon, Jul 26 2021, Christoph Hellwig <hch@lst.de> wrote:

> Without this setups with buіlt-in mdev and mdev-drivers fail to
> register like this:
>
> [1.903149] Driver 'intel_vgpu_mdev' was unable to register with bus_type 'mdev' because the bus was not initialized.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/vfio/mdev/mdev_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Jason Gunthorpe July 26, 2021, 11:06 p.m. UTC | #2
On Mon, Jul 26, 2021 at 04:35:23PM +0200, Christoph Hellwig wrote:
> Without this setups with buіlt-in mdev and mdev-drivers fail to
> register like this:
> 
> [1.903149] Driver 'intel_vgpu_mdev' was unable to register with bus_type 'mdev' because the bus was not initialized.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/vfio/mdev/mdev_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason
diff mbox series

Patch

diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
index e4581ec093a6..b16606ebafa1 100644
--- a/drivers/vfio/mdev/mdev_core.c
+++ b/drivers/vfio/mdev/mdev_core.c
@@ -398,7 +398,7 @@  static void __exit mdev_exit(void)
 	mdev_bus_unregister();
 }
 
-module_init(mdev_init)
+subsys_initcall(mdev_init)
 module_exit(mdev_exit)
 
 MODULE_VERSION(DRIVER_VERSION);