Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vfio/mdev: Use a module softdep for vfio_mdev

Use an explicit module softdep rather than a request module call such
that the dependency is exposed to userspace. This allows us to more
easily support modules loaded at initrd time.

Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

+2 -12
+2 -12
drivers/vfio/mdev/mdev_core.c
··· 422 422 423 423 static int __init mdev_init(void) 424 424 { 425 - int ret; 426 - 427 - ret = mdev_bus_register(); 428 - 429 - /* 430 - * Attempt to load known vfio_mdev. This gives us a working environment 431 - * without the user needing to explicitly load vfio_mdev driver. 432 - */ 433 - if (!ret) 434 - request_module_nowait("vfio_mdev"); 435 - 436 - return ret; 425 + return mdev_bus_register(); 437 426 } 438 427 439 428 static void __exit mdev_exit(void) ··· 440 451 MODULE_LICENSE("GPL v2"); 441 452 MODULE_AUTHOR(DRIVER_AUTHOR); 442 453 MODULE_DESCRIPTION(DRIVER_DESC); 454 + MODULE_SOFTDEP("post: vfio_mdev");