[PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit

Randy Dunlap
Wed, 16 Mar 2022 19:20:03 -0000

Fixes: 31610434bc35 ("Virtio console driver")
Fixes: 7177876fea83 ("virtio: console: Add ability to remove module")
Signed-off-by: Randy Dunlap <rdunlap at infradead.org>
Cc: Amit Shah <amit at kernel.org>
Cc: virtualization at lists.linux-foundation.org
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/char/virtio_console.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- lnx-517-rc8.orig/drivers/char/virtio_console.c
+++ lnx-517-rc8/drivers/char/virtio_console.c
@@ -2245,7 +2245,7 @@ static struct virtio_driver virtio_rproc
 	.remove =	virtcons_remove,
 };

-static int __init init(void)
+static int __init virtio_console_init(void)
 {
 	int err;

@@ -2280,7 +2280,7 @@ free:
 	return err;
 }

-static void __exit fini(void)
+static void __exit virtio_console_fini(void)
 {
 	reclaim_dma_bufs();

@@ -2290,8 +2290,8 @@ static void __exit fini(void)
 	class_destroy(pdrvdata.class);
 	debugfs_remove_recursive(pdrvdata.debugfs_dir);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_console_init);
+module_exit(virtio_console_fini);

 MODULE_DESCRIPTION("Virtio console driver");
 MODULE_LICENSE("GPL");