diff options
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.c | 61 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-core.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-i2c.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 4 |
6 files changed, 30 insertions, 53 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index e267b89fd..cfa9cca9f 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -344,48 +344,25 @@ static int set_input(struct i2c_client *client, enum cx25840_input input) static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) { - u8 fmt=0; /* zero is autodetect */ - - do { - /* First tests should be against specific std */ - if (std & V4L2_STD_NTSC_M_JP) { - fmt=0x2; - break; - } - if (std & V4L2_STD_NTSC_443) { - fmt=0x3; - break; - } - if (std & V4L2_STD_PAL_M) { - fmt=0x5; - break; - } - if (std & V4L2_STD_PAL_N) { - fmt=0x6; - break; - } - if (std & V4L2_STD_PAL_Nc) { - fmt=0x7; - break; - } - if (std & V4L2_STD_PAL_60) { - fmt=0x8; - break; - } - /* Then, test against generic ones */ - if (std & V4L2_STD_NTSC) { - fmt=0x1; - break; - } - if (std & V4L2_STD_PAL) { - fmt=0x4; - break; - } - if (std & V4L2_STD_SECAM) { - fmt=0xc; - break; - } - } while (0); + u8 fmt; + + switch (std) { + /* zero is autodetect */ + case 0: fmt = 0x0; break; + /* default ntsc to ntsc-m */ + case V4L2_STD_NTSC: + case V4L2_STD_NTSC_M: fmt = 0x1; break; + case V4L2_STD_NTSC_M_JP: fmt = 0x2; break; + case V4L2_STD_NTSC_443: fmt = 0x3; break; + case V4L2_STD_PAL: fmt = 0x4; break; + case V4L2_STD_PAL_M: fmt = 0x5; break; + case V4L2_STD_PAL_N: fmt = 0x6; break; + case V4L2_STD_PAL_Nc: fmt = 0x7; break; + case V4L2_STD_PAL_60: fmt = 0x8; break; + case V4L2_STD_SECAM: fmt = 0xc; break; + default: + return -ERANGE; + } cx25840_and_or(client, 0x400, ~0xf, fmt); cx25840_vbi_setup(client); diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c index ffd173e7c..e2e6426eb 100644 --- a/linux/drivers/media/video/em28xx/em28xx-core.c +++ b/linux/drivers/media/video/em28xx/em28xx-core.c @@ -39,7 +39,7 @@ MODULE_PARM_DESC(core_debug,"enable debug messages [core]"); #define em28xx_coredbg(fmt, arg...) do {\ if (core_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__ , ##arg); } while (0) + dev->name, __FUNCTION__, ##arg); } while (0) static unsigned int reg_debug = 0; module_param(reg_debug,int,0644); @@ -48,7 +48,7 @@ MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]"); #define em28xx_regdbg(fmt, arg...) do {\ if (reg_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__ , ##arg); } while (0) + dev->name, __FUNCTION__, ##arg); } while (0) static unsigned int isoc_debug = 0; module_param(isoc_debug,int,0644); @@ -57,7 +57,7 @@ MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]"); #define em28xx_isocdbg(fmt, arg...) do {\ if (isoc_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__ , ##arg); } while (0) + dev->name, __FUNCTION__, ##arg); } while (0) static int alt = EM28XX_PINOUT; module_param(alt, int, 0644); diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c index 7f5603054..29e21ad18 100644 --- a/linux/drivers/media/video/em28xx/em28xx-i2c.c +++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c @@ -44,7 +44,7 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); printk(fmt, ##args); } while (0) #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ printk(KERN_DEBUG "%s at %s: " fmt, \ - dev->name, __FUNCTION__ , ##args); } while (0) + dev->name, __FUNCTION__, ##args); } while (0) /* * em2800_i2c_send_max4() diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index a1c85ce03..3194f64c0 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -50,7 +50,7 @@ #define em28xx_videodbg(fmt, arg...) do {\ if (video_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__ , ##arg); } while (0) + dev->name, __FUNCTION__, ##arg); } while (0) MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index ef332d3e6..d6bbfb11f 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -393,18 +393,18 @@ extern const unsigned int em28xx_bcount; /* printk macros */ #define em28xx_err(fmt, arg...) do {\ - printk(KERN_ERR fmt , ##arg); } while (0) + printk(KERN_ERR fmt, ##arg); } while (0) #define em28xx_errdev(fmt, arg...) do {\ printk(KERN_ERR "%s: "fmt,\ - dev->name , ##arg); } while (0) + dev->name, ##arg); } while (0) #define em28xx_info(fmt, arg...) do {\ printk(KERN_INFO "%s: "fmt,\ - dev->name , ##arg); } while (0) + dev->name, ##arg); } while (0) #define em28xx_warn(fmt, arg...) do {\ printk(KERN_WARNING "%s: "fmt,\ - dev->name , ##arg); } while (0) + dev->name, ##arg); } while (0) inline static int em28xx_audio_source(struct em28xx *dev, int input) { diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index b24e5de75..fe5427c92 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -1,7 +1,7 @@ /* * SAA713x ALSA support for V4L * - * $Id: saa7134-alsa.c,v 1.29 2005/12/17 21:39:18 mchehab Exp $ + * $Id: saa7134-alsa.c,v 1.30 2005/12/17 23:31:39 mchehab Exp $ * * Caveats: * - Volume doesn't work (it's always at max) @@ -68,7 +68,7 @@ module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); #define dprintk(fmt, arg...) if (debug) \ - printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) + printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg) |