Commit bd62bbcd authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab

[media] gspca: Fix some warnings tied to 'no debug'

This patch fixes the warnings raised by unsetting the option GSPCA_DEBUG.
Signed-off-by: default avatarJean-François Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent cf221766
...@@ -499,21 +499,8 @@ MODULE_DEVICE_TABLE(usb, device_table); ...@@ -499,21 +499,8 @@ MODULE_DEVICE_TABLE(usb, device_table);
static int sd_probe(struct usb_interface *intf, static int sd_probe(struct usb_interface *intf,
const struct usb_device_id *id) const struct usb_device_id *id)
{ {
struct gspca_dev *gspca_dev; return gspca_dev_probe(intf, id,
s32 ret;
ret = gspca_dev_probe(intf, id,
&sd_desc_mi1320, sizeof(struct sd), THIS_MODULE); &sd_desc_mi1320, sizeof(struct sd), THIS_MODULE);
if (ret >= 0) {
gspca_dev = usb_get_intfdata(intf);
PDEBUG(D_PROBE,
"Camera is now controlling video device %s",
video_device_node_name(&gspca_dev->vdev));
}
return ret;
} }
static void sd_disconnect(struct usb_interface *intf) static void sd_disconnect(struct usb_interface *intf)
......
...@@ -1375,7 +1375,6 @@ static int sd_config(struct gspca_dev *gspca_dev, ...@@ -1375,7 +1375,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
{ {
struct sd *sd = (struct sd *) gspca_dev; struct sd *sd = (struct sd *) gspca_dev;
struct cam *cam; struct cam *cam;
int data1, data2;
const u16 (*init_data)[2]; const u16 (*init_data)[2];
static const u16 (*(init_data_tb[]))[2] = { static const u16 (*(init_data_tb[]))[2] = {
spca508_vista_init_data, /* CreativeVista 0 */ spca508_vista_init_data, /* CreativeVista 0 */
...@@ -1386,6 +1385,9 @@ static int sd_config(struct gspca_dev *gspca_dev, ...@@ -1386,6 +1385,9 @@ static int sd_config(struct gspca_dev *gspca_dev,
spca508_init_data, /* ViewQuestVQ110 5 */ spca508_init_data, /* ViewQuestVQ110 5 */
}; };
#ifdef GSPCA_DEBUG
int data1, data2;
/* Read from global register the USB product and vendor IDs, just to /* Read from global register the USB product and vendor IDs, just to
* prove that we can communicate with the device. This works, which * prove that we can communicate with the device. This works, which
* confirms at we are communicating properly and that the device * confirms at we are communicating properly and that the device
...@@ -1400,6 +1402,7 @@ static int sd_config(struct gspca_dev *gspca_dev, ...@@ -1400,6 +1402,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
data1 = reg_read(gspca_dev, 0x8621); data1 = reg_read(gspca_dev, 0x8621);
PDEBUG(D_PROBE, "Window 1 average luminance: %d", data1); PDEBUG(D_PROBE, "Window 1 average luminance: %d", data1);
#endif
cam = &gspca_dev->cam; cam = &gspca_dev->cam;
cam->cam_mode = sif_mode; cam->cam_mode = sif_mode;
......
...@@ -6266,7 +6266,6 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev) ...@@ -6266,7 +6266,6 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev)
{ {
struct sd *sd = (struct sd *) gspca_dev; struct sd *sd = (struct sd *) gspca_dev;
int i; int i;
u8 retbyte;
u16 retword; u16 retword;
/*fixme: lack of 8b=b3 (11,12)-> 10, 8b=e0 (14,15,16)-> 12 found in gspcav1*/ /*fixme: lack of 8b=b3 (11,12)-> 10, 8b=e0 (14,15,16)-> 12 found in gspcav1*/
...@@ -6359,8 +6358,12 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev) ...@@ -6359,8 +6358,12 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev)
retword |= i2c_read(gspca_dev, 0x01); /* ID 1 */ retword |= i2c_read(gspca_dev, 0x01); /* ID 1 */
PDEBUG(D_PROBE, "probe 3wr vga 2 0x%04x", retword); PDEBUG(D_PROBE, "probe 3wr vga 2 0x%04x", retword);
if (retword == 0x2030) { if (retword == 0x2030) {
#ifdef GSPCA_DEBUG
u8 retbyte;
retbyte = i2c_read(gspca_dev, 0x02); /* revision number */ retbyte = i2c_read(gspca_dev, 0x02); /* revision number */
PDEBUG(D_PROBE, "sensor PO2030 rev 0x%02x", retbyte); PDEBUG(D_PROBE, "sensor PO2030 rev 0x%02x", retbyte);
#endif
send_unknown(gspca_dev, SENSOR_PO2030); send_unknown(gspca_dev, SENSOR_PO2030);
return retword; return retword;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment