bttv: fix compiler warning before kernel 2.6.30

Message ID 4B921F84.3000803@freemail.hu (mailing list archive)
State Superseded, archived
Headers

Commit Message

Németh Márton March 6, 2010, 9:25 a.m. UTC
  From: Márton Németh <nm127@freemail.hu>

Fix the following compiler warnings when compiling before Linux
kernel version 2.6.30:
  bttv-i2c.c: In function 'init_bttv_i2c':
  bttv-i2c.c:440: warning: control reaches end of non-void function

Signed-off-by: Márton Németh <nm127@freemail.hu>
---

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Comments

Jean Delvare March 6, 2010, 12:03 p.m. UTC | #1
On Sat, 06 Mar 2010 10:25:24 +0100, Németh Márton wrote:
> From: Márton Németh <nm127@freemail.hu>
> 
> Fix the following compiler warnings when compiling before Linux
> kernel version 2.6.30:
>   bttv-i2c.c: In function 'init_bttv_i2c':
>   bttv-i2c.c:440: warning: control reaches end of non-void function
> 
> Signed-off-by: Márton Németh <nm127@freemail.hu>

Good catch.

Acked-by: Jean Delvare <khali@linux-fr.org>

Douglas, please apply quickly.

> ---
> diff -r 41c5482f2dac linux/drivers/media/video/bt8xx/bttv-i2c.c
> --- a/linux/drivers/media/video/bt8xx/bttv-i2c.c	Thu Mar 04 02:49:46 2010 -0300
> +++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c	Sat Mar 06 10:22:55 2010 +0100
> @@ -409,7 +409,6 @@
>  	}
>  	if (0 == btv->i2c_rc && i2c_scan)
>  		do_i2c_scan(btv->c.v4l2_dev.name, &btv->i2c_client);
> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
> 
>  	return btv->i2c_rc;
>  }
> @@ -417,6 +416,7 @@
>  /* Instantiate the I2C IR receiver device, if present */
>  void __devinit init_bttv_i2c_ir(struct bttv *btv)
>  {
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
>  	if (0 == btv->i2c_rc) {
>  		struct i2c_board_info info;
>  		/* The external IR receiver is at i2c address 0x34 (0x35 for
>
  

Patch

diff -r 41c5482f2dac linux/drivers/media/video/bt8xx/bttv-i2c.c
--- a/linux/drivers/media/video/bt8xx/bttv-i2c.c	Thu Mar 04 02:49:46 2010 -0300
+++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c	Sat Mar 06 10:22:55 2010 +0100
@@ -409,7 +409,6 @@ 
 	}
 	if (0 == btv->i2c_rc && i2c_scan)
 		do_i2c_scan(btv->c.v4l2_dev.name, &btv->i2c_client);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)

 	return btv->i2c_rc;
 }
@@ -417,6 +416,7 @@ 
 /* Instantiate the I2C IR receiver device, if present */
 void __devinit init_bttv_i2c_ir(struct bttv *btv)
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
 	if (0 == btv->i2c_rc) {
 		struct i2c_board_info info;
 		/* The external IR receiver is at i2c address 0x34 (0x35 for