diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-09-13 04:19:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:05:53 -0400 |
commit | 0b656321f338a2e5e3d9a9bdce959a2d76857967 (patch) | |
tree | 2f1581be1e243ace0cb25a255b71aa09fc4aa2ce | |
parent | 548264375b1c0d51b418bf7ab6d2fec647307ab7 (diff) |
V4L/DVB: gspca - all modules: Display error messages when gspca debug disabled
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
35 files changed, 147 insertions, 167 deletions
diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c index 696f2c3ae317..c56bf0f761e2 100644 --- a/drivers/media/video/gspca/cpia1.c +++ b/drivers/media/video/gspca/cpia1.c | |||
@@ -510,7 +510,7 @@ retry: | |||
510 | gspca_dev->usb_buf, databytes, 1000); | 510 | gspca_dev->usb_buf, databytes, 1000); |
511 | 511 | ||
512 | if (ret < 0) | 512 | if (ret < 0) |
513 | PDEBUG(D_ERR, "usb_control_msg %02x, error %d", command[1], | 513 | err("usb_control_msg %02x, error %d", command[1], |
514 | ret); | 514 | ret); |
515 | 515 | ||
516 | if (ret == -EPIPE && retries > 0) { | 516 | if (ret == -EPIPE && retries > 0) { |
@@ -1236,7 +1236,7 @@ static void monitor_exposure(struct gspca_dev *gspca_dev) | |||
1236 | cmd[7] = 0; | 1236 | cmd[7] = 0; |
1237 | ret = cpia_usb_transferCmd(gspca_dev, cmd); | 1237 | ret = cpia_usb_transferCmd(gspca_dev, cmd); |
1238 | if (ret) { | 1238 | if (ret) { |
1239 | PDEBUG(D_ERR, "ReadVPRegs(30,4,9,8) - failed: %d", ret); | 1239 | err("ReadVPRegs(30,4,9,8) - failed: %d", ret); |
1240 | return; | 1240 | return; |
1241 | } | 1241 | } |
1242 | exp_acc = gspca_dev->usb_buf[0]; | 1242 | exp_acc = gspca_dev->usb_buf[0]; |
diff --git a/drivers/media/video/gspca/finepix.c b/drivers/media/video/gspca/finepix.c index 9b915ae50eb7..d78226455d1f 100644 --- a/drivers/media/video/gspca/finepix.c +++ b/drivers/media/video/gspca/finepix.c | |||
@@ -182,7 +182,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
182 | /* Init the device */ | 182 | /* Init the device */ |
183 | ret = command(gspca_dev, 0); | 183 | ret = command(gspca_dev, 0); |
184 | if (ret < 0) { | 184 | if (ret < 0) { |
185 | PDEBUG(D_STREAM, "init failed %d", ret); | 185 | err("init failed %d", ret); |
186 | return ret; | 186 | return ret; |
187 | } | 187 | } |
188 | 188 | ||
@@ -194,14 +194,14 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
194 | FPIX_MAX_TRANSFER, &len, | 194 | FPIX_MAX_TRANSFER, &len, |
195 | FPIX_TIMEOUT); | 195 | FPIX_TIMEOUT); |
196 | if (ret < 0) { | 196 | if (ret < 0) { |
197 | PDEBUG(D_STREAM, "usb_bulk_msg failed %d", ret); | 197 | err("usb_bulk_msg failed %d", ret); |
198 | return ret; | 198 | return ret; |
199 | } | 199 | } |
200 | 200 | ||
201 | /* Request a frame, but don't read it */ | 201 | /* Request a frame, but don't read it */ |
202 | ret = command(gspca_dev, 1); | 202 | ret = command(gspca_dev, 1); |
203 | if (ret < 0) { | 203 | if (ret < 0) { |
204 | PDEBUG(D_STREAM, "frame request failed %d", ret); | 204 | err("frame request failed %d", ret); |
205 | return ret; | 205 | return ret; |
206 | } | 206 | } |
207 | 207 | ||
diff --git a/drivers/media/video/gspca/gl860/gl860.c b/drivers/media/video/gspca/gl860/gl860.c index 04bc805fb176..b05bec7321b5 100644 --- a/drivers/media/video/gspca/gl860/gl860.c +++ b/drivers/media/video/gspca/gl860/gl860.c | |||
@@ -585,8 +585,7 @@ int gl860_RTx(struct gspca_dev *gspca_dev, | |||
585 | } | 585 | } |
586 | 586 | ||
587 | if (r < 0) | 587 | if (r < 0) |
588 | PDEBUG(D_ERR, | 588 | err("ctrl transfer failed %4d " |
589 | "ctrl transfer failed %4d " | ||
590 | "[p%02x r%d v%04x i%04x len%d]", | 589 | "[p%02x r%d v%04x i%04x len%d]", |
591 | r, pref, req, val, index, len); | 590 | r, pref, req, val, index, len); |
592 | else if (len > 1 && r < len) | 591 | else if (len > 1 && r < len) |
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 4609f0e38930..90f058bda7da 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -148,7 +148,7 @@ static void int_irq(struct urb *urb) | |||
148 | if (ret == 0) { | 148 | if (ret == 0) { |
149 | ret = usb_submit_urb(urb, GFP_ATOMIC); | 149 | ret = usb_submit_urb(urb, GFP_ATOMIC); |
150 | if (ret < 0) | 150 | if (ret < 0) |
151 | PDEBUG(D_ERR, "Resubmit URB failed with error %i", ret); | 151 | err("Resubmit URB failed with error %i", ret); |
152 | } | 152 | } |
153 | } | 153 | } |
154 | 154 | ||
@@ -177,8 +177,8 @@ static int gspca_input_connect(struct gspca_dev *dev) | |||
177 | 177 | ||
178 | err = input_register_device(input_dev); | 178 | err = input_register_device(input_dev); |
179 | if (err) { | 179 | if (err) { |
180 | PDEBUG(D_ERR, "Input device registration failed " | 180 | err("Input device registration failed with error %i", |
181 | "with error %i", err); | 181 | err); |
182 | input_dev->dev.parent = NULL; | 182 | input_dev->dev.parent = NULL; |
183 | input_free_device(input_dev); | 183 | input_free_device(input_dev); |
184 | } else { | 184 | } else { |
@@ -328,8 +328,7 @@ static void fill_frame(struct gspca_dev *gspca_dev, | |||
328 | } | 328 | } |
329 | st = urb->iso_frame_desc[i].status; | 329 | st = urb->iso_frame_desc[i].status; |
330 | if (st) { | 330 | if (st) { |
331 | PDEBUG(D_ERR, | 331 | err("ISOC data error: [%d] len=%d, status=%d", |
332 | "ISOC data error: [%d] len=%d, status=%d", | ||
333 | i, len, st); | 332 | i, len, st); |
334 | gspca_dev->last_packet_type = DISCARD_PACKET; | 333 | gspca_dev->last_packet_type = DISCARD_PACKET; |
335 | continue; | 334 | continue; |
@@ -347,7 +346,7 @@ resubmit: | |||
347 | /* resubmit the URB */ | 346 | /* resubmit the URB */ |
348 | st = usb_submit_urb(urb, GFP_ATOMIC); | 347 | st = usb_submit_urb(urb, GFP_ATOMIC); |
349 | if (st < 0) | 348 | if (st < 0) |
350 | PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", st); | 349 | err("usb_submit_urb() ret %d", st); |
351 | } | 350 | } |
352 | 351 | ||
353 | /* | 352 | /* |
@@ -401,7 +400,7 @@ resubmit: | |||
401 | if (gspca_dev->cam.bulk_nurbs != 0) { | 400 | if (gspca_dev->cam.bulk_nurbs != 0) { |
402 | st = usb_submit_urb(urb, GFP_ATOMIC); | 401 | st = usb_submit_urb(urb, GFP_ATOMIC); |
403 | if (st < 0) | 402 | if (st < 0) |
404 | PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", st); | 403 | err("usb_submit_urb() ret %d", st); |
405 | } | 404 | } |
406 | } | 405 | } |
407 | 406 | ||
@@ -590,7 +589,7 @@ static int gspca_set_alt0(struct gspca_dev *gspca_dev) | |||
590 | return 0; | 589 | return 0; |
591 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 0); | 590 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 0); |
592 | if (ret < 0) | 591 | if (ret < 0) |
593 | PDEBUG(D_ERR|D_STREAM, "set alt 0 err %d", ret); | 592 | err("set alt 0 err %d", ret); |
594 | return ret; | 593 | return ret; |
595 | } | 594 | } |
596 | 595 | ||
@@ -850,8 +849,7 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) | |||
850 | break; | 849 | break; |
851 | gspca_stream_off(gspca_dev); | 850 | gspca_stream_off(gspca_dev); |
852 | if (ret != -ENOSPC) { | 851 | if (ret != -ENOSPC) { |
853 | PDEBUG(D_ERR|D_STREAM, | 852 | err("usb_submit_urb alt %d err %d", |
854 | "usb_submit_urb alt %d err %d", | ||
855 | gspca_dev->alt, ret); | 853 | gspca_dev->alt, ret); |
856 | goto out; | 854 | goto out; |
857 | } | 855 | } |
@@ -2243,7 +2241,7 @@ int gspca_dev_probe(struct usb_interface *intf, | |||
2243 | 2241 | ||
2244 | /* we don't handle multi-config cameras */ | 2242 | /* we don't handle multi-config cameras */ |
2245 | if (dev->descriptor.bNumConfigurations != 1) { | 2243 | if (dev->descriptor.bNumConfigurations != 1) { |
2246 | PDEBUG(D_ERR, "%04x:%04x too many config", | 2244 | err("%04x:%04x too many config", |
2247 | id->idVendor, id->idProduct); | 2245 | id->idVendor, id->idProduct); |
2248 | return -ENODEV; | 2246 | return -ENODEV; |
2249 | } | 2247 | } |
diff --git a/drivers/media/video/gspca/jeilinj.c b/drivers/media/video/gspca/jeilinj.c index c468af5245c2..a35e87bb0388 100644 --- a/drivers/media/video/gspca/jeilinj.c +++ b/drivers/media/video/gspca/jeilinj.c | |||
@@ -82,7 +82,7 @@ static int jlj_write2(struct gspca_dev *gspca_dev, unsigned char *command) | |||
82 | usb_sndbulkpipe(gspca_dev->dev, 3), | 82 | usb_sndbulkpipe(gspca_dev->dev, 3), |
83 | gspca_dev->usb_buf, 2, NULL, 500); | 83 | gspca_dev->usb_buf, 2, NULL, 500); |
84 | if (retval < 0) | 84 | if (retval < 0) |
85 | PDEBUG(D_ERR, "command write [%02x] error %d", | 85 | err("command write [%02x] error %d", |
86 | gspca_dev->usb_buf[0], retval); | 86 | gspca_dev->usb_buf[0], retval); |
87 | return retval; | 87 | return retval; |
88 | } | 88 | } |
@@ -97,7 +97,7 @@ static int jlj_read1(struct gspca_dev *gspca_dev, unsigned char response) | |||
97 | gspca_dev->usb_buf, 1, NULL, 500); | 97 | gspca_dev->usb_buf, 1, NULL, 500); |
98 | response = gspca_dev->usb_buf[0]; | 98 | response = gspca_dev->usb_buf[0]; |
99 | if (retval < 0) | 99 | if (retval < 0) |
100 | PDEBUG(D_ERR, "read command [%02x] error %d", | 100 | err("read command [%02x] error %d", |
101 | gspca_dev->usb_buf[0], retval); | 101 | gspca_dev->usb_buf[0], retval); |
102 | return retval; | 102 | return retval; |
103 | } | 103 | } |
@@ -191,7 +191,7 @@ static void jlj_dostream(struct work_struct *work) | |||
191 | 191 | ||
192 | buffer = kmalloc(JEILINJ_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); | 192 | buffer = kmalloc(JEILINJ_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); |
193 | if (!buffer) { | 193 | if (!buffer) { |
194 | PDEBUG(D_ERR, "Couldn't allocate USB buffer"); | 194 | err("Couldn't allocate USB buffer"); |
195 | goto quit_stream; | 195 | goto quit_stream; |
196 | } | 196 | } |
197 | while (gspca_dev->present && gspca_dev->streaming) { | 197 | while (gspca_dev->present && gspca_dev->streaming) { |
diff --git a/drivers/media/video/gspca/konica.c b/drivers/media/video/gspca/konica.c index 3a07096e7088..31ea306abccf 100644 --- a/drivers/media/video/gspca/konica.c +++ b/drivers/media/video/gspca/konica.c | |||
@@ -200,7 +200,7 @@ static void reg_w(struct gspca_dev *gspca_dev, u16 value, u16 index) | |||
200 | 0, | 200 | 0, |
201 | 1000); | 201 | 1000); |
202 | if (ret < 0) { | 202 | if (ret < 0) { |
203 | PDEBUG(D_ERR, "reg_w err %d", ret); | 203 | err("reg_w err %d", ret); |
204 | gspca_dev->usb_err = ret; | 204 | gspca_dev->usb_err = ret; |
205 | } | 205 | } |
206 | } | 206 | } |
@@ -221,7 +221,7 @@ static void reg_r(struct gspca_dev *gspca_dev, u16 value, u16 index) | |||
221 | 2, | 221 | 2, |
222 | 1000); | 222 | 1000); |
223 | if (ret < 0) { | 223 | if (ret < 0) { |
224 | PDEBUG(D_ERR, "reg_w err %d", ret); | 224 | err("reg_w err %d", ret); |
225 | gspca_dev->usb_err = ret; | 225 | gspca_dev->usb_err = ret; |
226 | } | 226 | } |
227 | } | 227 | } |
@@ -284,7 +284,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
284 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); | 284 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); |
285 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); | 285 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); |
286 | if (!alt) { | 286 | if (!alt) { |
287 | PDEBUG(D_ERR, "Couldn't get altsetting"); | 287 | err("Couldn't get altsetting"); |
288 | return -EIO; | 288 | return -EIO; |
289 | } | 289 | } |
290 | 290 | ||
@@ -386,7 +386,7 @@ static void sd_isoc_irq(struct urb *urb) | |||
386 | PDEBUG(D_ERR, "urb status: %d", urb->status); | 386 | PDEBUG(D_ERR, "urb status: %d", urb->status); |
387 | st = usb_submit_urb(urb, GFP_ATOMIC); | 387 | st = usb_submit_urb(urb, GFP_ATOMIC); |
388 | if (st < 0) | 388 | if (st < 0) |
389 | PDEBUG(D_ERR|D_PACK, "resubmit urb error %d", st); | 389 | err("resubmit urb error %d", st); |
390 | return; | 390 | return; |
391 | } | 391 | } |
392 | 392 | ||
@@ -477,7 +477,7 @@ resubmit: | |||
477 | } | 477 | } |
478 | st = usb_submit_urb(status_urb, GFP_ATOMIC); | 478 | st = usb_submit_urb(status_urb, GFP_ATOMIC); |
479 | if (st < 0) | 479 | if (st < 0) |
480 | PDEBUG(D_ERR|D_PACK, "usb_submit_urb(status_urb) ret %d", st); | 480 | err("usb_submit_urb(status_urb) ret %d", st); |
481 | } | 481 | } |
482 | 482 | ||
483 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) | 483 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) |
diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c index e21172ef9dee..45be6a872795 100644 --- a/drivers/media/video/gspca/mars.c +++ b/drivers/media/video/gspca/mars.c | |||
@@ -150,7 +150,7 @@ static int reg_w(struct gspca_dev *gspca_dev, | |||
150 | &alen, | 150 | &alen, |
151 | 500); /* timeout in milliseconds */ | 151 | 500); /* timeout in milliseconds */ |
152 | if (ret < 0) | 152 | if (ret < 0) |
153 | PDEBUG(D_ERR, "reg write [%02x] error %d", | 153 | err("reg write [%02x] error %d", |
154 | gspca_dev->usb_buf[0], ret); | 154 | gspca_dev->usb_buf[0], ret); |
155 | return ret; | 155 | return ret; |
156 | } | 156 | } |
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c index f325b6772515..c6e699b80f12 100644 --- a/drivers/media/video/gspca/mr97310a.c +++ b/drivers/media/video/gspca/mr97310a.c | |||
@@ -267,7 +267,7 @@ static int mr_write(struct gspca_dev *gspca_dev, int len) | |||
267 | usb_sndbulkpipe(gspca_dev->dev, 4), | 267 | usb_sndbulkpipe(gspca_dev->dev, 4), |
268 | gspca_dev->usb_buf, len, NULL, 500); | 268 | gspca_dev->usb_buf, len, NULL, 500); |
269 | if (rc < 0) | 269 | if (rc < 0) |
270 | PDEBUG(D_ERR, "reg write [%02x] error %d", | 270 | err("reg write [%02x] error %d", |
271 | gspca_dev->usb_buf[0], rc); | 271 | gspca_dev->usb_buf[0], rc); |
272 | return rc; | 272 | return rc; |
273 | } | 273 | } |
@@ -281,7 +281,7 @@ static int mr_read(struct gspca_dev *gspca_dev, int len) | |||
281 | usb_rcvbulkpipe(gspca_dev->dev, 3), | 281 | usb_rcvbulkpipe(gspca_dev->dev, 3), |
282 | gspca_dev->usb_buf, len, NULL, 500); | 282 | gspca_dev->usb_buf, len, NULL, 500); |
283 | if (rc < 0) | 283 | if (rc < 0) |
284 | PDEBUG(D_ERR, "reg read [%02x] error %d", | 284 | err("reg read [%02x] error %d", |
285 | gspca_dev->usb_buf[0], rc); | 285 | gspca_dev->usb_buf[0], rc); |
286 | return rc; | 286 | return rc; |
287 | } | 287 | } |
@@ -540,7 +540,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
540 | sd->sensor_type = 1; | 540 | sd->sensor_type = 1; |
541 | break; | 541 | break; |
542 | default: | 542 | default: |
543 | PDEBUG(D_ERR, "Unknown CIF Sensor id : %02x", | 543 | err("Unknown CIF Sensor id : %02x", |
544 | gspca_dev->usb_buf[1]); | 544 | gspca_dev->usb_buf[1]); |
545 | return -ENODEV; | 545 | return -ENODEV; |
546 | } | 546 | } |
@@ -575,10 +575,10 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
575 | sd->sensor_type = 2; | 575 | sd->sensor_type = 2; |
576 | } else if ((gspca_dev->usb_buf[0] != 0x03) && | 576 | } else if ((gspca_dev->usb_buf[0] != 0x03) && |
577 | (gspca_dev->usb_buf[0] != 0x04)) { | 577 | (gspca_dev->usb_buf[0] != 0x04)) { |
578 | PDEBUG(D_ERR, "Unknown VGA Sensor id Byte 0: %02x", | 578 | err("Unknown VGA Sensor id Byte 0: %02x", |
579 | gspca_dev->usb_buf[0]); | 579 | gspca_dev->usb_buf[0]); |
580 | PDEBUG(D_ERR, "Defaults assumed, may not work"); | 580 | err("Defaults assumed, may not work"); |
581 | PDEBUG(D_ERR, "Please report this"); | 581 | err("Please report this"); |
582 | } | 582 | } |
583 | /* Sakar Digital color needs to be adjusted. */ | 583 | /* Sakar Digital color needs to be adjusted. */ |
584 | if ((gspca_dev->usb_buf[0] == 0x03) && | 584 | if ((gspca_dev->usb_buf[0] == 0x03) && |
@@ -595,12 +595,10 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
595 | /* Nothing to do here. */ | 595 | /* Nothing to do here. */ |
596 | break; | 596 | break; |
597 | default: | 597 | default: |
598 | PDEBUG(D_ERR, | 598 | err("Unknown VGA Sensor id Byte 1: %02x", |
599 | "Unknown VGA Sensor id Byte 1: %02x", | ||
600 | gspca_dev->usb_buf[1]); | 599 | gspca_dev->usb_buf[1]); |
601 | PDEBUG(D_ERR, | 600 | err("Defaults assumed, may not work"); |
602 | "Defaults assumed, may not work"); | 601 | err("Please report this"); |
603 | PDEBUG(D_ERR, "Please report this"); | ||
604 | } | 602 | } |
605 | } | 603 | } |
606 | PDEBUG(D_PROBE, "MR97310A VGA camera detected, sensor: %d", | 604 | PDEBUG(D_PROBE, "MR97310A VGA camera detected, sensor: %d", |
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index a8ac24a7af8e..307bc8b7b80c 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -1900,7 +1900,7 @@ static int reg_w(struct sd *sd, __u16 index, __u16 value) | |||
1900 | sd->gspca_dev.usb_buf, 1, 500); | 1900 | sd->gspca_dev.usb_buf, 1, 500); |
1901 | leave: | 1901 | leave: |
1902 | if (ret < 0) { | 1902 | if (ret < 0) { |
1903 | PDEBUG(D_ERR, "Write reg 0x%04x -> [0x%02x] failed", | 1903 | err("Write reg 0x%04x -> [0x%02x] failed", |
1904 | value, index); | 1904 | value, index); |
1905 | return ret; | 1905 | return ret; |
1906 | } | 1906 | } |
@@ -1938,7 +1938,7 @@ static int reg_r(struct sd *sd, __u16 index) | |||
1938 | ret = sd->gspca_dev.usb_buf[0]; | 1938 | ret = sd->gspca_dev.usb_buf[0]; |
1939 | PDEBUG(D_USBI, "Read reg [0x%02X] -> 0x%04X", index, ret); | 1939 | PDEBUG(D_USBI, "Read reg [0x%02X] -> 0x%04X", index, ret); |
1940 | } else | 1940 | } else |
1941 | PDEBUG(D_ERR, "Read reg [0x%02x] failed", index); | 1941 | err("Read reg [0x%02x] failed", index); |
1942 | 1942 | ||
1943 | return ret; | 1943 | return ret; |
1944 | } | 1944 | } |
@@ -1958,7 +1958,7 @@ static int reg_r8(struct sd *sd, | |||
1958 | if (ret >= 0) | 1958 | if (ret >= 0) |
1959 | ret = sd->gspca_dev.usb_buf[0]; | 1959 | ret = sd->gspca_dev.usb_buf[0]; |
1960 | else | 1960 | else |
1961 | PDEBUG(D_ERR, "Read reg 8 [0x%02x] failed", index); | 1961 | err("Read reg 8 [0x%02x] failed", index); |
1962 | 1962 | ||
1963 | return ret; | 1963 | return ret; |
1964 | } | 1964 | } |
@@ -2006,7 +2006,7 @@ static int ov518_reg_w32(struct sd *sd, __u16 index, u32 value, int n) | |||
2006 | 0, index, | 2006 | 0, index, |
2007 | sd->gspca_dev.usb_buf, n, 500); | 2007 | sd->gspca_dev.usb_buf, n, 500); |
2008 | if (ret < 0) { | 2008 | if (ret < 0) { |
2009 | PDEBUG(D_ERR, "Write reg32 [%02x] %08x failed", index, value); | 2009 | err("Write reg32 [%02x] %08x failed", index, value); |
2010 | return ret; | 2010 | return ret; |
2011 | } | 2011 | } |
2012 | 2012 | ||
@@ -2203,7 +2203,7 @@ static int ovfx2_i2c_w(struct sd *sd, __u8 reg, __u8 value) | |||
2203 | (__u16)value, (__u16)reg, NULL, 0, 500); | 2203 | (__u16)value, (__u16)reg, NULL, 0, 500); |
2204 | 2204 | ||
2205 | if (ret < 0) { | 2205 | if (ret < 0) { |
2206 | PDEBUG(D_ERR, "i2c 0x%02x -> [0x%02x] failed", value, reg); | 2206 | err("i2c 0x%02x -> [0x%02x] failed", value, reg); |
2207 | return ret; | 2207 | return ret; |
2208 | } | 2208 | } |
2209 | 2209 | ||
@@ -2225,7 +2225,7 @@ static int ovfx2_i2c_r(struct sd *sd, __u8 reg) | |||
2225 | ret = sd->gspca_dev.usb_buf[0]; | 2225 | ret = sd->gspca_dev.usb_buf[0]; |
2226 | PDEBUG(D_USBI, "i2c [0x%02X] -> 0x%02X", reg, ret); | 2226 | PDEBUG(D_USBI, "i2c [0x%02X] -> 0x%02X", reg, ret); |
2227 | } else | 2227 | } else |
2228 | PDEBUG(D_ERR, "i2c read [0x%02x] failed", reg); | 2228 | err("i2c read [0x%02x] failed", reg); |
2229 | 2229 | ||
2230 | return ret; | 2230 | return ret; |
2231 | } | 2231 | } |
@@ -2481,7 +2481,7 @@ static int ov_hires_configure(struct sd *sd) | |||
2481 | int high, low; | 2481 | int high, low; |
2482 | 2482 | ||
2483 | if (sd->bridge != BRIDGE_OVFX2) { | 2483 | if (sd->bridge != BRIDGE_OVFX2) { |
2484 | PDEBUG(D_ERR, "error hires sensors only supported with ovfx2"); | 2484 | err("error hires sensors only supported with ovfx2"); |
2485 | return -1; | 2485 | return -1; |
2486 | } | 2486 | } |
2487 | 2487 | ||
@@ -2498,7 +2498,7 @@ static int ov_hires_configure(struct sd *sd) | |||
2498 | PDEBUG(D_PROBE, "Sensor is an OV3610"); | 2498 | PDEBUG(D_PROBE, "Sensor is an OV3610"); |
2499 | sd->sensor = SEN_OV3610; | 2499 | sd->sensor = SEN_OV3610; |
2500 | } else { | 2500 | } else { |
2501 | PDEBUG(D_ERR, "Error unknown sensor type: 0x%02x%02x", | 2501 | err("Error unknown sensor type: 0x%02x%02x", |
2502 | high, low); | 2502 | high, low); |
2503 | return -1; | 2503 | return -1; |
2504 | } | 2504 | } |
@@ -2526,7 +2526,7 @@ static int ov8xx0_configure(struct sd *sd) | |||
2526 | if ((rc & 3) == 1) { | 2526 | if ((rc & 3) == 1) { |
2527 | sd->sensor = SEN_OV8610; | 2527 | sd->sensor = SEN_OV8610; |
2528 | } else { | 2528 | } else { |
2529 | PDEBUG(D_ERR, "Unknown image sensor version: %d", rc & 3); | 2529 | err("Unknown image sensor version: %d", rc & 3); |
2530 | return -1; | 2530 | return -1; |
2531 | } | 2531 | } |
2532 | 2532 | ||
@@ -2589,9 +2589,8 @@ static int ov7xx0_configure(struct sd *sd) | |||
2589 | if (high == 0x76) { | 2589 | if (high == 0x76) { |
2590 | switch (low) { | 2590 | switch (low) { |
2591 | case 0x30: | 2591 | case 0x30: |
2592 | PDEBUG(D_PROBE, "Sensor is an OV7630/OV7635"); | 2592 | err("Sensor is an OV7630/OV7635"); |
2593 | PDEBUG(D_ERR, | 2593 | err("7630 is not supported by this driver"); |
2594 | "7630 is not supported by this driver"); | ||
2595 | return -1; | 2594 | return -1; |
2596 | case 0x40: | 2595 | case 0x40: |
2597 | PDEBUG(D_PROBE, "Sensor is an OV7645"); | 2596 | PDEBUG(D_PROBE, "Sensor is an OV7645"); |
@@ -2614,7 +2613,7 @@ static int ov7xx0_configure(struct sd *sd) | |||
2614 | sd->sensor = SEN_OV7620; | 2613 | sd->sensor = SEN_OV7620; |
2615 | } | 2614 | } |
2616 | } else { | 2615 | } else { |
2617 | PDEBUG(D_ERR, "Unknown image sensor version: %d", rc & 3); | 2616 | err("Unknown image sensor version: %d", rc & 3); |
2618 | return -1; | 2617 | return -1; |
2619 | } | 2618 | } |
2620 | 2619 | ||
@@ -2641,9 +2640,8 @@ static int ov6xx0_configure(struct sd *sd) | |||
2641 | switch (rc) { | 2640 | switch (rc) { |
2642 | case 0x00: | 2641 | case 0x00: |
2643 | sd->sensor = SEN_OV6630; | 2642 | sd->sensor = SEN_OV6630; |
2644 | PDEBUG(D_ERR, | 2643 | warn("WARNING: Sensor is an OV66308. Your camera may have"); |
2645 | "WARNING: Sensor is an OV66308. Your camera may have"); | 2644 | warn("been misdetected in previous driver versions."); |
2646 | PDEBUG(D_ERR, "been misdetected in previous driver versions."); | ||
2647 | break; | 2645 | break; |
2648 | case 0x01: | 2646 | case 0x01: |
2649 | sd->sensor = SEN_OV6620; | 2647 | sd->sensor = SEN_OV6620; |
@@ -2659,12 +2657,11 @@ static int ov6xx0_configure(struct sd *sd) | |||
2659 | break; | 2657 | break; |
2660 | case 0x90: | 2658 | case 0x90: |
2661 | sd->sensor = SEN_OV6630; | 2659 | sd->sensor = SEN_OV6630; |
2662 | PDEBUG(D_ERR, | 2660 | warn("WARNING: Sensor is an OV66307. Your camera may have"); |
2663 | "WARNING: Sensor is an OV66307. Your camera may have"); | 2661 | warn("been misdetected in previous driver versions."); |
2664 | PDEBUG(D_ERR, "been misdetected in previous driver versions."); | ||
2665 | break; | 2662 | break; |
2666 | default: | 2663 | default: |
2667 | PDEBUG(D_ERR, "FATAL: Unknown sensor version: 0x%02x", rc); | 2664 | err("FATAL: Unknown sensor version: 0x%02x", rc); |
2668 | return -1; | 2665 | return -1; |
2669 | } | 2666 | } |
2670 | 2667 | ||
@@ -3082,7 +3079,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
3082 | goto error; | 3079 | goto error; |
3083 | } | 3080 | } |
3084 | } else { | 3081 | } else { |
3085 | PDEBUG(D_ERR, "Can't determine sensor slave IDs"); | 3082 | err("Can't determine sensor slave IDs"); |
3086 | goto error; | 3083 | goto error; |
3087 | } | 3084 | } |
3088 | 3085 | ||
@@ -3253,7 +3250,7 @@ static int ov511_mode_init_regs(struct sd *sd) | |||
3253 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); | 3250 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); |
3254 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); | 3251 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); |
3255 | if (!alt) { | 3252 | if (!alt) { |
3256 | PDEBUG(D_ERR, "Couldn't get altsetting"); | 3253 | err("Couldn't get altsetting"); |
3257 | return -EIO; | 3254 | return -EIO; |
3258 | } | 3255 | } |
3259 | 3256 | ||
@@ -3377,7 +3374,7 @@ static int ov518_mode_init_regs(struct sd *sd) | |||
3377 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); | 3374 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); |
3378 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); | 3375 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); |
3379 | if (!alt) { | 3376 | if (!alt) { |
3380 | PDEBUG(D_ERR, "Couldn't get altsetting"); | 3377 | err("Couldn't get altsetting"); |
3381 | return -EIO; | 3378 | return -EIO; |
3382 | } | 3379 | } |
3383 | 3380 | ||
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c index b6ed9d0956a0..88ef03f6235b 100644 --- a/drivers/media/video/gspca/ov534.c +++ b/drivers/media/video/gspca/ov534.c | |||
@@ -487,7 +487,7 @@ static void ov534_reg_write(struct gspca_dev *gspca_dev, u16 reg, u8 val) | |||
487 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 487 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
488 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 488 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
489 | if (ret < 0) | 489 | if (ret < 0) |
490 | PDEBUG(D_ERR, "write failed"); | 490 | err("write failed %d", ret); |
491 | } | 491 | } |
492 | 492 | ||
493 | static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg) | 493 | static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg) |
@@ -502,7 +502,7 @@ static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg) | |||
502 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 502 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
503 | PDEBUG(D_USBI, "reg=0x%04x, data=0x%02x", reg, gspca_dev->usb_buf[0]); | 503 | PDEBUG(D_USBI, "reg=0x%04x, data=0x%02x", reg, gspca_dev->usb_buf[0]); |
504 | if (ret < 0) | 504 | if (ret < 0) |
505 | PDEBUG(D_ERR, "read failed"); | 505 | err("read failed %d", ret); |
506 | return gspca_dev->usb_buf[0]; | 506 | return gspca_dev->usb_buf[0]; |
507 | } | 507 | } |
508 | 508 | ||
@@ -564,7 +564,7 @@ static void sccb_reg_write(struct gspca_dev *gspca_dev, u8 reg, u8 val) | |||
564 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); | 564 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); |
565 | 565 | ||
566 | if (!sccb_check_status(gspca_dev)) | 566 | if (!sccb_check_status(gspca_dev)) |
567 | PDEBUG(D_ERR, "sccb_reg_write failed"); | 567 | err("sccb_reg_write failed"); |
568 | } | 568 | } |
569 | 569 | ||
570 | static u8 sccb_reg_read(struct gspca_dev *gspca_dev, u16 reg) | 570 | static u8 sccb_reg_read(struct gspca_dev *gspca_dev, u16 reg) |
@@ -572,11 +572,11 @@ static u8 sccb_reg_read(struct gspca_dev *gspca_dev, u16 reg) | |||
572 | ov534_reg_write(gspca_dev, OV534_REG_SUBADDR, reg); | 572 | ov534_reg_write(gspca_dev, OV534_REG_SUBADDR, reg); |
573 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); | 573 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); |
574 | if (!sccb_check_status(gspca_dev)) | 574 | if (!sccb_check_status(gspca_dev)) |
575 | PDEBUG(D_ERR, "sccb_reg_read failed 1"); | 575 | err("sccb_reg_read failed 1"); |
576 | 576 | ||
577 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); | 577 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); |
578 | if (!sccb_check_status(gspca_dev)) | 578 | if (!sccb_check_status(gspca_dev)) |
579 | PDEBUG(D_ERR, "sccb_reg_read failed 2"); | 579 | err("sccb_reg_read failed 2"); |
580 | 580 | ||
581 | return ov534_reg_read(gspca_dev, OV534_REG_READ); | 581 | return ov534_reg_read(gspca_dev, OV534_REG_READ); |
582 | } | 582 | } |
diff --git a/drivers/media/video/gspca/ov534_9.c b/drivers/media/video/gspca/ov534_9.c index 59e50df2dbdd..e831f0d280ea 100644 --- a/drivers/media/video/gspca/ov534_9.c +++ b/drivers/media/video/gspca/ov534_9.c | |||
@@ -785,7 +785,7 @@ static void reg_w_i(struct gspca_dev *gspca_dev, u16 reg, u8 val) | |||
785 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 785 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
786 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 786 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
787 | if (ret < 0) { | 787 | if (ret < 0) { |
788 | PDEBUG(D_ERR, "reg_w failed %d", ret); | 788 | err("reg_w failed %d", ret); |
789 | gspca_dev->usb_err = ret; | 789 | gspca_dev->usb_err = ret; |
790 | } | 790 | } |
791 | } | 791 | } |
@@ -810,7 +810,7 @@ static u8 reg_r(struct gspca_dev *gspca_dev, u16 reg) | |||
810 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 810 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
811 | PDEBUG(D_USBI, "reg_r [%04x] -> %02x", reg, gspca_dev->usb_buf[0]); | 811 | PDEBUG(D_USBI, "reg_r [%04x] -> %02x", reg, gspca_dev->usb_buf[0]); |
812 | if (ret < 0) { | 812 | if (ret < 0) { |
813 | PDEBUG(D_ERR, "reg_r err %d", ret); | 813 | err("reg_r err %d", ret); |
814 | gspca_dev->usb_err = ret; | 814 | gspca_dev->usb_err = ret; |
815 | } | 815 | } |
816 | return gspca_dev->usb_buf[0]; | 816 | return gspca_dev->usb_buf[0]; |
@@ -848,7 +848,7 @@ static void sccb_write(struct gspca_dev *gspca_dev, u8 reg, u8 val) | |||
848 | reg_w_i(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); | 848 | reg_w_i(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); |
849 | 849 | ||
850 | if (!sccb_check_status(gspca_dev)) | 850 | if (!sccb_check_status(gspca_dev)) |
851 | PDEBUG(D_ERR, "sccb_write failed"); | 851 | err("sccb_write failed"); |
852 | } | 852 | } |
853 | 853 | ||
854 | static u8 sccb_read(struct gspca_dev *gspca_dev, u16 reg) | 854 | static u8 sccb_read(struct gspca_dev *gspca_dev, u16 reg) |
@@ -856,11 +856,11 @@ static u8 sccb_read(struct gspca_dev *gspca_dev, u16 reg) | |||
856 | reg_w(gspca_dev, OV534_REG_SUBADDR, reg); | 856 | reg_w(gspca_dev, OV534_REG_SUBADDR, reg); |
857 | reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); | 857 | reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); |
858 | if (!sccb_check_status(gspca_dev)) | 858 | if (!sccb_check_status(gspca_dev)) |
859 | PDEBUG(D_ERR, "sccb_read failed 1"); | 859 | err("sccb_read failed 1"); |
860 | 860 | ||
861 | reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); | 861 | reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); |
862 | if (!sccb_check_status(gspca_dev)) | 862 | if (!sccb_check_status(gspca_dev)) |
863 | PDEBUG(D_ERR, "sccb_read failed 2"); | 863 | err("sccb_read failed 2"); |
864 | 864 | ||
865 | return reg_r(gspca_dev, OV534_REG_READ); | 865 | return reg_r(gspca_dev, OV534_REG_READ); |
866 | } | 866 | } |
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 8c711dfb3902..c8da04bd115c 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c | |||
@@ -178,8 +178,7 @@ static int pac207_write_regs(struct gspca_dev *gspca_dev, u16 index, | |||
178 | 0x00, index, | 178 | 0x00, index, |
179 | gspca_dev->usb_buf, length, PAC207_CTRL_TIMEOUT); | 179 | gspca_dev->usb_buf, length, PAC207_CTRL_TIMEOUT); |
180 | if (err < 0) | 180 | if (err < 0) |
181 | PDEBUG(D_ERR, | 181 | err("Failed to write registers to index 0x%04X, error %d)", |
182 | "Failed to write registers to index 0x%04X, error %d)", | ||
183 | index, err); | 182 | index, err); |
184 | 183 | ||
185 | return err; | 184 | return err; |
@@ -195,7 +194,7 @@ static int pac207_write_reg(struct gspca_dev *gspca_dev, u16 index, u16 value) | |||
195 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 194 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
196 | value, index, NULL, 0, PAC207_CTRL_TIMEOUT); | 195 | value, index, NULL, 0, PAC207_CTRL_TIMEOUT); |
197 | if (err) | 196 | if (err) |
198 | PDEBUG(D_ERR, "Failed to write a register (index 0x%04X," | 197 | err("Failed to write a register (index 0x%04X," |
199 | " value 0x%02X, error %d)", index, value, err); | 198 | " value 0x%02X, error %d)", index, value, err); |
200 | 199 | ||
201 | return err; | 200 | return err; |
@@ -211,8 +210,7 @@ static int pac207_read_reg(struct gspca_dev *gspca_dev, u16 index) | |||
211 | 0x00, index, | 210 | 0x00, index, |
212 | gspca_dev->usb_buf, 1, PAC207_CTRL_TIMEOUT); | 211 | gspca_dev->usb_buf, 1, PAC207_CTRL_TIMEOUT); |
213 | if (res < 0) { | 212 | if (res < 0) { |
214 | PDEBUG(D_ERR, | 213 | err("Failed to read a register (index 0x%04X, error %d)", |
215 | "Failed to read a register (index 0x%04X, error %d)", | ||
216 | index, res); | 214 | index, res); |
217 | return res; | 215 | return res; |
218 | } | 216 | } |
diff --git a/drivers/media/video/gspca/pac7302.c b/drivers/media/video/gspca/pac7302.c index e50c54a3f738..f41c4edc5fe5 100644 --- a/drivers/media/video/gspca/pac7302.c +++ b/drivers/media/video/gspca/pac7302.c | |||
@@ -408,9 +408,8 @@ static void reg_w_buf(struct gspca_dev *gspca_dev, | |||
408 | index, gspca_dev->usb_buf, len, | 408 | index, gspca_dev->usb_buf, len, |
409 | 500); | 409 | 500); |
410 | if (ret < 0) { | 410 | if (ret < 0) { |
411 | PDEBUG(D_ERR, "reg_w_buf(): " | 411 | err("reg_w_buf failed index 0x%02x, error %d", |
412 | "Failed to write registers to index 0x%x, error %i", | 412 | index, ret); |
413 | index, ret); | ||
414 | gspca_dev->usb_err = ret; | 413 | gspca_dev->usb_err = ret; |
415 | } | 414 | } |
416 | } | 415 | } |
@@ -432,9 +431,8 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
432 | 0, index, gspca_dev->usb_buf, 1, | 431 | 0, index, gspca_dev->usb_buf, 1, |
433 | 500); | 432 | 500); |
434 | if (ret < 0) { | 433 | if (ret < 0) { |
435 | PDEBUG(D_ERR, "reg_w(): " | 434 | err("reg_w() failed index 0x%02x, value 0x%02x, error %d", |
436 | "Failed to write register to index 0x%x, value 0x%x, error %i", | 435 | index, value, ret); |
437 | index, value, ret); | ||
438 | gspca_dev->usb_err = ret; | 436 | gspca_dev->usb_err = ret; |
439 | } | 437 | } |
440 | } | 438 | } |
@@ -468,10 +466,9 @@ static void reg_w_page(struct gspca_dev *gspca_dev, | |||
468 | 0, index, gspca_dev->usb_buf, 1, | 466 | 0, index, gspca_dev->usb_buf, 1, |
469 | 500); | 467 | 500); |
470 | if (ret < 0) { | 468 | if (ret < 0) { |
471 | PDEBUG(D_ERR, "reg_w_page(): " | 469 | err("reg_w_page() failed index 0x%02x, " |
472 | "Failed to write register to index 0x%x, " | 470 | "value 0x%02x, error %d", |
473 | "value 0x%x, error %i", | 471 | index, page[index], ret); |
474 | index, page[index], ret); | ||
475 | gspca_dev->usb_err = ret; | 472 | gspca_dev->usb_err = ret; |
476 | break; | 473 | break; |
477 | } | 474 | } |
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index 76989d7cab59..041dffcb5767 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -276,9 +276,8 @@ static void reg_w_buf(struct gspca_dev *gspca_dev, | |||
276 | index, gspca_dev->usb_buf, len, | 276 | index, gspca_dev->usb_buf, len, |
277 | 500); | 277 | 500); |
278 | if (ret < 0) { | 278 | if (ret < 0) { |
279 | PDEBUG(D_ERR, "reg_w_buf(): " | 279 | err("reg_w_buf() failed index 0x%02x, error %d", |
280 | "Failed to write registers to index 0x%x, error %i", | 280 | index, ret); |
281 | index, ret); | ||
282 | gspca_dev->usb_err = ret; | 281 | gspca_dev->usb_err = ret; |
283 | } | 282 | } |
284 | } | 283 | } |
@@ -300,9 +299,8 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
300 | 0, index, gspca_dev->usb_buf, 1, | 299 | 0, index, gspca_dev->usb_buf, 1, |
301 | 500); | 300 | 500); |
302 | if (ret < 0) { | 301 | if (ret < 0) { |
303 | PDEBUG(D_ERR, "reg_w(): " | 302 | err("reg_w() failed index 0x%02x, value 0x%02x, error %d", |
304 | "Failed to write register to index 0x%x, value 0x%x, error %i", | 303 | index, value, ret); |
305 | index, value, ret); | ||
306 | gspca_dev->usb_err = ret; | 304 | gspca_dev->usb_err = ret; |
307 | } | 305 | } |
308 | } | 306 | } |
@@ -336,10 +334,9 @@ static void reg_w_page(struct gspca_dev *gspca_dev, | |||
336 | 0, index, gspca_dev->usb_buf, 1, | 334 | 0, index, gspca_dev->usb_buf, 1, |
337 | 500); | 335 | 500); |
338 | if (ret < 0) { | 336 | if (ret < 0) { |
339 | PDEBUG(D_ERR, "reg_w_page(): " | 337 | err("reg_w_page() failed index 0x%02x, " |
340 | "Failed to write register to index 0x%x, " | 338 | "value 0x%02x, error %d", |
341 | "value 0x%x, error %i", | 339 | index, page[index], ret); |
342 | index, page[index], ret); | ||
343 | gspca_dev->usb_err = ret; | 340 | gspca_dev->usb_err = ret; |
344 | break; | 341 | break; |
345 | } | 342 | } |
diff --git a/drivers/media/video/gspca/sn9c2028.c b/drivers/media/video/gspca/sn9c2028.c index 198afc85b4cb..40a06680502d 100644 --- a/drivers/media/video/gspca/sn9c2028.c +++ b/drivers/media/video/gspca/sn9c2028.c | |||
@@ -75,7 +75,7 @@ static int sn9c2028_command(struct gspca_dev *gspca_dev, u8 *command) | |||
75 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 75 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
76 | 2, 0, gspca_dev->usb_buf, 6, 500); | 76 | 2, 0, gspca_dev->usb_buf, 6, 500); |
77 | if (rc < 0) { | 77 | if (rc < 0) { |
78 | PDEBUG(D_ERR, "command write [%02x] error %d", | 78 | err("command write [%02x] error %d", |
79 | gspca_dev->usb_buf[0], rc); | 79 | gspca_dev->usb_buf[0], rc); |
80 | return rc; | 80 | return rc; |
81 | } | 81 | } |
@@ -93,7 +93,7 @@ static int sn9c2028_read1(struct gspca_dev *gspca_dev) | |||
93 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 93 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
94 | 1, 0, gspca_dev->usb_buf, 1, 500); | 94 | 1, 0, gspca_dev->usb_buf, 1, 500); |
95 | if (rc != 1) { | 95 | if (rc != 1) { |
96 | PDEBUG(D_ERR, "read1 error %d", rc); | 96 | err("read1 error %d", rc); |
97 | return (rc < 0) ? rc : -EIO; | 97 | return (rc < 0) ? rc : -EIO; |
98 | } | 98 | } |
99 | PDEBUG(D_USBI, "read1 response %02x", gspca_dev->usb_buf[0]); | 99 | PDEBUG(D_USBI, "read1 response %02x", gspca_dev->usb_buf[0]); |
@@ -109,7 +109,7 @@ static int sn9c2028_read4(struct gspca_dev *gspca_dev, u8 *reading) | |||
109 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 109 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
110 | 4, 0, gspca_dev->usb_buf, 4, 500); | 110 | 4, 0, gspca_dev->usb_buf, 4, 500); |
111 | if (rc != 4) { | 111 | if (rc != 4) { |
112 | PDEBUG(D_ERR, "read4 error %d", rc); | 112 | err("read4 error %d", rc); |
113 | return (rc < 0) ? rc : -EIO; | 113 | return (rc < 0) ? rc : -EIO; |
114 | } | 114 | } |
115 | memcpy(reading, gspca_dev->usb_buf, 4); | 115 | memcpy(reading, gspca_dev->usb_buf, 4); |
@@ -131,7 +131,7 @@ static int sn9c2028_long_command(struct gspca_dev *gspca_dev, u8 *command) | |||
131 | for (i = 0; i < 256 && status < 2; i++) | 131 | for (i = 0; i < 256 && status < 2; i++) |
132 | status = sn9c2028_read1(gspca_dev); | 132 | status = sn9c2028_read1(gspca_dev); |
133 | if (status != 2) { | 133 | if (status != 2) { |
134 | PDEBUG(D_ERR, "long command status read error %d", status); | 134 | err("long command status read error %d", status); |
135 | return (status < 0) ? status : -EIO; | 135 | return (status < 0) ? status : -EIO; |
136 | } | 136 | } |
137 | 137 | ||
@@ -638,7 +638,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
638 | err_code = start_vivitar_cam(gspca_dev); | 638 | err_code = start_vivitar_cam(gspca_dev); |
639 | break; | 639 | break; |
640 | default: | 640 | default: |
641 | PDEBUG(D_ERR, "Starting unknown camera, please report this"); | 641 | err("Starting unknown camera, please report this"); |
642 | return -ENXIO; | 642 | return -ENXIO; |
643 | } | 643 | } |
644 | 644 | ||
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 38b25fbca550..6e410121df25 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -1599,7 +1599,7 @@ static void ov7648_probe(struct gspca_dev *gspca_dev) | |||
1599 | return; | 1599 | return; |
1600 | } | 1600 | } |
1601 | 1601 | ||
1602 | PDEBUG(D_PROBE, "Unknown sensor %04x", val); | 1602 | err("Unknown sensor %04x", val); |
1603 | } | 1603 | } |
1604 | 1604 | ||
1605 | /* 0c45:6142 sensor may be po2030n, gc0305 or gc0307 */ | 1605 | /* 0c45:6142 sensor may be po2030n, gc0305 or gc0307 */ |
@@ -1635,7 +1635,7 @@ static void po2030n_probe(struct gspca_dev *gspca_dev) | |||
1635 | PDEBUG(D_PROBE, "Sensor po2030n"); | 1635 | PDEBUG(D_PROBE, "Sensor po2030n"); |
1636 | /* sd->sensor = SENSOR_PO2030N; */ | 1636 | /* sd->sensor = SENSOR_PO2030N; */ |
1637 | } else { | 1637 | } else { |
1638 | PDEBUG(D_PROBE, "Unknown sensor ID %04x", val); | 1638 | err("Unknown sensor ID %04x", val); |
1639 | } | 1639 | } |
1640 | } | 1640 | } |
1641 | 1641 | ||
diff --git a/drivers/media/video/gspca/spca1528.c b/drivers/media/video/gspca/spca1528.c index 873d63926548..e64338664410 100644 --- a/drivers/media/video/gspca/spca1528.c +++ b/drivers/media/video/gspca/spca1528.c | |||
@@ -171,7 +171,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
171 | PDEBUG(D_USBI, "GET %02x 0000 %04x %02x", req, index, | 171 | PDEBUG(D_USBI, "GET %02x 0000 %04x %02x", req, index, |
172 | gspca_dev->usb_buf[0]); | 172 | gspca_dev->usb_buf[0]); |
173 | if (ret < 0) { | 173 | if (ret < 0) { |
174 | PDEBUG(D_ERR, "reg_r err %d", ret); | 174 | err("reg_r err %d", ret); |
175 | gspca_dev->usb_err = ret; | 175 | gspca_dev->usb_err = ret; |
176 | } | 176 | } |
177 | } | 177 | } |
@@ -193,7 +193,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
193 | value, index, | 193 | value, index, |
194 | NULL, 0, 500); | 194 | NULL, 0, 500); |
195 | if (ret < 0) { | 195 | if (ret < 0) { |
196 | PDEBUG(D_ERR, "reg_w err %d", ret); | 196 | err("reg_w err %d", ret); |
197 | gspca_dev->usb_err = ret; | 197 | gspca_dev->usb_err = ret; |
198 | } | 198 | } |
199 | } | 199 | } |
@@ -217,7 +217,7 @@ static void reg_wb(struct gspca_dev *gspca_dev, | |||
217 | value, index, | 217 | value, index, |
218 | gspca_dev->usb_buf, 1, 500); | 218 | gspca_dev->usb_buf, 1, 500); |
219 | if (ret < 0) { | 219 | if (ret < 0) { |
220 | PDEBUG(D_ERR, "reg_w err %d", ret); | 220 | err("reg_w err %d", ret); |
221 | gspca_dev->usb_err = ret; | 221 | gspca_dev->usb_err = ret; |
222 | } | 222 | } |
223 | } | 223 | } |
diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c index 669717fffe20..8e202b9039f1 100644 --- a/drivers/media/video/gspca/spca500.c +++ b/drivers/media/video/gspca/spca500.c | |||
@@ -396,7 +396,7 @@ static int reg_w(struct gspca_dev *gspca_dev, | |||
396 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 396 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
397 | value, index, NULL, 0, 500); | 397 | value, index, NULL, 0, 500); |
398 | if (ret < 0) | 398 | if (ret < 0) |
399 | PDEBUG(D_ERR, "reg write: error %d", ret); | 399 | err("reg write: error %d", ret); |
400 | return ret; | 400 | return ret; |
401 | } | 401 | } |
402 | 402 | ||
@@ -418,8 +418,8 @@ static int reg_r_12(struct gspca_dev *gspca_dev, | |||
418 | gspca_dev->usb_buf, length, | 418 | gspca_dev->usb_buf, length, |
419 | 500); /* timeout */ | 419 | 500); /* timeout */ |
420 | if (ret < 0) { | 420 | if (ret < 0) { |
421 | PDEBUG(D_ERR, "reg_r_12 err %d", ret); | 421 | err("reg_r_12 err %d", ret); |
422 | return -1; | 422 | return ret; |
423 | } | 423 | } |
424 | return (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]; | 424 | return (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]; |
425 | } | 425 | } |
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index 6e2e85c993d4..c4bc520735f3 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c | |||
@@ -1852,7 +1852,7 @@ static int reg_write(struct usb_device *dev, | |||
1852 | PDEBUG(D_USBO, "reg write: 0x%02x 0x%02x 0x%02x", | 1852 | PDEBUG(D_USBO, "reg write: 0x%02x 0x%02x 0x%02x", |
1853 | req, index, value); | 1853 | req, index, value); |
1854 | if (ret < 0) | 1854 | if (ret < 0) |
1855 | PDEBUG(D_ERR, "reg write: error %d", ret); | 1855 | err("reg write: error %d", ret); |
1856 | return ret; | 1856 | return ret; |
1857 | } | 1857 | } |
1858 | 1858 | ||
diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/video/gspca/spca505.c index 148df0032000..5ad203a1b2d6 100644 --- a/drivers/media/video/gspca/spca505.c +++ b/drivers/media/video/gspca/spca505.c | |||
@@ -582,7 +582,7 @@ static int reg_write(struct usb_device *dev, | |||
582 | PDEBUG(D_USBO, "reg write: 0x%02x,0x%02x:0x%02x, %d", | 582 | PDEBUG(D_USBO, "reg write: 0x%02x,0x%02x:0x%02x, %d", |
583 | req, index, value, ret); | 583 | req, index, value, ret); |
584 | if (ret < 0) | 584 | if (ret < 0) |
585 | PDEBUG(D_ERR, "reg write: error %d", ret); | 585 | err("reg write: error %d", ret); |
586 | return ret; | 586 | return ret; |
587 | } | 587 | } |
588 | 588 | ||
@@ -689,8 +689,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
689 | return ret; | 689 | return ret; |
690 | } | 690 | } |
691 | if (ret != 0x0101) { | 691 | if (ret != 0x0101) { |
692 | PDEBUG(D_ERR|D_CONF, | 692 | err("After vector read returns 0x%04x should be 0x0101", |
693 | "After vector read returns 0x%04x should be 0x0101", | ||
694 | ret); | 693 | ret); |
695 | } | 694 | } |
696 | 695 | ||
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index 2ec7f452a9ea..9d5b6666a9ae 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c | |||
@@ -1276,7 +1276,7 @@ static int reg_write(struct usb_device *dev, | |||
1276 | PDEBUG(D_USBO, "reg write i:0x%04x = 0x%02x", | 1276 | PDEBUG(D_USBO, "reg write i:0x%04x = 0x%02x", |
1277 | index, value); | 1277 | index, value); |
1278 | if (ret < 0) | 1278 | if (ret < 0) |
1279 | PDEBUG(D_ERR|D_USBO, "reg write: error %d", ret); | 1279 | err("reg write: error %d", ret); |
1280 | return ret; | 1280 | return ret; |
1281 | } | 1281 | } |
1282 | 1282 | ||
@@ -1298,7 +1298,7 @@ static int reg_read(struct gspca_dev *gspca_dev, | |||
1298 | PDEBUG(D_USBI, "reg read i:%04x --> %02x", | 1298 | PDEBUG(D_USBI, "reg read i:%04x --> %02x", |
1299 | index, gspca_dev->usb_buf[0]); | 1299 | index, gspca_dev->usb_buf[0]); |
1300 | if (ret < 0) { | 1300 | if (ret < 0) { |
1301 | PDEBUG(D_ERR|D_USBI, "reg_read err %d", ret); | 1301 | err("reg_read err %d", ret); |
1302 | return ret; | 1302 | return ret; |
1303 | } | 1303 | } |
1304 | return gspca_dev->usb_buf[0]; | 1304 | return gspca_dev->usb_buf[0]; |
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index d561fe9eb553..c530f50307ad 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c | |||
@@ -315,7 +315,7 @@ static void reg_w_val(struct usb_device *dev, __u16 index, __u8 value) | |||
315 | value, index, NULL, 0, 500); | 315 | value, index, NULL, 0, 500); |
316 | PDEBUG(D_USBO, "reg write: 0x%02x:0x%02x", index, value); | 316 | PDEBUG(D_USBO, "reg write: 0x%02x:0x%02x", index, value); |
317 | if (ret < 0) | 317 | if (ret < 0) |
318 | PDEBUG(D_ERR, "reg write: error %d", ret); | 318 | err("reg write: error %d", ret); |
319 | } | 319 | } |
320 | 320 | ||
321 | static void write_vector(struct gspca_dev *gspca_dev, | 321 | static void write_vector(struct gspca_dev *gspca_dev, |
diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/video/gspca/sq905.c index 1e39afc5d088..404067745775 100644 --- a/drivers/media/video/gspca/sq905.c +++ b/drivers/media/video/gspca/sq905.c | |||
@@ -123,7 +123,7 @@ static int sq905_command(struct gspca_dev *gspca_dev, u16 index) | |||
123 | SQ905_COMMAND, index, gspca_dev->usb_buf, 1, | 123 | SQ905_COMMAND, index, gspca_dev->usb_buf, 1, |
124 | SQ905_CMD_TIMEOUT); | 124 | SQ905_CMD_TIMEOUT); |
125 | if (ret < 0) { | 125 | if (ret < 0) { |
126 | PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", | 126 | err("%s: usb_control_msg failed (%d)", |
127 | __func__, ret); | 127 | __func__, ret); |
128 | return ret; | 128 | return ret; |
129 | } | 129 | } |
@@ -135,7 +135,7 @@ static int sq905_command(struct gspca_dev *gspca_dev, u16 index) | |||
135 | SQ905_PING, 0, gspca_dev->usb_buf, 1, | 135 | SQ905_PING, 0, gspca_dev->usb_buf, 1, |
136 | SQ905_CMD_TIMEOUT); | 136 | SQ905_CMD_TIMEOUT); |
137 | if (ret < 0) { | 137 | if (ret < 0) { |
138 | PDEBUG(D_ERR, "%s: usb_control_msg failed 2 (%d)", | 138 | err("%s: usb_control_msg failed 2 (%d)", |
139 | __func__, ret); | 139 | __func__, ret); |
140 | return ret; | 140 | return ret; |
141 | } | 141 | } |
@@ -158,7 +158,7 @@ static int sq905_ack_frame(struct gspca_dev *gspca_dev) | |||
158 | SQ905_READ_DONE, 0, gspca_dev->usb_buf, 1, | 158 | SQ905_READ_DONE, 0, gspca_dev->usb_buf, 1, |
159 | SQ905_CMD_TIMEOUT); | 159 | SQ905_CMD_TIMEOUT); |
160 | if (ret < 0) { | 160 | if (ret < 0) { |
161 | PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", __func__, ret); | 161 | err("%s: usb_control_msg failed (%d)", __func__, ret); |
162 | return ret; | 162 | return ret; |
163 | } | 163 | } |
164 | 164 | ||
@@ -186,7 +186,7 @@ sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock) | |||
186 | if (need_lock) | 186 | if (need_lock) |
187 | mutex_unlock(&gspca_dev->usb_lock); | 187 | mutex_unlock(&gspca_dev->usb_lock); |
188 | if (ret < 0) { | 188 | if (ret < 0) { |
189 | PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", __func__, ret); | 189 | err("%s: usb_control_msg failed (%d)", __func__, ret); |
190 | return ret; | 190 | return ret; |
191 | } | 191 | } |
192 | ret = usb_bulk_msg(gspca_dev->dev, | 192 | ret = usb_bulk_msg(gspca_dev->dev, |
@@ -195,7 +195,7 @@ sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock) | |||
195 | 195 | ||
196 | /* successful, it returns 0, otherwise negative */ | 196 | /* successful, it returns 0, otherwise negative */ |
197 | if (ret < 0 || act_len != size) { | 197 | if (ret < 0 || act_len != size) { |
198 | PDEBUG(D_ERR, "bulk read fail (%d) len %d/%d", | 198 | err("bulk read fail (%d) len %d/%d", |
199 | ret, act_len, size); | 199 | ret, act_len, size); |
200 | return -EIO; | 200 | return -EIO; |
201 | } | 201 | } |
@@ -226,7 +226,7 @@ static void sq905_dostream(struct work_struct *work) | |||
226 | 226 | ||
227 | buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); | 227 | buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); |
228 | if (!buffer) { | 228 | if (!buffer) { |
229 | PDEBUG(D_ERR, "Couldn't allocate USB buffer"); | 229 | err("Couldn't allocate USB buffer"); |
230 | goto quit_stream; | 230 | goto quit_stream; |
231 | } | 231 | } |
232 | 232 | ||
diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/video/gspca/sq905c.c index 18c8145bdfb4..c2e88b5303cb 100644 --- a/drivers/media/video/gspca/sq905c.c +++ b/drivers/media/video/gspca/sq905c.c | |||
@@ -95,7 +95,7 @@ static int sq905c_command(struct gspca_dev *gspca_dev, u16 command, u16 index) | |||
95 | command, index, NULL, 0, | 95 | command, index, NULL, 0, |
96 | SQ905C_CMD_TIMEOUT); | 96 | SQ905C_CMD_TIMEOUT); |
97 | if (ret < 0) { | 97 | if (ret < 0) { |
98 | PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", | 98 | err("%s: usb_control_msg failed (%d)", |
99 | __func__, ret); | 99 | __func__, ret); |
100 | return ret; | 100 | return ret; |
101 | } | 101 | } |
@@ -115,7 +115,7 @@ static int sq905c_read(struct gspca_dev *gspca_dev, u16 command, u16 index, | |||
115 | command, index, gspca_dev->usb_buf, size, | 115 | command, index, gspca_dev->usb_buf, size, |
116 | SQ905C_CMD_TIMEOUT); | 116 | SQ905C_CMD_TIMEOUT); |
117 | if (ret < 0) { | 117 | if (ret < 0) { |
118 | PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", | 118 | err("%s: usb_control_msg failed (%d)", |
119 | __func__, ret); | 119 | __func__, ret); |
120 | return ret; | 120 | return ret; |
121 | } | 121 | } |
@@ -146,7 +146,7 @@ static void sq905c_dostream(struct work_struct *work) | |||
146 | 146 | ||
147 | buffer = kmalloc(SQ905C_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); | 147 | buffer = kmalloc(SQ905C_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); |
148 | if (!buffer) { | 148 | if (!buffer) { |
149 | PDEBUG(D_ERR, "Couldn't allocate USB buffer"); | 149 | err("Couldn't allocate USB buffer"); |
150 | goto quit_stream; | 150 | goto quit_stream; |
151 | } | 151 | } |
152 | 152 | ||
diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index 8edffed24a0d..3e4b0b94c700 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c | |||
@@ -468,7 +468,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
468 | value, 0, gspca_dev->usb_buf, len, | 468 | value, 0, gspca_dev->usb_buf, len, |
469 | 500); | 469 | 500); |
470 | if (ret < 0) { | 470 | if (ret < 0) { |
471 | PDEBUG(D_ERR, "reg_r %04x failed %d", value, ret); | 471 | err("reg_r %04x failed %d", value, ret); |
472 | gspca_dev->usb_err = ret; | 472 | gspca_dev->usb_err = ret; |
473 | } | 473 | } |
474 | } | 474 | } |
@@ -488,7 +488,7 @@ static void reg_w(struct gspca_dev *gspca_dev, u16 value, u16 index) | |||
488 | 500); | 488 | 500); |
489 | msleep(30); | 489 | msleep(30); |
490 | if (ret < 0) { | 490 | if (ret < 0) { |
491 | PDEBUG(D_ERR, "reg_w %04x %04x failed %d", value, index, ret); | 491 | err("reg_w %04x %04x failed %d", value, index, ret); |
492 | gspca_dev->usb_err = ret; | 492 | gspca_dev->usb_err = ret; |
493 | } | 493 | } |
494 | } | 494 | } |
@@ -511,7 +511,7 @@ static void reg_wb(struct gspca_dev *gspca_dev, u16 value, u16 index, | |||
511 | 1000); | 511 | 1000); |
512 | msleep(30); | 512 | msleep(30); |
513 | if (ret < 0) { | 513 | if (ret < 0) { |
514 | PDEBUG(D_ERR, "reg_wb %04x %04x failed %d", value, index, ret); | 514 | err("reg_wb %04x %04x failed %d", value, index, ret); |
515 | gspca_dev->usb_err = ret; | 515 | gspca_dev->usb_err = ret; |
516 | } | 516 | } |
517 | } | 517 | } |
@@ -556,7 +556,7 @@ static void i2c_write(struct sd *sd, | |||
556 | gspca_dev->usb_buf, buf - gspca_dev->usb_buf, | 556 | gspca_dev->usb_buf, buf - gspca_dev->usb_buf, |
557 | 500); | 557 | 500); |
558 | if (ret < 0) { | 558 | if (ret < 0) { |
559 | PDEBUG(D_ERR, "i2c_write failed %d", ret); | 559 | err("i2c_write failed %d", ret); |
560 | gspca_dev->usb_err = ret; | 560 | gspca_dev->usb_err = ret; |
561 | } | 561 | } |
562 | } | 562 | } |
@@ -612,7 +612,7 @@ static void ucbus_write(struct gspca_dev *gspca_dev, | |||
612 | gspca_dev->usb_buf, buf - gspca_dev->usb_buf, | 612 | gspca_dev->usb_buf, buf - gspca_dev->usb_buf, |
613 | 500); | 613 | 500); |
614 | if (ret < 0) { | 614 | if (ret < 0) { |
615 | PDEBUG(D_ERR, "ucbus_write failed %d", ret); | 615 | err("ucbus_write failed %d", ret); |
616 | gspca_dev->usb_err = ret; | 616 | gspca_dev->usb_err = ret; |
617 | return; | 617 | return; |
618 | } | 618 | } |
@@ -688,7 +688,7 @@ static void cmos_probe(struct gspca_dev *gspca_dev) | |||
688 | break; | 688 | break; |
689 | } | 689 | } |
690 | if (i >= ARRAY_SIZE(probe_order)) | 690 | if (i >= ARRAY_SIZE(probe_order)) |
691 | PDEBUG(D_PROBE, "Unknown sensor"); | 691 | err("Unknown sensor"); |
692 | else | 692 | else |
693 | sd->sensor = probe_order[i]; | 693 | sd->sensor = probe_order[i]; |
694 | } | 694 | } |
@@ -1079,7 +1079,7 @@ static void sd_dq_callback(struct gspca_dev *gspca_dev) | |||
1079 | gspca_dev->cam.bulk_nurbs = 1; | 1079 | gspca_dev->cam.bulk_nurbs = 1; |
1080 | ret = usb_submit_urb(gspca_dev->urb[0], GFP_ATOMIC); | 1080 | ret = usb_submit_urb(gspca_dev->urb[0], GFP_ATOMIC); |
1081 | if (ret < 0) | 1081 | if (ret < 0) |
1082 | PDEBUG(D_ERR|D_PACK, "sd_dq_callback() err %d", ret); | 1082 | err("sd_dq_callback() err %d", ret); |
1083 | 1083 | ||
1084 | /* wait a little time, otherwise the webcam crashes */ | 1084 | /* wait a little time, otherwise the webcam crashes */ |
1085 | msleep(100); | 1085 | msleep(100); |
diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/video/gspca/stk014.c index 3266a5397170..14601d887c4f 100644 --- a/drivers/media/video/gspca/stk014.c +++ b/drivers/media/video/gspca/stk014.c | |||
@@ -142,7 +142,7 @@ static u8 reg_r(struct gspca_dev *gspca_dev, | |||
142 | gspca_dev->usb_buf, 1, | 142 | gspca_dev->usb_buf, 1, |
143 | 500); | 143 | 500); |
144 | if (ret < 0) { | 144 | if (ret < 0) { |
145 | PDEBUG(D_ERR, "reg_r err %d", ret); | 145 | err("reg_r err %d", ret); |
146 | gspca_dev->usb_err = ret; | 146 | gspca_dev->usb_err = ret; |
147 | return 0; | 147 | return 0; |
148 | } | 148 | } |
@@ -167,7 +167,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
167 | 0, | 167 | 0, |
168 | 500); | 168 | 500); |
169 | if (ret < 0) { | 169 | if (ret < 0) { |
170 | PDEBUG(D_ERR, "reg_w err %d", ret); | 170 | err("reg_w err %d", ret); |
171 | gspca_dev->usb_err = ret; | 171 | gspca_dev->usb_err = ret; |
172 | } | 172 | } |
173 | } | 173 | } |
@@ -197,7 +197,7 @@ static void rcv_val(struct gspca_dev *gspca_dev, | |||
197 | &alen, | 197 | &alen, |
198 | 500); /* timeout in milliseconds */ | 198 | 500); /* timeout in milliseconds */ |
199 | if (ret < 0) { | 199 | if (ret < 0) { |
200 | PDEBUG(D_ERR, "rcv_val err %d", ret); | 200 | err("rcv_val err %d", ret); |
201 | gspca_dev->usb_err = ret; | 201 | gspca_dev->usb_err = ret; |
202 | } | 202 | } |
203 | } | 203 | } |
@@ -240,7 +240,7 @@ static void snd_val(struct gspca_dev *gspca_dev, | |||
240 | &alen, | 240 | &alen, |
241 | 500); /* timeout in milliseconds */ | 241 | 500); /* timeout in milliseconds */ |
242 | if (ret < 0) { | 242 | if (ret < 0) { |
243 | PDEBUG(D_ERR, "snd_val err %d", ret); | 243 | err("snd_val err %d", ret); |
244 | gspca_dev->usb_err = ret; | 244 | gspca_dev->usb_err = ret; |
245 | } else { | 245 | } else { |
246 | if (ads == 0x003f08) { | 246 | if (ads == 0x003f08) { |
@@ -323,7 +323,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
323 | ret = reg_r(gspca_dev, 0x0740); | 323 | ret = reg_r(gspca_dev, 0x0740); |
324 | if (gspca_dev->usb_err >= 0) { | 324 | if (gspca_dev->usb_err >= 0) { |
325 | if (ret != 0xff) { | 325 | if (ret != 0xff) { |
326 | PDEBUG(D_ERR|D_STREAM, "init reg: 0x%02x", ret); | 326 | err("init reg: 0x%02x", ret); |
327 | gspca_dev->usb_err = -EIO; | 327 | gspca_dev->usb_err = -EIO; |
328 | } | 328 | } |
329 | } | 329 | } |
@@ -357,7 +357,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
357 | gspca_dev->iface, | 357 | gspca_dev->iface, |
358 | gspca_dev->alt); | 358 | gspca_dev->alt); |
359 | if (ret < 0) { | 359 | if (ret < 0) { |
360 | PDEBUG(D_ERR|D_STREAM, "set intf %d %d failed", | 360 | err("set intf %d %d failed", |
361 | gspca_dev->iface, gspca_dev->alt); | 361 | gspca_dev->iface, gspca_dev->alt); |
362 | gspca_dev->usb_err = ret; | 362 | gspca_dev->usb_err = ret; |
363 | goto out; | 363 | goto out; |
diff --git a/drivers/media/video/gspca/stv0680.c b/drivers/media/video/gspca/stv0680.c index 4cc1c0ad1b92..b199ad4666bd 100644 --- a/drivers/media/video/gspca/stv0680.c +++ b/drivers/media/video/gspca/stv0680.c | |||
@@ -79,8 +79,7 @@ static int stv_sndctrl(struct gspca_dev *gspca_dev, int set, u8 req, u16 val, | |||
79 | val, 0, gspca_dev->usb_buf, size, 500); | 79 | val, 0, gspca_dev->usb_buf, size, 500); |
80 | 80 | ||
81 | if ((ret < 0) && (req != 0x0a)) | 81 | if ((ret < 0) && (req != 0x0a)) |
82 | PDEBUG(D_ERR, | 82 | err("usb_control_msg error %i, request = 0x%x, error = %i", |
83 | "usb_control_msg error %i, request = 0x%x, error = %i", | ||
84 | set, req, ret); | 83 | set, req, ret); |
85 | 84 | ||
86 | return ret; | 85 | return ret; |
@@ -237,7 +236,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
237 | 236 | ||
238 | if (stv_sndctrl(gspca_dev, 2, 0x06, 0x0100, 0x12) != 0x12 || | 237 | if (stv_sndctrl(gspca_dev, 2, 0x06, 0x0100, 0x12) != 0x12 || |
239 | gspca_dev->usb_buf[8] != 0x53 || gspca_dev->usb_buf[9] != 0x05) { | 238 | gspca_dev->usb_buf[8] != 0x53 || gspca_dev->usb_buf[9] != 0x05) { |
240 | PDEBUG(D_ERR, "Could not get descriptor 0100."); | 239 | err("Could not get descriptor 0100."); |
241 | return stv0680_handle_error(gspca_dev, -EIO); | 240 | return stv0680_handle_error(gspca_dev, -EIO); |
242 | } | 241 | } |
243 | 242 | ||
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index ffb49228c8bd..b818ab80304c 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -189,7 +189,7 @@ int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value) | |||
189 | 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, | 189 | 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, |
190 | STV06XX_URB_MSG_TIMEOUT); | 190 | STV06XX_URB_MSG_TIMEOUT); |
191 | if (err < 0) { | 191 | if (err < 0) { |
192 | PDEBUG(D_ERR, "I2C: Read error writing address: %d", err); | 192 | err("I2C: Read error writing address: %d", err); |
193 | return err; | 193 | return err; |
194 | } | 194 | } |
195 | 195 | ||
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c b/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c index c11f06e4ae76..3af53264a364 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c | |||
@@ -246,7 +246,7 @@ static int st6422_start(struct sd *sd) | |||
246 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); | 246 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); |
247 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); | 247 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); |
248 | if (!alt) { | 248 | if (!alt) { |
249 | PDEBUG(D_ERR, "Couldn't get altsetting"); | 249 | err("Couldn't get altsetting"); |
250 | return -EIO; | 250 | return -EIO; |
251 | } | 251 | } |
252 | 252 | ||
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index 7cd5582a0bd0..d46a39f02afb 100644 --- a/drivers/media/video/gspca/sunplus.c +++ b/drivers/media/video/gspca/sunplus.c | |||
@@ -343,7 +343,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
343 | len ? gspca_dev->usb_buf : NULL, len, | 343 | len ? gspca_dev->usb_buf : NULL, len, |
344 | 500); | 344 | 500); |
345 | if (ret < 0) { | 345 | if (ret < 0) { |
346 | PDEBUG(D_ERR, "reg_r err %d", ret); | 346 | err("reg_r err %d", ret); |
347 | gspca_dev->usb_err = ret; | 347 | gspca_dev->usb_err = ret; |
348 | } | 348 | } |
349 | } | 349 | } |
@@ -368,7 +368,7 @@ static void reg_w_1(struct gspca_dev *gspca_dev, | |||
368 | gspca_dev->usb_buf, 1, | 368 | gspca_dev->usb_buf, 1, |
369 | 500); | 369 | 500); |
370 | if (ret < 0) { | 370 | if (ret < 0) { |
371 | PDEBUG(D_ERR, "reg_w_1 err %d", ret); | 371 | err("reg_w_1 err %d", ret); |
372 | gspca_dev->usb_err = ret; | 372 | gspca_dev->usb_err = ret; |
373 | } | 373 | } |
374 | } | 374 | } |
@@ -388,7 +388,7 @@ static void reg_w_riv(struct gspca_dev *gspca_dev, | |||
388 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 388 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
389 | value, index, NULL, 0, 500); | 389 | value, index, NULL, 0, 500); |
390 | if (ret < 0) { | 390 | if (ret < 0) { |
391 | PDEBUG(D_ERR, "reg_w_riv err %d", ret); | 391 | err("reg_w_riv err %d", ret); |
392 | gspca_dev->usb_err = ret; | 392 | gspca_dev->usb_err = ret; |
393 | return; | 393 | return; |
394 | } | 394 | } |
@@ -413,7 +413,7 @@ static u8 reg_r_1(struct gspca_dev *gspca_dev, | |||
413 | gspca_dev->usb_buf, 1, | 413 | gspca_dev->usb_buf, 1, |
414 | 500); /* timeout */ | 414 | 500); /* timeout */ |
415 | if (ret < 0) { | 415 | if (ret < 0) { |
416 | PDEBUG(D_ERR, "reg_r_1 err %d", ret); | 416 | err("reg_r_1 err %d", ret); |
417 | gspca_dev->usb_err = ret; | 417 | gspca_dev->usb_err = ret; |
418 | return 0; | 418 | return 0; |
419 | } | 419 | } |
@@ -440,7 +440,7 @@ static u16 reg_r_12(struct gspca_dev *gspca_dev, | |||
440 | gspca_dev->usb_buf, length, | 440 | gspca_dev->usb_buf, length, |
441 | 500); | 441 | 500); |
442 | if (ret < 0) { | 442 | if (ret < 0) { |
443 | PDEBUG(D_ERR, "reg_r_12 err %d", ret); | 443 | err("reg_r_12 err %d", ret); |
444 | gspca_dev->usb_err = ret; | 444 | gspca_dev->usb_err = ret; |
445 | return 0; | 445 | return 0; |
446 | } | 446 | } |
diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c index 3818e87939ef..b45f4d0f3997 100644 --- a/drivers/media/video/gspca/t613.c +++ b/drivers/media/video/gspca/t613.c | |||
@@ -892,7 +892,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
892 | sd->sensor = SENSOR_OM6802; | 892 | sd->sensor = SENSOR_OM6802; |
893 | break; | 893 | break; |
894 | default: | 894 | default: |
895 | PDEBUG(D_ERR|D_PROBE, "unknown sensor %04x", sensor_id); | 895 | err("unknown sensor %04x", sensor_id); |
896 | return -EINVAL; | 896 | return -EINVAL; |
897 | } | 897 | } |
898 | 898 | ||
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index eb7b1210d757..38a6efe1a5f9 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -3164,7 +3164,7 @@ static void reg_r_i(struct gspca_dev *gspca_dev, | |||
3164 | index, gspca_dev->usb_buf, len, | 3164 | index, gspca_dev->usb_buf, len, |
3165 | 500); | 3165 | 500); |
3166 | if (ret < 0) { | 3166 | if (ret < 0) { |
3167 | PDEBUG(D_ERR, "reg_r err %d", ret); | 3167 | err("reg_r err %d", ret); |
3168 | gspca_dev->usb_err = ret; | 3168 | gspca_dev->usb_err = ret; |
3169 | } | 3169 | } |
3170 | } | 3170 | } |
@@ -3205,7 +3205,7 @@ static void reg_w_i(struct gspca_dev *gspca_dev, | |||
3205 | value, index, NULL, 0, | 3205 | value, index, NULL, 0, |
3206 | 500); | 3206 | 500); |
3207 | if (ret < 0) { | 3207 | if (ret < 0) { |
3208 | PDEBUG(D_ERR, "reg_w err %d", ret); | 3208 | err("reg_w err %d", ret); |
3209 | gspca_dev->usb_err = ret; | 3209 | gspca_dev->usb_err = ret; |
3210 | } | 3210 | } |
3211 | } | 3211 | } |
@@ -3230,7 +3230,7 @@ static u16 read_sensor_register(struct gspca_dev *gspca_dev, | |||
3230 | 3230 | ||
3231 | reg_r(gspca_dev, 0xa1, 0xb33f, 1); | 3231 | reg_r(gspca_dev, 0xa1, 0xb33f, 1); |
3232 | if (!(gspca_dev->usb_buf[0] & 0x02)) { | 3232 | if (!(gspca_dev->usb_buf[0] & 0x02)) { |
3233 | PDEBUG(D_ERR, "I2c Bus Busy Wait %02x", | 3233 | err("I2c Bus Busy Wait %02x", |
3234 | gspca_dev->usb_buf[0]); | 3234 | gspca_dev->usb_buf[0]); |
3235 | return 0; | 3235 | return 0; |
3236 | } | 3236 | } |
@@ -3344,7 +3344,7 @@ static void i2c_write(struct gspca_dev *gspca_dev, | |||
3344 | msleep(20); | 3344 | msleep(20); |
3345 | } while (--retry > 0); | 3345 | } while (--retry > 0); |
3346 | if (retry <= 0) | 3346 | if (retry <= 0) |
3347 | PDEBUG(D_ERR, "i2c_write timeout"); | 3347 | err("i2c_write timeout"); |
3348 | } | 3348 | } |
3349 | 3349 | ||
3350 | static void put_tab_to_reg(struct gspca_dev *gspca_dev, | 3350 | static void put_tab_to_reg(struct gspca_dev *gspca_dev, |
@@ -3440,7 +3440,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
3440 | 3440 | ||
3441 | switch (sensor) { | 3441 | switch (sensor) { |
3442 | case -1: | 3442 | case -1: |
3443 | PDEBUG(D_PROBE, "Unknown sensor..."); | 3443 | err("Unknown sensor..."); |
3444 | return -EINVAL; | 3444 | return -EINVAL; |
3445 | case SENSOR_HV7131R: | 3445 | case SENSOR_HV7131R: |
3446 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); | 3446 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); |
diff --git a/drivers/media/video/gspca/w996Xcf.c b/drivers/media/video/gspca/w996Xcf.c index 38a68591ce48..1c6c89419577 100644 --- a/drivers/media/video/gspca/w996Xcf.c +++ b/drivers/media/video/gspca/w996Xcf.c | |||
@@ -78,7 +78,7 @@ static int w9968cf_write_fsb(struct sd *sd, u16* data) | |||
78 | USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE, | 78 | USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE, |
79 | value, 0x06, sd->gspca_dev.usb_buf, 6, 500); | 79 | value, 0x06, sd->gspca_dev.usb_buf, 6, 500); |
80 | if (ret < 0) { | 80 | if (ret < 0) { |
81 | PDEBUG(D_ERR, "Write FSB registers failed (%d)", ret); | 81 | err("Write FSB registers failed (%d)", ret); |
82 | return ret; | 82 | return ret; |
83 | } | 83 | } |
84 | 84 | ||
@@ -104,7 +104,7 @@ static int w9968cf_write_sb(struct sd *sd, u16 value) | |||
104 | udelay(W9968CF_I2C_BUS_DELAY); | 104 | udelay(W9968CF_I2C_BUS_DELAY); |
105 | 105 | ||
106 | if (ret < 0) { | 106 | if (ret < 0) { |
107 | PDEBUG(D_ERR, "Write SB reg [01] %04x failed", value); | 107 | err("Write SB reg [01] %04x failed", value); |
108 | return ret; | 108 | return ret; |
109 | } | 109 | } |
110 | 110 | ||
@@ -130,7 +130,7 @@ static int w9968cf_read_sb(struct sd *sd) | |||
130 | ret = sd->gspca_dev.usb_buf[0] | | 130 | ret = sd->gspca_dev.usb_buf[0] | |
131 | (sd->gspca_dev.usb_buf[1] << 8); | 131 | (sd->gspca_dev.usb_buf[1] << 8); |
132 | else | 132 | else |
133 | PDEBUG(D_ERR, "Read SB reg [01] failed"); | 133 | err("Read SB reg [01] failed"); |
134 | 134 | ||
135 | udelay(W9968CF_I2C_BUS_DELAY); | 135 | udelay(W9968CF_I2C_BUS_DELAY); |
136 | 136 | ||
diff --git a/drivers/media/video/gspca/xirlink_cit.c b/drivers/media/video/gspca/xirlink_cit.c index 36aa44f2464f..8715577bc2d8 100644 --- a/drivers/media/video/gspca/xirlink_cit.c +++ b/drivers/media/video/gspca/xirlink_cit.c | |||
@@ -798,7 +798,7 @@ static int cit_write_reg(struct gspca_dev *gspca_dev, u16 value, u16 index) | |||
798 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, | 798 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, |
799 | value, index, NULL, 0, 1000); | 799 | value, index, NULL, 0, 1000); |
800 | if (err < 0) | 800 | if (err < 0) |
801 | PDEBUG(D_ERR, "Failed to write a register (index 0x%04X," | 801 | err("Failed to write a register (index 0x%04X," |
802 | " value 0x%02X, error %d)", index, value, err); | 802 | " value 0x%02X, error %d)", index, value, err); |
803 | 803 | ||
804 | return 0; | 804 | return 0; |
@@ -814,8 +814,7 @@ static int cit_read_reg(struct gspca_dev *gspca_dev, u16 index) | |||
814 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, | 814 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, |
815 | 0x00, index, buf, 8, 1000); | 815 | 0x00, index, buf, 8, 1000); |
816 | if (res < 0) { | 816 | if (res < 0) { |
817 | PDEBUG(D_ERR, | 817 | err("Failed to read a register (index 0x%04X, error %d)", |
818 | "Failed to read a register (index 0x%04X, error %d)", | ||
819 | index, res); | 818 | index, res); |
820 | return res; | 819 | return res; |
821 | } | 820 | } |
@@ -1586,7 +1585,7 @@ static int cit_get_packet_size(struct gspca_dev *gspca_dev) | |||
1586 | intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); | 1585 | intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); |
1587 | alt = usb_altnum_to_altsetting(intf, gspca_dev->alt); | 1586 | alt = usb_altnum_to_altsetting(intf, gspca_dev->alt); |
1588 | if (!alt) { | 1587 | if (!alt) { |
1589 | PDEBUG(D_ERR, "Couldn't get altsetting"); | 1588 | err("Couldn't get altsetting"); |
1590 | return -EIO; | 1589 | return -EIO; |
1591 | } | 1590 | } |
1592 | 1591 | ||
@@ -2784,7 +2783,7 @@ static int sd_isoc_nego(struct gspca_dev *gspca_dev) | |||
2784 | 2783 | ||
2785 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 1); | 2784 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 1); |
2786 | if (ret < 0) | 2785 | if (ret < 0) |
2787 | PDEBUG(D_ERR|D_STREAM, "set alt 1 err %d", ret); | 2786 | err("set alt 1 err %d", ret); |
2788 | 2787 | ||
2789 | return ret; | 2788 | return ret; |
2790 | } | 2789 | } |
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 71d2b1be6f66..e2f1a0e1e2c2 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -5698,7 +5698,7 @@ static u8 reg_r_i(struct gspca_dev *gspca_dev, | |||
5698 | index, gspca_dev->usb_buf, 1, | 5698 | index, gspca_dev->usb_buf, 1, |
5699 | 500); | 5699 | 500); |
5700 | if (ret < 0) { | 5700 | if (ret < 0) { |
5701 | PDEBUG(D_ERR, "reg_r_i err %d", ret); | 5701 | err("reg_r_i err %d", ret); |
5702 | gspca_dev->usb_err = ret; | 5702 | gspca_dev->usb_err = ret; |
5703 | return 0; | 5703 | return 0; |
5704 | } | 5704 | } |
@@ -5730,7 +5730,7 @@ static void reg_w_i(struct gspca_dev *gspca_dev, | |||
5730 | value, index, NULL, 0, | 5730 | value, index, NULL, 0, |
5731 | 500); | 5731 | 500); |
5732 | if (ret < 0) { | 5732 | if (ret < 0) { |
5733 | PDEBUG(D_ERR, "reg_w_i err %d", ret); | 5733 | err("reg_w_i err %d", ret); |
5734 | gspca_dev->usb_err = ret; | 5734 | gspca_dev->usb_err = ret; |
5735 | } | 5735 | } |
5736 | } | 5736 | } |
@@ -6503,8 +6503,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
6503 | PDEBUG(D_PROBE, "Sensor Tas5130 (VF0250)"); | 6503 | PDEBUG(D_PROBE, "Sensor Tas5130 (VF0250)"); |
6504 | break; | 6504 | break; |
6505 | default: | 6505 | default: |
6506 | PDEBUG(D_PROBE, | 6506 | warn("Unknown sensor - set to TAS5130C"); |
6507 | "Unknown sensor - set to TAS5130C"); | ||
6508 | sd->sensor = SENSOR_TAS5130C; | 6507 | sd->sensor = SENSOR_TAS5130C; |
6509 | } | 6508 | } |
6510 | break; | 6509 | break; |
@@ -6610,7 +6609,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
6610 | sd->sensor = SENSOR_OV7620; /* same sensor (?) */ | 6609 | sd->sensor = SENSOR_OV7620; /* same sensor (?) */ |
6611 | break; | 6610 | break; |
6612 | default: | 6611 | default: |
6613 | PDEBUG(D_ERR|D_PROBE, "Unknown sensor %04x", sensor); | 6612 | err("Unknown sensor %04x", sensor); |
6614 | return -EINVAL; | 6613 | return -EINVAL; |
6615 | } | 6614 | } |
6616 | } | 6615 | } |