[-mm patch] drivers/media/video/bt866.c: small fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 04, 2006 at 01:45:04AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.16-mm2:
>...
> +avermedia-6-eyes-avs6eyes-support.patch
>...
>  New v4l driver, and a fix.
>...

This patch contains the following fixes:
- no need to hide MODULE_LICENSE() behind an #ifdef
- use module_{init,exit}; this also fixes the bug that bt866_init()
  was never called

Signed-off-by: Adrian Bunk <[email protected]>

---

 drivers/media/video/bt866.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

--- linux-2.6.17-rc1-mm1-full/drivers/media/video/bt866.c.old	2006-04-04 17:31:55.000000000 +0200
+++ linux-2.6.17-rc1-mm1-full/drivers/media/video/bt866.c	2006-04-04 17:33:38.000000000 +0200
@@ -51,9 +51,7 @@
 
 #include <linux/video_encoder.h>
 
-#ifdef MODULE_LICENSE
 MODULE_LICENSE("GPL");
-#endif
 
 #define DEBUG(x)   		/* Debug driver */
 
@@ -372,22 +370,19 @@
 /****************************************************************************
 * linux kernel module api
 ****************************************************************************/
-#ifdef MODULE
-int init_module(void)
-#else
-int bt866_init(void)
-#endif
+static int __devinit bt866_init(void)
 {
 	i2c_add_driver(&i2c_driver_bt866);
 	return 0;
 }
 
-#ifdef MODULE
-void cleanup_module(void)
+static void __devexit bt866_exit(void)
 {
 	i2c_del_driver(&i2c_driver_bt866);
 }
-#endif
+
+module_init(bt866_init);
+module_exit(bt866_exit);
 
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux