]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: remove unnecessary module_init/exit functions
authorEthan Nelson-Moore <enelsonmoore@gmail.com>
Sat, 31 Jan 2026 02:00:47 +0000 (18:00 -0800)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 11 Mar 2026 00:05:37 +0000 (01:05 +0100)
Three media drivers have unnecessary module_init and module_exit
functions that are empty or just print a message. Remove them. Note
that if a module_init function exists, a module_exit function must also
exist; otherwise, the module cannot be unloaded.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/common/b2c2/flexcop.c
drivers/media/common/saa7146/saa7146_fops.c
drivers/media/usb/gspca/gspca.c

index abd3d21a18cab2e1d2544e00a100062700ffaff5..f7766a9b31dae21a1690d7ec378d7e07fba5ded8 100644 (file)
@@ -291,20 +291,6 @@ void flexcop_device_exit(struct flexcop_device *fc)
 }
 EXPORT_SYMBOL(flexcop_device_exit);
 
-static int flexcop_module_init(void)
-{
-       info(DRIVER_NAME " loaded successfully");
-       return 0;
-}
-
-static void flexcop_module_cleanup(void)
-{
-       info(DRIVER_NAME " unloaded successfully");
-}
-
-module_init(flexcop_module_init);
-module_exit(flexcop_module_cleanup);
-
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_NAME);
 MODULE_LICENSE("GPL");
index fd12ef10409cae958ec9d1bb5e5081f00b58f42e..fe5c376d397adf3fd358d3073fd952b919aabfb2 100644 (file)
@@ -417,19 +417,6 @@ int saa7146_unregister_device(struct video_device *vfd, struct saa7146_dev *dev)
 }
 EXPORT_SYMBOL_GPL(saa7146_unregister_device);
 
-static int __init saa7146_vv_init_module(void)
-{
-       return 0;
-}
-
-
-static void __exit saa7146_vv_cleanup_module(void)
-{
-}
-
-module_init(saa7146_vv_init_module);
-module_exit(saa7146_vv_cleanup_module);
-
 MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
 MODULE_DESCRIPTION("video4linux driver for saa7146-based hardware");
 MODULE_LICENSE("GPL");
index 3fc15d16df8e10d4762c1f0a6c7dd2f7c57c2675..f3d3f441c8510f391008bf2b54c1ee344ee85653 100644 (file)
@@ -1701,19 +1701,6 @@ int gspca_resume(struct usb_interface *intf)
 EXPORT_SYMBOL(gspca_resume);
 #endif
 
-/* -- module insert / remove -- */
-static int __init gspca_init(void)
-{
-       pr_info("v" GSPCA_VERSION " registered\n");
-       return 0;
-}
-static void __exit gspca_exit(void)
-{
-}
-
-module_init(gspca_init);
-module_exit(gspca_exit);
-
 module_param_named(debug, gspca_debug, int, 0644);
 MODULE_PARM_DESC(debug,
                "1:probe 2:config 3:stream 4:frame 5:packet 6:usbi 7:usbo");