Skip to content

Commit 6c09208

Browse files
Li Zetaoawilliam
authored andcommitted
vfio/fsl-mc: Use module_fsl_mc_driver macro to simplify the code
Use the module_fsl_mc_driver macro to simplify the code and remove redundant initialization owner in vfio_fsl_mc_driver. Signed-off-by: Li Zetao <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Williamson <[email protected]>
1 parent d7955ce commit 6c09208

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/vfio/fsl-mc/vfio_fsl_mc.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -601,23 +601,11 @@ static struct fsl_mc_driver vfio_fsl_mc_driver = {
601601
.remove = vfio_fsl_mc_remove,
602602
.driver = {
603603
.name = "vfio-fsl-mc",
604-
.owner = THIS_MODULE,
605604
},
606605
.driver_managed_dma = true,
607606
};
608607

609-
static int __init vfio_fsl_mc_driver_init(void)
610-
{
611-
return fsl_mc_driver_register(&vfio_fsl_mc_driver);
612-
}
613-
614-
static void __exit vfio_fsl_mc_driver_exit(void)
615-
{
616-
fsl_mc_driver_unregister(&vfio_fsl_mc_driver);
617-
}
618-
619-
module_init(vfio_fsl_mc_driver_init);
620-
module_exit(vfio_fsl_mc_driver_exit);
608+
module_fsl_mc_driver(vfio_fsl_mc_driver);
621609

622610
MODULE_LICENSE("Dual BSD/GPL");
623611
MODULE_DESCRIPTION("VFIO for FSL-MC devices - User Level meta-driver");

0 commit comments

Comments
 (0)