From 956e42d28f300f5bb928fb5850b3e3c0a8982d23 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Tue, 1 Jul 2008 10:03:42 -0300 Subject: [PATCH] V4L/DVB (8180): Source cleanup - compile error with VIDEO_ADV_DEBUG. main, etoms, mars, pac207, pac7311, sonixb, sonixj, spca500, spca505: Cleanup source. sunplus: Compilation error when VIDEO_ADV_DEBUG set. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/etoms.c | 4 ++-- drivers/media/video/gspca/gspca.c | 8 ++++---- drivers/media/video/gspca/mars.c | 6 ++++-- drivers/media/video/gspca/pac207.c | 24 ++++++++++++------------ drivers/media/video/gspca/pac7311.c | 3 ++- drivers/media/video/gspca/sonixb.c | 2 +- drivers/media/video/gspca/sonixj.c | 2 +- drivers/media/video/gspca/spca500.c | 9 +++++---- drivers/media/video/gspca/spca505.c | 2 +- drivers/media/video/gspca/sunplus.c | 6 +++--- 10 files changed, 35 insertions(+), 31 deletions(-) diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/video/gspca/etoms.c index c479f638413e..195b8123ba75 100644 --- a/drivers/media/video/gspca/etoms.c +++ b/drivers/media/video/gspca/etoms.c @@ -233,7 +233,7 @@ static void Et_RegWrite(struct usb_device *dev, 0, index, buffer, len, 500); } -static int Et_i2cwrite(struct usb_device *dev, __u8 reg, __u8 * buffer, +static int Et_i2cwrite(struct usb_device *dev, __u8 reg, __u8 *buffer, __u16 length, __u8 mode) { /* buffer should be [D0..D7] */ @@ -256,7 +256,7 @@ static int Et_i2cwrite(struct usb_device *dev, __u8 reg, __u8 * buffer, return 0; } -static int Et_i2cread(struct usb_device *dev, __u8 reg, __u8 * buffer, +static int Et_i2cread(struct usb_device *dev, __u8 reg, __u8 *buffer, __u16 length, __u8 mode) { /* buffer should be [D0..D7] */ diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index c84e0b352f46..13cd9968f1f5 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -28,9 +28,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include "gspca.h" @@ -45,8 +45,8 @@ MODULE_AUTHOR("Jean-Francois Moine "); MODULE_DESCRIPTION("GSPCA USB Camera Driver"); MODULE_LICENSE("GPL"); -#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0) -static const char version[] = "2.1.0"; +#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 1) +static const char version[] = "2.1.1"; static int video_nr = -1; diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c index 48b861d68299..d8cd2148f301 100644 --- a/drivers/media/video/gspca/mars.c +++ b/drivers/media/video/gspca/mars.c @@ -220,13 +220,15 @@ static void sd_start(struct gspca_dev *gspca_dev) if (0) { /* fixed dark-gain */ data[1] = 0; /* reg 94, Y Gain (1.75) */ data[2] = 0; /* reg 95, UV Gain (1.75) */ - data[3] = 0x3f; /* reg 96, Y Gain/UV Gain/disable auto dark-gain */ + data[3] = 0x3f; /* reg 96, Y Gain/UV Gain/disable + * auto dark-gain */ data[4] = 0; /* reg 97, set fixed dark level */ data[5] = 0; /* reg 98, don't care */ } else { /* auto dark-gain */ data[1] = 0; /* reg 94, Y Gain (auto) */ data[2] = 0; /* reg 95, UV Gain (1.75) */ - data[3] = 0x78; /* reg 96, Y Gain/UV Gain/disable auto dark-gain */ + data[3] = 0x78; /* reg 96, Y Gain/UV Gain/disable + * auto dark-gain */ switch (gspca_dev->width) { /* case 1280: */ /* data[4] = 154; diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 008954e755f1..84986684c4db 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c @@ -452,30 +452,30 @@ static void pac207_do_auto_gain(struct gspca_dev *gspca_dev) for (i = 0; i < steps; i++) { if (avg_lum > desired_avg_lum) { - if (sd->gain > PAC207_GAIN_KNEE) { + if (sd->gain > PAC207_GAIN_KNEE) sd->gain--; - } else if (sd->exposure > PAC207_EXPOSURE_KNEE) { + else if (sd->exposure > PAC207_EXPOSURE_KNEE) sd->exposure--; - } else if (sd->gain > PAC207_GAIN_DEFAULT) { + else if (sd->gain > PAC207_GAIN_DEFAULT) sd->gain--; - } else if (sd->exposure > PAC207_EXPOSURE_MIN) { + else if (sd->exposure > PAC207_EXPOSURE_MIN) sd->exposure--; - } else if (sd->gain > PAC207_GAIN_MIN) { + else if (sd->gain > PAC207_GAIN_MIN) sd->gain--; - } else + else break; } else { - if (sd->gain < PAC207_GAIN_DEFAULT) { + if (sd->gain < PAC207_GAIN_DEFAULT) sd->gain++; - } else if (sd->exposure < PAC207_EXPOSURE_KNEE) { + else if (sd->exposure < PAC207_EXPOSURE_KNEE) sd->exposure++; - } else if (sd->gain < PAC207_GAIN_KNEE) { + else if (sd->gain < PAC207_GAIN_KNEE) sd->gain++; - } else if (sd->exposure < PAC207_EXPOSURE_MAX) { + else if (sd->exposure < PAC207_EXPOSURE_MAX) sd->exposure++; - } else if (sd->gain < PAC207_GAIN_MAX) { + else if (sd->gain < PAC207_GAIN_MAX) sd->gain++; - } else + else break; } } diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index 8f51976db995..14eb25d81848 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c @@ -714,7 +714,8 @@ static __devinitdata struct usb_device_id device_table[] = { {USB_DEVICE(0x093a, 0x2601), DVNM("Philips SPC610NC")}, {USB_DEVICE(0x093a, 0x2603), DVNM("PAC7312")}, {USB_DEVICE(0x093a, 0x2608), DVNM("Trust WB-3300p")}, - {USB_DEVICE(0x093a, 0x260e), DVNM("Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350")}, + {USB_DEVICE(0x093a, 0x260e), DVNM("Gigaware VGA PC Camera")}, + /* and also ', Trust WB-3350p, SIGMA cam 2350' */ {USB_DEVICE(0x093a, 0x260f), DVNM("SnakeCam")}, {USB_DEVICE(0x093a, 0x2621), DVNM("PAC731x")}, {} diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c index d26255ddfd5b..80911a21e4ae 100644 --- a/drivers/media/video/gspca/sonixb.c +++ b/drivers/media/video/gspca/sonixb.c @@ -831,7 +831,7 @@ static __devinitdata struct usb_device_id device_table[] = { {USB_DEVICE(0x0c45, 0x6007), DVNM("Sonix sn9c101 + Tas5110D")}, {USB_DEVICE(0x0c45, 0x6009), DVNM("spcaCam@120")}, {USB_DEVICE(0x0c45, 0x600d), DVNM("spcaCam@120")}, - {USB_DEVICE(0x0c45, 0x6011), DVNM("MAX Webcam Microdia-OV6650-SN9C101G")}, + {USB_DEVICE(0x0c45, 0x6011), DVNM("MAX Webcam Microdia")}, {USB_DEVICE(0x0c45, 0x6019), DVNM("Generic Sonix OV7630")}, {USB_DEVICE(0x0c45, 0x6024), DVNM("Generic Sonix Tas5130c")}, {USB_DEVICE(0x0c45, 0x6025), DVNM("Xcam Shanga")}, diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 6180bc565ca1..e6a49fe2c4e3 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c @@ -1076,7 +1076,7 @@ static unsigned int setexposure(struct gspca_dev *gspca_dev, | ((expo & 0x0003) << 4); i2c_w8(gspca_dev->dev, expoMo10); i2c_w8(gspca_dev->dev, gainMo); - PDEBUG(D_CONF," set exposure %d", + PDEBUG(D_CONF, "set exposure %d", ((expoMo10[3] & 0x07) << 10) | (expoMof[3] << 2) | ((expoMo10[3] & 0x30) >> 4)); diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c index c0dd969a3106..e72fca5744ac 100644 --- a/drivers/media/video/gspca/spca500.c +++ b/drivers/media/video/gspca/spca500.c @@ -336,7 +336,7 @@ static unsigned char qtable_kodak_ez200[2][64] = { }; static unsigned char qtable_pocketdv[2][64] = { - { /* Q-table Y-components start registers 0x8800 */ + { /* Q-table Y-components start registers 0x8800 */ 0x06, 0x04, 0x04, 0x06, 0x0a, 0x10, 0x14, 0x18, 0x05, 0x05, 0x06, 0x08, 0x0a, 0x17, 0x18, 0x16, 0x06, 0x05, 0x06, 0x0a, 0x10, 0x17, 0x1c, 0x16, @@ -346,7 +346,7 @@ static unsigned char qtable_pocketdv[2][64] = { 0x14, 0x1a, 0x1f, 0x23, 0x29, 0x30, 0x30, 0x28, 0x1d, 0x25, 0x26, 0x27, 0x2d, 0x28, 0x29, 0x28, }, - { /* Q-table C-components start registers 0x8840 */ + { /* Q-table C-components start registers 0x8840 */ 0x07, 0x07, 0x0a, 0x13, 0x28, 0x28, 0x28, 0x28, 0x07, 0x08, 0x0a, 0x1a, 0x28, 0x28, 0x28, 0x28, 0x0a, 0x0a, 0x16, 0x28, 0x28, 0x28, 0x28, 0x28, @@ -833,7 +833,8 @@ static void sd_start(struct gspca_dev *gspca_dev) * - NWG (Sat 29th March 2003) */ /* do a full reset */ - if ((err = spca500_full_reset(gspca_dev)) < 0) + err = spca500_full_reset(gspca_dev); + if (err < 0) PDEBUG(D_ERR, "spca500_full_reset failed"); /* enable drop packet */ @@ -918,7 +919,7 @@ static void sd_start(struct gspca_dev *gspca_dev) /* Init SDRAM - needed for SDRAM access */ reg_write(gspca_dev->dev, 0x00, 0x870a, 0x04); - spca500_setmode(gspca_dev,xmult,ymult); + spca500_setmode(gspca_dev, xmult, ymult); /* switch to video camera mode */ reg_write(gspca_dev->dev, 0x00, 0x8000, 0x0004); diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/video/gspca/spca505.c index 5b23518d970d..d8ff121c2c5a 100644 --- a/drivers/media/video/gspca/spca505.c +++ b/drivers/media/video/gspca/spca505.c @@ -904,7 +904,7 @@ MODULE_DEVICE_TABLE(usb, device_table); static int sd_probe(struct usb_interface *intf, const struct usb_device_id *id) { - return gspca_dev_probe(intf, id, &sd_desc, sizeof (struct sd), + return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), THIS_MODULE); } diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index 52d1b32523b1..25c5245725d6 100644 --- a/drivers/media/video/gspca/sunplus.c +++ b/drivers/media/video/gspca/sunplus.c @@ -24,8 +24,8 @@ #include "gspca.h" #include "jpeg.h" -#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0) -static const char version[] = "2.1.0"; +#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 1) +static const char version[] = "2.1.1"; MODULE_AUTHOR("Michel Xhaard "); MODULE_DESCRIPTION("GSPCA/SPCA5xx USB Camera Driver"); @@ -459,7 +459,7 @@ static int reg_write(struct usb_device *dev, USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, index, NULL, 0, 500); PDEBUG(D_PACK, "reg write: 0x%02x,0x%02x:0x%02x, 0x%x", - reg, index, value, ret); + req, index, value, ret); if (ret < 0) PDEBUG(D_ERR, "reg write: error %d", ret); return ret; -- 2.20.1