diff options
author | Joe Perches <joe@perches.com> | 2011-08-21 18:56:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-04 10:06:05 -0400 |
commit | 133a9fe949862d9ed8411fb423739f4cee08232d (patch) | |
tree | 4a465a6823412503b73ef0462e3ffad3415fab39 /drivers/media/video | |
parent | 42f4e774a30d0e9894741b62af4174c73ecc53da (diff) |
[media] gspca: Use current logging styles
Add pr_fmt.
Convert usb style logging macros to pr_<level>.
Remove now unused old usb style logging macros.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
42 files changed, 338 insertions, 266 deletions
diff --git a/drivers/media/video/gspca/benq.c b/drivers/media/video/gspca/benq.c index a09c4709d613..f4357f77b2d6 100644 --- a/drivers/media/video/gspca/benq.c +++ b/drivers/media/video/gspca/benq.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #define MODULE_NAME "benq" | 23 | #define MODULE_NAME "benq" |
22 | 24 | ||
23 | #include "gspca.h" | 25 | #include "gspca.h" |
@@ -62,7 +64,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
62 | 0, | 64 | 0, |
63 | 500); | 65 | 500); |
64 | if (ret < 0) { | 66 | if (ret < 0) { |
65 | err("reg_w err %d", ret); | 67 | pr_err("reg_w err %d\n", ret); |
66 | gspca_dev->usb_err = ret; | 68 | gspca_dev->usb_err = ret; |
67 | } | 69 | } |
68 | } | 70 | } |
@@ -91,7 +93,7 @@ static int sd_isoc_init(struct gspca_dev *gspca_dev) | |||
91 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, | 93 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, |
92 | gspca_dev->nbalt - 1); | 94 | gspca_dev->nbalt - 1); |
93 | if (ret < 0) { | 95 | if (ret < 0) { |
94 | err("usb_set_interface failed"); | 96 | pr_err("usb_set_interface failed\n"); |
95 | return ret; | 97 | return ret; |
96 | } | 98 | } |
97 | /* reg_w(gspca_dev, 0x0003, 0x0002); */ | 99 | /* reg_w(gspca_dev, 0x0003, 0x0002); */ |
@@ -113,7 +115,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
113 | for (n = 0; n < 4; n++) { | 115 | for (n = 0; n < 4; n++) { |
114 | urb = usb_alloc_urb(SD_NPKT, GFP_KERNEL); | 116 | urb = usb_alloc_urb(SD_NPKT, GFP_KERNEL); |
115 | if (!urb) { | 117 | if (!urb) { |
116 | err("usb_alloc_urb failed"); | 118 | pr_err("usb_alloc_urb failed\n"); |
117 | return -ENOMEM; | 119 | return -ENOMEM; |
118 | } | 120 | } |
119 | gspca_dev->urb[n] = urb; | 121 | gspca_dev->urb[n] = urb; |
@@ -123,7 +125,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
123 | &urb->transfer_dma); | 125 | &urb->transfer_dma); |
124 | 126 | ||
125 | if (urb->transfer_buffer == NULL) { | 127 | if (urb->transfer_buffer == NULL) { |
126 | err("usb_alloc_coherent failed"); | 128 | pr_err("usb_alloc_coherent failed\n"); |
127 | return -ENOMEM; | 129 | return -ENOMEM; |
128 | } | 130 | } |
129 | urb->dev = gspca_dev->dev; | 131 | urb->dev = gspca_dev->dev; |
@@ -181,7 +183,7 @@ static void sd_isoc_irq(struct urb *urb) | |||
181 | if (gspca_dev->frozen) | 183 | if (gspca_dev->frozen) |
182 | return; | 184 | return; |
183 | #endif | 185 | #endif |
184 | err("urb status: %d", urb->status); | 186 | pr_err("urb status: %d\n", urb->status); |
185 | return; | 187 | return; |
186 | } | 188 | } |
187 | 189 | ||
@@ -209,7 +211,7 @@ static void sd_isoc_irq(struct urb *urb) | |||
209 | if (st == 0) | 211 | if (st == 0) |
210 | st = urb->iso_frame_desc[i].status; | 212 | st = urb->iso_frame_desc[i].status; |
211 | if (st) { | 213 | if (st) { |
212 | err("ISOC data error: [%d] status=%d", | 214 | pr_err("ISOC data error: [%d] status=%d\n", |
213 | i, st); | 215 | i, st); |
214 | gspca_dev->last_packet_type = DISCARD_PACKET; | 216 | gspca_dev->last_packet_type = DISCARD_PACKET; |
215 | continue; | 217 | continue; |
@@ -256,10 +258,10 @@ static void sd_isoc_irq(struct urb *urb) | |||
256 | /* resubmit the URBs */ | 258 | /* resubmit the URBs */ |
257 | st = usb_submit_urb(urb0, GFP_ATOMIC); | 259 | st = usb_submit_urb(urb0, GFP_ATOMIC); |
258 | if (st < 0) | 260 | if (st < 0) |
259 | err("usb_submit_urb(0) ret %d", st); | 261 | pr_err("usb_submit_urb(0) ret %d\n", st); |
260 | st = usb_submit_urb(urb, GFP_ATOMIC); | 262 | st = usb_submit_urb(urb, GFP_ATOMIC); |
261 | if (st < 0) | 263 | if (st < 0) |
262 | err("usb_submit_urb() ret %d", st); | 264 | pr_err("usb_submit_urb() ret %d\n", st); |
263 | } | 265 | } |
264 | 266 | ||
265 | /* sub-driver description */ | 267 | /* sub-driver description */ |
diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/video/gspca/conex.c index 8b398493f96b..4c56dbef6d92 100644 --- a/drivers/media/video/gspca/conex.c +++ b/drivers/media/video/gspca/conex.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "conex" | 24 | #define MODULE_NAME "conex" |
23 | 25 | ||
24 | #include "gspca.h" | 26 | #include "gspca.h" |
@@ -129,7 +131,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
129 | 131 | ||
130 | #ifdef GSPCA_DEBUG | 132 | #ifdef GSPCA_DEBUG |
131 | if (len > USB_BUF_SZ) { | 133 | if (len > USB_BUF_SZ) { |
132 | err("reg_r: buffer overflow"); | 134 | pr_err("reg_r: buffer overflow\n"); |
133 | return; | 135 | return; |
134 | } | 136 | } |
135 | #endif | 137 | #endif |
@@ -169,7 +171,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
169 | 171 | ||
170 | #ifdef GSPCA_DEBUG | 172 | #ifdef GSPCA_DEBUG |
171 | if (len > USB_BUF_SZ) { | 173 | if (len > USB_BUF_SZ) { |
172 | err("reg_w: buffer overflow"); | 174 | pr_err("reg_w: buffer overflow\n"); |
173 | return; | 175 | return; |
174 | } | 176 | } |
175 | PDEBUG(D_USBO, "reg write [%02x] = %02x..", index, *buffer); | 177 | PDEBUG(D_USBO, "reg write [%02x] = %02x..", index, *buffer); |
diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c index f2a9451eea19..f9b86b2484b0 100644 --- a/drivers/media/video/gspca/cpia1.c +++ b/drivers/media/video/gspca/cpia1.c | |||
@@ -26,6 +26,8 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
30 | |||
29 | #define MODULE_NAME "cpia1" | 31 | #define MODULE_NAME "cpia1" |
30 | 32 | ||
31 | #include <linux/input.h> | 33 | #include <linux/input.h> |
@@ -550,8 +552,7 @@ retry: | |||
550 | gspca_dev->usb_buf, databytes, 1000); | 552 | gspca_dev->usb_buf, databytes, 1000); |
551 | 553 | ||
552 | if (ret < 0) | 554 | if (ret < 0) |
553 | err("usb_control_msg %02x, error %d", command[1], | 555 | pr_err("usb_control_msg %02x, error %d\n", command[1], ret); |
554 | ret); | ||
555 | 556 | ||
556 | if (ret == -EPIPE && retries > 0) { | 557 | if (ret == -EPIPE && retries > 0) { |
557 | retries--; | 558 | retries--; |
@@ -1279,7 +1280,7 @@ static void monitor_exposure(struct gspca_dev *gspca_dev) | |||
1279 | cmd[7] = 0; | 1280 | cmd[7] = 0; |
1280 | ret = cpia_usb_transferCmd(gspca_dev, cmd); | 1281 | ret = cpia_usb_transferCmd(gspca_dev, cmd); |
1281 | if (ret) { | 1282 | if (ret) { |
1282 | err("ReadVPRegs(30,4,9,8) - failed: %d", ret); | 1283 | pr_err("ReadVPRegs(30,4,9,8) - failed: %d\n", ret); |
1283 | return; | 1284 | return; |
1284 | } | 1285 | } |
1285 | exp_acc = gspca_dev->usb_buf[0]; | 1286 | exp_acc = gspca_dev->usb_buf[0]; |
diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/video/gspca/etoms.c index 4b2c483fce6f..0357d6d461d1 100644 --- a/drivers/media/video/gspca/etoms.c +++ b/drivers/media/video/gspca/etoms.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #define MODULE_NAME "etoms" | 23 | #define MODULE_NAME "etoms" |
22 | 24 | ||
23 | #include "gspca.h" | 25 | #include "gspca.h" |
@@ -236,7 +238,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
236 | 238 | ||
237 | #ifdef GSPCA_DEBUG | 239 | #ifdef GSPCA_DEBUG |
238 | if (len > USB_BUF_SZ) { | 240 | if (len > USB_BUF_SZ) { |
239 | err("reg_r: buffer overflow"); | 241 | pr_err("reg_r: buffer overflow\n"); |
240 | return; | 242 | return; |
241 | } | 243 | } |
242 | #endif | 244 | #endif |
@@ -274,7 +276,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
274 | 276 | ||
275 | #ifdef GSPCA_DEBUG | 277 | #ifdef GSPCA_DEBUG |
276 | if (len > USB_BUF_SZ) { | 278 | if (len > USB_BUF_SZ) { |
277 | err("reg_w: buffer overflow"); | 279 | pr_err("reg_w: buffer overflow\n"); |
278 | return; | 280 | return; |
279 | } | 281 | } |
280 | PDEBUG(D_USBO, "reg write [%02x] = %02x..", index, *buffer); | 282 | PDEBUG(D_USBO, "reg write [%02x] = %02x..", index, *buffer); |
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 5da4879f47f2..a3c2d36da0c8 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
24 | #define MODULE_NAME "gspca" | 26 | #define MODULE_NAME "gspca" |
25 | 27 | ||
26 | #include <linux/init.h> | 28 | #include <linux/init.h> |
@@ -148,7 +150,7 @@ static void int_irq(struct urb *urb) | |||
148 | if (ret == 0) { | 150 | if (ret == 0) { |
149 | ret = usb_submit_urb(urb, GFP_ATOMIC); | 151 | ret = usb_submit_urb(urb, GFP_ATOMIC); |
150 | if (ret < 0) | 152 | if (ret < 0) |
151 | err("Resubmit URB failed with error %i", ret); | 153 | pr_err("Resubmit URB failed with error %i\n", ret); |
152 | } | 154 | } |
153 | } | 155 | } |
154 | 156 | ||
@@ -177,8 +179,8 @@ static int gspca_input_connect(struct gspca_dev *dev) | |||
177 | 179 | ||
178 | err = input_register_device(input_dev); | 180 | err = input_register_device(input_dev); |
179 | if (err) { | 181 | if (err) { |
180 | err("Input device registration failed with error %i", | 182 | pr_err("Input device registration failed with error %i\n", |
181 | err); | 183 | err); |
182 | input_dev->dev.parent = NULL; | 184 | input_dev->dev.parent = NULL; |
183 | input_free_device(input_dev); | 185 | input_free_device(input_dev); |
184 | } else { | 186 | } else { |
@@ -323,8 +325,8 @@ static void fill_frame(struct gspca_dev *gspca_dev, | |||
323 | /* check the packet status and length */ | 325 | /* check the packet status and length */ |
324 | st = urb->iso_frame_desc[i].status; | 326 | st = urb->iso_frame_desc[i].status; |
325 | if (st) { | 327 | if (st) { |
326 | err("ISOC data error: [%d] len=%d, status=%d", | 328 | pr_err("ISOC data error: [%d] len=%d, status=%d\n", |
327 | i, len, st); | 329 | i, len, st); |
328 | gspca_dev->last_packet_type = DISCARD_PACKET; | 330 | gspca_dev->last_packet_type = DISCARD_PACKET; |
329 | continue; | 331 | continue; |
330 | } | 332 | } |
@@ -346,7 +348,7 @@ resubmit: | |||
346 | /* resubmit the URB */ | 348 | /* resubmit the URB */ |
347 | st = usb_submit_urb(urb, GFP_ATOMIC); | 349 | st = usb_submit_urb(urb, GFP_ATOMIC); |
348 | if (st < 0) | 350 | if (st < 0) |
349 | err("usb_submit_urb() ret %d", st); | 351 | pr_err("usb_submit_urb() ret %d\n", st); |
350 | } | 352 | } |
351 | 353 | ||
352 | /* | 354 | /* |
@@ -400,7 +402,7 @@ resubmit: | |||
400 | if (gspca_dev->cam.bulk_nurbs != 0) { | 402 | if (gspca_dev->cam.bulk_nurbs != 0) { |
401 | st = usb_submit_urb(urb, GFP_ATOMIC); | 403 | st = usb_submit_urb(urb, GFP_ATOMIC); |
402 | if (st < 0) | 404 | if (st < 0) |
403 | err("usb_submit_urb() ret %d", st); | 405 | pr_err("usb_submit_urb() ret %d\n", st); |
404 | } | 406 | } |
405 | } | 407 | } |
406 | 408 | ||
@@ -464,7 +466,7 @@ void gspca_frame_add(struct gspca_dev *gspca_dev, | |||
464 | } else { | 466 | } else { |
465 | /* !! image is NULL only when last pkt is LAST or DISCARD | 467 | /* !! image is NULL only when last pkt is LAST or DISCARD |
466 | if (gspca_dev->image == NULL) { | 468 | if (gspca_dev->image == NULL) { |
467 | err("gspca_frame_add() image == NULL"); | 469 | pr_err("gspca_frame_add() image == NULL\n"); |
468 | return; | 470 | return; |
469 | } | 471 | } |
470 | */ | 472 | */ |
@@ -525,7 +527,7 @@ static int frame_alloc(struct gspca_dev *gspca_dev, struct file *file, | |||
525 | count = GSPCA_MAX_FRAMES - 1; | 527 | count = GSPCA_MAX_FRAMES - 1; |
526 | gspca_dev->frbuf = vmalloc_32(frsz * count); | 528 | gspca_dev->frbuf = vmalloc_32(frsz * count); |
527 | if (!gspca_dev->frbuf) { | 529 | if (!gspca_dev->frbuf) { |
528 | err("frame alloc failed"); | 530 | pr_err("frame alloc failed\n"); |
529 | return -ENOMEM; | 531 | return -ENOMEM; |
530 | } | 532 | } |
531 | gspca_dev->capt_file = file; | 533 | gspca_dev->capt_file = file; |
@@ -597,7 +599,7 @@ static int gspca_set_alt0(struct gspca_dev *gspca_dev) | |||
597 | return 0; | 599 | return 0; |
598 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 0); | 600 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 0); |
599 | if (ret < 0) | 601 | if (ret < 0) |
600 | err("set alt 0 err %d", ret); | 602 | pr_err("set alt 0 err %d\n", ret); |
601 | return ret; | 603 | return ret; |
602 | } | 604 | } |
603 | 605 | ||
@@ -673,7 +675,7 @@ static struct usb_host_endpoint *get_ep(struct gspca_dev *gspca_dev) | |||
673 | } | 675 | } |
674 | } | 676 | } |
675 | if (ep == NULL) { | 677 | if (ep == NULL) { |
676 | err("no transfer endpoint found"); | 678 | pr_err("no transfer endpoint found\n"); |
677 | return NULL; | 679 | return NULL; |
678 | } | 680 | } |
679 | PDEBUG(D_STREAM, "use alt %d ep 0x%02x", | 681 | PDEBUG(D_STREAM, "use alt %d ep 0x%02x", |
@@ -682,7 +684,7 @@ static struct usb_host_endpoint *get_ep(struct gspca_dev *gspca_dev) | |||
682 | if (gspca_dev->nbalt > 1) { | 684 | if (gspca_dev->nbalt > 1) { |
683 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, i); | 685 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, i); |
684 | if (ret < 0) { | 686 | if (ret < 0) { |
685 | err("set alt %d err %d", i, ret); | 687 | pr_err("set alt %d err %d\n", i, ret); |
686 | ep = NULL; | 688 | ep = NULL; |
687 | } | 689 | } |
688 | } | 690 | } |
@@ -731,7 +733,7 @@ static int create_urbs(struct gspca_dev *gspca_dev, | |||
731 | for (n = 0; n < nurbs; n++) { | 733 | for (n = 0; n < nurbs; n++) { |
732 | urb = usb_alloc_urb(npkt, GFP_KERNEL); | 734 | urb = usb_alloc_urb(npkt, GFP_KERNEL); |
733 | if (!urb) { | 735 | if (!urb) { |
734 | err("usb_alloc_urb failed"); | 736 | pr_err("usb_alloc_urb failed\n"); |
735 | return -ENOMEM; | 737 | return -ENOMEM; |
736 | } | 738 | } |
737 | gspca_dev->urb[n] = urb; | 739 | gspca_dev->urb[n] = urb; |
@@ -741,7 +743,7 @@ static int create_urbs(struct gspca_dev *gspca_dev, | |||
741 | &urb->transfer_dma); | 743 | &urb->transfer_dma); |
742 | 744 | ||
743 | if (urb->transfer_buffer == NULL) { | 745 | if (urb->transfer_buffer == NULL) { |
744 | err("usb_alloc_coherent failed"); | 746 | pr_err("usb_alloc_coherent failed\n"); |
745 | return -ENOMEM; | 747 | return -ENOMEM; |
746 | } | 748 | } |
747 | urb->dev = gspca_dev->dev; | 749 | urb->dev = gspca_dev->dev; |
@@ -854,8 +856,8 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) | |||
854 | break; | 856 | break; |
855 | gspca_stream_off(gspca_dev); | 857 | gspca_stream_off(gspca_dev); |
856 | if (ret != -ENOSPC) { | 858 | if (ret != -ENOSPC) { |
857 | err("usb_submit_urb alt %d err %d", | 859 | pr_err("usb_submit_urb alt %d err %d\n", |
858 | gspca_dev->alt, ret); | 860 | gspca_dev->alt, ret); |
859 | goto out; | 861 | goto out; |
860 | } | 862 | } |
861 | 863 | ||
@@ -2202,12 +2204,12 @@ int gspca_dev_probe2(struct usb_interface *intf, | |||
2202 | dev_size = sizeof *gspca_dev; | 2204 | dev_size = sizeof *gspca_dev; |
2203 | gspca_dev = kzalloc(dev_size, GFP_KERNEL); | 2205 | gspca_dev = kzalloc(dev_size, GFP_KERNEL); |
2204 | if (!gspca_dev) { | 2206 | if (!gspca_dev) { |
2205 | err("couldn't kzalloc gspca struct"); | 2207 | pr_err("couldn't kzalloc gspca struct\n"); |
2206 | return -ENOMEM; | 2208 | return -ENOMEM; |
2207 | } | 2209 | } |
2208 | gspca_dev->usb_buf = kmalloc(USB_BUF_SZ, GFP_KERNEL); | 2210 | gspca_dev->usb_buf = kmalloc(USB_BUF_SZ, GFP_KERNEL); |
2209 | if (!gspca_dev->usb_buf) { | 2211 | if (!gspca_dev->usb_buf) { |
2210 | err("out of memory"); | 2212 | pr_err("out of memory\n"); |
2211 | ret = -ENOMEM; | 2213 | ret = -ENOMEM; |
2212 | goto out; | 2214 | goto out; |
2213 | } | 2215 | } |
@@ -2264,7 +2266,7 @@ int gspca_dev_probe2(struct usb_interface *intf, | |||
2264 | VFL_TYPE_GRABBER, | 2266 | VFL_TYPE_GRABBER, |
2265 | -1); | 2267 | -1); |
2266 | if (ret < 0) { | 2268 | if (ret < 0) { |
2267 | err("video_register_device err %d", ret); | 2269 | pr_err("video_register_device err %d\n", ret); |
2268 | goto out; | 2270 | goto out; |
2269 | } | 2271 | } |
2270 | 2272 | ||
@@ -2296,8 +2298,8 @@ int gspca_dev_probe(struct usb_interface *intf, | |||
2296 | 2298 | ||
2297 | /* we don't handle multi-config cameras */ | 2299 | /* we don't handle multi-config cameras */ |
2298 | if (dev->descriptor.bNumConfigurations != 1) { | 2300 | if (dev->descriptor.bNumConfigurations != 1) { |
2299 | err("%04x:%04x too many config", | 2301 | pr_err("%04x:%04x too many config\n", |
2300 | id->idVendor, id->idProduct); | 2302 | id->idVendor, id->idProduct); |
2301 | return -ENODEV; | 2303 | return -ENODEV; |
2302 | } | 2304 | } |
2303 | 2305 | ||
@@ -2480,7 +2482,7 @@ EXPORT_SYMBOL(gspca_auto_gain_n_exposure); | |||
2480 | /* -- module insert / remove -- */ | 2482 | /* -- module insert / remove -- */ |
2481 | static int __init gspca_init(void) | 2483 | static int __init gspca_init(void) |
2482 | { | 2484 | { |
2483 | info("v" DRIVER_VERSION_NUMBER " registered"); | 2485 | pr_info("v" DRIVER_VERSION_NUMBER " registered\n"); |
2484 | return 0; | 2486 | return 0; |
2485 | } | 2487 | } |
2486 | static void __exit gspca_exit(void) | 2488 | static void __exit gspca_exit(void) |
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index 49e2fcbe81fb..e444f16e1497 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h | |||
@@ -14,11 +14,12 @@ | |||
14 | #ifdef GSPCA_DEBUG | 14 | #ifdef GSPCA_DEBUG |
15 | /* GSPCA our debug messages */ | 15 | /* GSPCA our debug messages */ |
16 | extern int gspca_debug; | 16 | extern int gspca_debug; |
17 | #define PDEBUG(level, fmt, args...) \ | 17 | #define PDEBUG(level, fmt, ...) \ |
18 | do {\ | 18 | do { \ |
19 | if (gspca_debug & (level)) \ | 19 | if (gspca_debug & (level)) \ |
20 | printk(KERN_INFO MODULE_NAME ": " fmt "\n", ## args); \ | 20 | pr_info(fmt, ##__VA_ARGS__); \ |
21 | } while (0) | 21 | } while (0) |
22 | |||
22 | #define D_ERR 0x01 | 23 | #define D_ERR 0x01 |
23 | #define D_PROBE 0x02 | 24 | #define D_PROBE 0x02 |
24 | #define D_CONF 0x04 | 25 | #define D_CONF 0x04 |
@@ -29,17 +30,8 @@ extern int gspca_debug; | |||
29 | #define D_USBO 0x00 | 30 | #define D_USBO 0x00 |
30 | #define D_V4L2 0x0100 | 31 | #define D_V4L2 0x0100 |
31 | #else | 32 | #else |
32 | #define PDEBUG(level, fmt, args...) | 33 | #define PDEBUG(level, fmt, ...) |
33 | #endif | 34 | #endif |
34 | #undef err | ||
35 | #define err(fmt, args...) \ | ||
36 | printk(KERN_ERR MODULE_NAME ": " fmt "\n", ## args) | ||
37 | #undef info | ||
38 | #define info(fmt, args...) \ | ||
39 | printk(KERN_INFO MODULE_NAME ": " fmt "\n", ## args) | ||
40 | #undef warn | ||
41 | #define warn(fmt, args...) \ | ||
42 | printk(KERN_WARNING MODULE_NAME ": " fmt "\n", ## args) | ||
43 | 35 | ||
44 | #define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */ | 36 | #define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */ |
45 | /* image transfers */ | 37 | /* image transfers */ |
diff --git a/drivers/media/video/gspca/jeilinj.c b/drivers/media/video/gspca/jeilinj.c index 1bd9c4b542dd..4ccc08d24510 100644 --- a/drivers/media/video/gspca/jeilinj.c +++ b/drivers/media/video/gspca/jeilinj.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
28 | |||
27 | #define MODULE_NAME "jeilinj" | 29 | #define MODULE_NAME "jeilinj" |
28 | 30 | ||
29 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
@@ -113,8 +115,8 @@ static void jlj_write2(struct gspca_dev *gspca_dev, unsigned char *command) | |||
113 | usb_sndbulkpipe(gspca_dev->dev, 3), | 115 | usb_sndbulkpipe(gspca_dev->dev, 3), |
114 | gspca_dev->usb_buf, 2, NULL, 500); | 116 | gspca_dev->usb_buf, 2, NULL, 500); |
115 | if (retval < 0) { | 117 | if (retval < 0) { |
116 | err("command write [%02x] error %d", | 118 | pr_err("command write [%02x] error %d\n", |
117 | gspca_dev->usb_buf[0], retval); | 119 | gspca_dev->usb_buf[0], retval); |
118 | gspca_dev->usb_err = retval; | 120 | gspca_dev->usb_err = retval; |
119 | } | 121 | } |
120 | } | 122 | } |
@@ -131,8 +133,8 @@ static void jlj_read1(struct gspca_dev *gspca_dev, unsigned char response) | |||
131 | gspca_dev->usb_buf, 1, NULL, 500); | 133 | gspca_dev->usb_buf, 1, NULL, 500); |
132 | response = gspca_dev->usb_buf[0]; | 134 | response = gspca_dev->usb_buf[0]; |
133 | if (retval < 0) { | 135 | if (retval < 0) { |
134 | err("read command [%02x] error %d", | 136 | pr_err("read command [%02x] error %d\n", |
135 | gspca_dev->usb_buf[0], retval); | 137 | gspca_dev->usb_buf[0], retval); |
136 | gspca_dev->usb_err = retval; | 138 | gspca_dev->usb_err = retval; |
137 | } | 139 | } |
138 | } | 140 | } |
diff --git a/drivers/media/video/gspca/kinect.c b/drivers/media/video/gspca/kinect.c index 26fc206f095e..9ed15a103477 100644 --- a/drivers/media/video/gspca/kinect.c +++ b/drivers/media/video/gspca/kinect.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
28 | |||
27 | #define MODULE_NAME "kinect" | 29 | #define MODULE_NAME "kinect" |
28 | 30 | ||
29 | #include "gspca.h" | 31 | #include "gspca.h" |
@@ -141,7 +143,7 @@ static int send_cmd(struct gspca_dev *gspca_dev, uint16_t cmd, void *cmdbuf, | |||
141 | struct cam_hdr *rhdr = (void *)ibuf; | 143 | struct cam_hdr *rhdr = (void *)ibuf; |
142 | 144 | ||
143 | if (cmd_len & 1 || cmd_len > (0x400 - sizeof(*chdr))) { | 145 | if (cmd_len & 1 || cmd_len > (0x400 - sizeof(*chdr))) { |
144 | err("send_cmd: Invalid command length (0x%x)", cmd_len); | 146 | pr_err("send_cmd: Invalid command length (0x%x)\n", cmd_len); |
145 | return -1; | 147 | return -1; |
146 | } | 148 | } |
147 | 149 | ||
@@ -157,7 +159,7 @@ static int send_cmd(struct gspca_dev *gspca_dev, uint16_t cmd, void *cmdbuf, | |||
157 | PDEBUG(D_USBO, "Control cmd=%04x tag=%04x len=%04x: %d", cmd, | 159 | PDEBUG(D_USBO, "Control cmd=%04x tag=%04x len=%04x: %d", cmd, |
158 | sd->cam_tag, cmd_len, res); | 160 | sd->cam_tag, cmd_len, res); |
159 | if (res < 0) { | 161 | if (res < 0) { |
160 | err("send_cmd: Output control transfer failed (%d)", res); | 162 | pr_err("send_cmd: Output control transfer failed (%d)\n", res); |
161 | return res; | 163 | return res; |
162 | } | 164 | } |
163 | 165 | ||
@@ -166,33 +168,35 @@ static int send_cmd(struct gspca_dev *gspca_dev, uint16_t cmd, void *cmdbuf, | |||
166 | } while (actual_len == 0); | 168 | } while (actual_len == 0); |
167 | PDEBUG(D_USBO, "Control reply: %d", res); | 169 | PDEBUG(D_USBO, "Control reply: %d", res); |
168 | if (actual_len < sizeof(*rhdr)) { | 170 | if (actual_len < sizeof(*rhdr)) { |
169 | err("send_cmd: Input control transfer failed (%d)", res); | 171 | pr_err("send_cmd: Input control transfer failed (%d)\n", res); |
170 | return res; | 172 | return res; |
171 | } | 173 | } |
172 | actual_len -= sizeof(*rhdr); | 174 | actual_len -= sizeof(*rhdr); |
173 | 175 | ||
174 | if (rhdr->magic[0] != 0x52 || rhdr->magic[1] != 0x42) { | 176 | if (rhdr->magic[0] != 0x52 || rhdr->magic[1] != 0x42) { |
175 | err("send_cmd: Bad magic %02x %02x", rhdr->magic[0], | 177 | pr_err("send_cmd: Bad magic %02x %02x\n", |
176 | rhdr->magic[1]); | 178 | rhdr->magic[0], rhdr->magic[1]); |
177 | return -1; | 179 | return -1; |
178 | } | 180 | } |
179 | if (rhdr->cmd != chdr->cmd) { | 181 | if (rhdr->cmd != chdr->cmd) { |
180 | err("send_cmd: Bad cmd %02x != %02x", rhdr->cmd, chdr->cmd); | 182 | pr_err("send_cmd: Bad cmd %02x != %02x\n", |
183 | rhdr->cmd, chdr->cmd); | ||
181 | return -1; | 184 | return -1; |
182 | } | 185 | } |
183 | if (rhdr->tag != chdr->tag) { | 186 | if (rhdr->tag != chdr->tag) { |
184 | err("send_cmd: Bad tag %04x != %04x", rhdr->tag, chdr->tag); | 187 | pr_err("send_cmd: Bad tag %04x != %04x\n", |
188 | rhdr->tag, chdr->tag); | ||
185 | return -1; | 189 | return -1; |
186 | } | 190 | } |
187 | if (cpu_to_le16(rhdr->len) != (actual_len/2)) { | 191 | if (cpu_to_le16(rhdr->len) != (actual_len/2)) { |
188 | err("send_cmd: Bad len %04x != %04x", | 192 | pr_err("send_cmd: Bad len %04x != %04x\n", |
189 | cpu_to_le16(rhdr->len), (int)(actual_len/2)); | 193 | cpu_to_le16(rhdr->len), (int)(actual_len/2)); |
190 | return -1; | 194 | return -1; |
191 | } | 195 | } |
192 | 196 | ||
193 | if (actual_len > reply_len) { | 197 | if (actual_len > reply_len) { |
194 | warn("send_cmd: Data buffer is %d bytes long, but got %d bytes", | 198 | pr_warn("send_cmd: Data buffer is %d bytes long, but got %d bytes\n", |
195 | reply_len, actual_len); | 199 | reply_len, actual_len); |
196 | memcpy(replybuf, ibuf+sizeof(*rhdr), reply_len); | 200 | memcpy(replybuf, ibuf+sizeof(*rhdr), reply_len); |
197 | } else { | 201 | } else { |
198 | memcpy(replybuf, ibuf+sizeof(*rhdr), actual_len); | 202 | memcpy(replybuf, ibuf+sizeof(*rhdr), actual_len); |
@@ -218,8 +222,8 @@ static int write_register(struct gspca_dev *gspca_dev, uint16_t reg, | |||
218 | if (res < 0) | 222 | if (res < 0) |
219 | return res; | 223 | return res; |
220 | if (res != 2) { | 224 | if (res != 2) { |
221 | warn("send_cmd returned %d [%04x %04x], 0000 expected", | 225 | pr_warn("send_cmd returned %d [%04x %04x], 0000 expected\n", |
222 | res, reply[0], reply[1]); | 226 | res, reply[0], reply[1]); |
223 | } | 227 | } |
224 | return 0; | 228 | return 0; |
225 | } | 229 | } |
@@ -353,8 +357,8 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, u8 *__data, int len) | |||
353 | return; | 357 | return; |
354 | 358 | ||
355 | if (hdr->magic[0] != 'R' || hdr->magic[1] != 'B') { | 359 | if (hdr->magic[0] != 'R' || hdr->magic[1] != 'B') { |
356 | warn("[Stream %02x] Invalid magic %02x%02x", sd->stream_flag, | 360 | pr_warn("[Stream %02x] Invalid magic %02x%02x\n", |
357 | hdr->magic[0], hdr->magic[1]); | 361 | sd->stream_flag, hdr->magic[0], hdr->magic[1]); |
358 | return; | 362 | return; |
359 | } | 363 | } |
360 | 364 | ||
@@ -368,7 +372,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, u8 *__data, int len) | |||
368 | gspca_frame_add(gspca_dev, LAST_PACKET, data, datalen); | 372 | gspca_frame_add(gspca_dev, LAST_PACKET, data, datalen); |
369 | 373 | ||
370 | else | 374 | else |
371 | warn("Packet type not recognized..."); | 375 | pr_warn("Packet type not recognized...\n"); |
372 | } | 376 | } |
373 | 377 | ||
374 | /* sub-driver description */ | 378 | /* sub-driver description */ |
diff --git a/drivers/media/video/gspca/konica.c b/drivers/media/video/gspca/konica.c index 5964691c0e95..f3f7fe0ec4b7 100644 --- a/drivers/media/video/gspca/konica.c +++ b/drivers/media/video/gspca/konica.c | |||
@@ -28,6 +28,8 @@ | |||
28 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 28 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
32 | |||
31 | #define MODULE_NAME "konica" | 33 | #define MODULE_NAME "konica" |
32 | 34 | ||
33 | #include <linux/input.h> | 35 | #include <linux/input.h> |
@@ -200,7 +202,7 @@ static void reg_w(struct gspca_dev *gspca_dev, u16 value, u16 index) | |||
200 | 0, | 202 | 0, |
201 | 1000); | 203 | 1000); |
202 | if (ret < 0) { | 204 | if (ret < 0) { |
203 | err("reg_w err %d", ret); | 205 | pr_err("reg_w err %d\n", ret); |
204 | gspca_dev->usb_err = ret; | 206 | gspca_dev->usb_err = ret; |
205 | } | 207 | } |
206 | } | 208 | } |
@@ -221,7 +223,7 @@ static void reg_r(struct gspca_dev *gspca_dev, u16 value, u16 index) | |||
221 | 2, | 223 | 2, |
222 | 1000); | 224 | 1000); |
223 | if (ret < 0) { | 225 | if (ret < 0) { |
224 | err("reg_w err %d", ret); | 226 | pr_err("reg_w err %d\n", ret); |
225 | gspca_dev->usb_err = ret; | 227 | gspca_dev->usb_err = ret; |
226 | } | 228 | } |
227 | } | 229 | } |
@@ -284,7 +286,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
284 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); | 286 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); |
285 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); | 287 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); |
286 | if (!alt) { | 288 | if (!alt) { |
287 | err("Couldn't get altsetting"); | 289 | pr_err("Couldn't get altsetting\n"); |
288 | return -EIO; | 290 | return -EIO; |
289 | } | 291 | } |
290 | 292 | ||
@@ -315,7 +317,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
315 | le16_to_cpu(alt->endpoint[i].desc.wMaxPacketSize); | 317 | le16_to_cpu(alt->endpoint[i].desc.wMaxPacketSize); |
316 | urb = usb_alloc_urb(SD_NPKT, GFP_KERNEL); | 318 | urb = usb_alloc_urb(SD_NPKT, GFP_KERNEL); |
317 | if (!urb) { | 319 | if (!urb) { |
318 | err("usb_alloc_urb failed"); | 320 | pr_err("usb_alloc_urb failed\n"); |
319 | return -ENOMEM; | 321 | return -ENOMEM; |
320 | } | 322 | } |
321 | gspca_dev->urb[n] = urb; | 323 | gspca_dev->urb[n] = urb; |
@@ -324,7 +326,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
324 | GFP_KERNEL, | 326 | GFP_KERNEL, |
325 | &urb->transfer_dma); | 327 | &urb->transfer_dma); |
326 | if (urb->transfer_buffer == NULL) { | 328 | if (urb->transfer_buffer == NULL) { |
327 | err("usb_buffer_alloc failed"); | 329 | pr_err("usb_buffer_alloc failed\n"); |
328 | return -ENOMEM; | 330 | return -ENOMEM; |
329 | } | 331 | } |
330 | 332 | ||
@@ -386,7 +388,7 @@ static void sd_isoc_irq(struct urb *urb) | |||
386 | PDEBUG(D_ERR, "urb status: %d", urb->status); | 388 | PDEBUG(D_ERR, "urb status: %d", urb->status); |
387 | st = usb_submit_urb(urb, GFP_ATOMIC); | 389 | st = usb_submit_urb(urb, GFP_ATOMIC); |
388 | if (st < 0) | 390 | if (st < 0) |
389 | err("resubmit urb error %d", st); | 391 | pr_err("resubmit urb error %d\n", st); |
390 | return; | 392 | return; |
391 | } | 393 | } |
392 | 394 | ||
@@ -477,7 +479,7 @@ resubmit: | |||
477 | } | 479 | } |
478 | st = usb_submit_urb(status_urb, GFP_ATOMIC); | 480 | st = usb_submit_urb(status_urb, GFP_ATOMIC); |
479 | if (st < 0) | 481 | if (st < 0) |
480 | err("usb_submit_urb(status_urb) ret %d", st); | 482 | pr_err("usb_submit_urb(status_urb) ret %d\n", st); |
481 | } | 483 | } |
482 | 484 | ||
483 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) | 485 | 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 0196209a948a..ef45fa575752 100644 --- a/drivers/media/video/gspca/mars.c +++ b/drivers/media/video/gspca/mars.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "mars" | 24 | #define MODULE_NAME "mars" |
23 | 25 | ||
24 | #include "gspca.h" | 26 | #include "gspca.h" |
@@ -178,8 +180,8 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
178 | &alen, | 180 | &alen, |
179 | 500); /* timeout in milliseconds */ | 181 | 500); /* timeout in milliseconds */ |
180 | if (ret < 0) { | 182 | if (ret < 0) { |
181 | err("reg write [%02x] error %d", | 183 | pr_err("reg write [%02x] error %d\n", |
182 | gspca_dev->usb_buf[0], ret); | 184 | gspca_dev->usb_buf[0], ret); |
183 | gspca_dev->usb_err = ret; | 185 | gspca_dev->usb_err = ret; |
184 | } | 186 | } |
185 | } | 187 | } |
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c index 97e507967434..473e813b680e 100644 --- a/drivers/media/video/gspca/mr97310a.c +++ b/drivers/media/video/gspca/mr97310a.c | |||
@@ -40,6 +40,8 @@ | |||
40 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 40 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
44 | |||
43 | #define MODULE_NAME "mr97310a" | 45 | #define MODULE_NAME "mr97310a" |
44 | 46 | ||
45 | #include "gspca.h" | 47 | #include "gspca.h" |
@@ -267,7 +269,7 @@ static int mr_write(struct gspca_dev *gspca_dev, int len) | |||
267 | usb_sndbulkpipe(gspca_dev->dev, 4), | 269 | usb_sndbulkpipe(gspca_dev->dev, 4), |
268 | gspca_dev->usb_buf, len, NULL, 500); | 270 | gspca_dev->usb_buf, len, NULL, 500); |
269 | if (rc < 0) | 271 | if (rc < 0) |
270 | err("reg write [%02x] error %d", | 272 | pr_err("reg write [%02x] error %d\n", |
271 | gspca_dev->usb_buf[0], rc); | 273 | gspca_dev->usb_buf[0], rc); |
272 | return rc; | 274 | return rc; |
273 | } | 275 | } |
@@ -281,7 +283,7 @@ static int mr_read(struct gspca_dev *gspca_dev, int len) | |||
281 | usb_rcvbulkpipe(gspca_dev->dev, 3), | 283 | usb_rcvbulkpipe(gspca_dev->dev, 3), |
282 | gspca_dev->usb_buf, len, NULL, 500); | 284 | gspca_dev->usb_buf, len, NULL, 500); |
283 | if (rc < 0) | 285 | if (rc < 0) |
284 | err("reg read [%02x] error %d", | 286 | pr_err("reg read [%02x] error %d\n", |
285 | gspca_dev->usb_buf[0], rc); | 287 | gspca_dev->usb_buf[0], rc); |
286 | return rc; | 288 | return rc; |
287 | } | 289 | } |
@@ -540,7 +542,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
540 | sd->sensor_type = 1; | 542 | sd->sensor_type = 1; |
541 | break; | 543 | break; |
542 | default: | 544 | default: |
543 | err("Unknown CIF Sensor id : %02x", | 545 | pr_err("Unknown CIF Sensor id : %02x\n", |
544 | gspca_dev->usb_buf[1]); | 546 | gspca_dev->usb_buf[1]); |
545 | return -ENODEV; | 547 | return -ENODEV; |
546 | } | 548 | } |
@@ -575,10 +577,10 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
575 | sd->sensor_type = 2; | 577 | sd->sensor_type = 2; |
576 | } else if ((gspca_dev->usb_buf[0] != 0x03) && | 578 | } else if ((gspca_dev->usb_buf[0] != 0x03) && |
577 | (gspca_dev->usb_buf[0] != 0x04)) { | 579 | (gspca_dev->usb_buf[0] != 0x04)) { |
578 | err("Unknown VGA Sensor id Byte 0: %02x", | 580 | pr_err("Unknown VGA Sensor id Byte 0: %02x\n", |
579 | gspca_dev->usb_buf[0]); | 581 | gspca_dev->usb_buf[0]); |
580 | err("Defaults assumed, may not work"); | 582 | pr_err("Defaults assumed, may not work\n"); |
581 | err("Please report this"); | 583 | pr_err("Please report this\n"); |
582 | } | 584 | } |
583 | /* Sakar Digital color needs to be adjusted. */ | 585 | /* Sakar Digital color needs to be adjusted. */ |
584 | if ((gspca_dev->usb_buf[0] == 0x03) && | 586 | if ((gspca_dev->usb_buf[0] == 0x03) && |
@@ -595,10 +597,10 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
595 | /* Nothing to do here. */ | 597 | /* Nothing to do here. */ |
596 | break; | 598 | break; |
597 | default: | 599 | default: |
598 | err("Unknown VGA Sensor id Byte 1: %02x", | 600 | pr_err("Unknown VGA Sensor id Byte 1: %02x\n", |
599 | gspca_dev->usb_buf[1]); | 601 | gspca_dev->usb_buf[1]); |
600 | err("Defaults assumed, may not work"); | 602 | pr_err("Defaults assumed, may not work\n"); |
601 | err("Please report this"); | 603 | pr_err("Please report this\n"); |
602 | } | 604 | } |
603 | } | 605 | } |
604 | PDEBUG(D_PROBE, "MR97310A VGA camera detected, sensor: %d", | 606 | PDEBUG(D_PROBE, "MR97310A VGA camera detected, sensor: %d", |
diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/video/gspca/nw80x.c index 8e754fd4dc5e..7681814e594f 100644 --- a/drivers/media/video/gspca/nw80x.c +++ b/drivers/media/video/gspca/nw80x.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #define MODULE_NAME "nw80x" | 25 | #define MODULE_NAME "nw80x" |
24 | 26 | ||
25 | #include "gspca.h" | 27 | #include "gspca.h" |
@@ -1571,7 +1573,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
1571 | len, | 1573 | len, |
1572 | 500); | 1574 | 500); |
1573 | if (ret < 0) { | 1575 | if (ret < 0) { |
1574 | err("reg_w err %d", ret); | 1576 | pr_err("reg_w err %d\n", ret); |
1575 | gspca_dev->usb_err = ret; | 1577 | gspca_dev->usb_err = ret; |
1576 | } | 1578 | } |
1577 | } | 1579 | } |
@@ -1592,7 +1594,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
1592 | 0x00, index, | 1594 | 0x00, index, |
1593 | gspca_dev->usb_buf, len, 500); | 1595 | gspca_dev->usb_buf, len, 500); |
1594 | if (ret < 0) { | 1596 | if (ret < 0) { |
1595 | err("reg_r err %d", ret); | 1597 | pr_err("reg_r err %d\n", ret); |
1596 | gspca_dev->usb_err = ret; | 1598 | gspca_dev->usb_err = ret; |
1597 | return; | 1599 | return; |
1598 | } | 1600 | } |
@@ -1802,7 +1804,8 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1802 | } | 1804 | } |
1803 | } | 1805 | } |
1804 | if (webcam_chip[sd->webcam] != sd->bridge) { | 1806 | if (webcam_chip[sd->webcam] != sd->bridge) { |
1805 | err("Bad webcam type %d for NW80%d", sd->webcam, sd->bridge); | 1807 | pr_err("Bad webcam type %d for NW80%d\n", |
1808 | sd->webcam, sd->bridge); | ||
1806 | gspca_dev->usb_err = -ENODEV; | 1809 | gspca_dev->usb_err = -ENODEV; |
1807 | return gspca_dev->usb_err; | 1810 | return gspca_dev->usb_err; |
1808 | } | 1811 | } |
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 0800433b2092..17d0d56fc126 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -36,6 +36,9 @@ | |||
36 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 36 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
37 | * | 37 | * |
38 | */ | 38 | */ |
39 | |||
40 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
41 | |||
39 | #define MODULE_NAME "ov519" | 42 | #define MODULE_NAME "ov519" |
40 | 43 | ||
41 | #include <linux/input.h> | 44 | #include <linux/input.h> |
@@ -2171,7 +2174,7 @@ static void reg_w(struct sd *sd, u16 index, u16 value) | |||
2171 | sd->gspca_dev.usb_buf, 1, 500); | 2174 | sd->gspca_dev.usb_buf, 1, 500); |
2172 | leave: | 2175 | leave: |
2173 | if (ret < 0) { | 2176 | if (ret < 0) { |
2174 | err("reg_w %02x failed %d", index, ret); | 2177 | pr_err("reg_w %02x failed %d\n", index, ret); |
2175 | sd->gspca_dev.usb_err = ret; | 2178 | sd->gspca_dev.usb_err = ret; |
2176 | return; | 2179 | return; |
2177 | } | 2180 | } |
@@ -2210,7 +2213,7 @@ static int reg_r(struct sd *sd, u16 index) | |||
2210 | PDEBUG(D_USBI, "GET %02x 0000 %04x %02x", | 2213 | PDEBUG(D_USBI, "GET %02x 0000 %04x %02x", |
2211 | req, index, ret); | 2214 | req, index, ret); |
2212 | } else { | 2215 | } else { |
2213 | err("reg_r %02x failed %d", index, ret); | 2216 | pr_err("reg_r %02x failed %d\n", index, ret); |
2214 | sd->gspca_dev.usb_err = ret; | 2217 | sd->gspca_dev.usb_err = ret; |
2215 | } | 2218 | } |
2216 | 2219 | ||
@@ -2235,7 +2238,7 @@ static int reg_r8(struct sd *sd, | |||
2235 | if (ret >= 0) { | 2238 | if (ret >= 0) { |
2236 | ret = sd->gspca_dev.usb_buf[0]; | 2239 | ret = sd->gspca_dev.usb_buf[0]; |
2237 | } else { | 2240 | } else { |
2238 | err("reg_r8 %02x failed %d", index, ret); | 2241 | pr_err("reg_r8 %02x failed %d\n", index, ret); |
2239 | sd->gspca_dev.usb_err = ret; | 2242 | sd->gspca_dev.usb_err = ret; |
2240 | } | 2243 | } |
2241 | 2244 | ||
@@ -2288,7 +2291,7 @@ static void ov518_reg_w32(struct sd *sd, u16 index, u32 value, int n) | |||
2288 | 0, index, | 2291 | 0, index, |
2289 | sd->gspca_dev.usb_buf, n, 500); | 2292 | sd->gspca_dev.usb_buf, n, 500); |
2290 | if (ret < 0) { | 2293 | if (ret < 0) { |
2291 | err("reg_w32 %02x failed %d", index, ret); | 2294 | pr_err("reg_w32 %02x failed %d\n", index, ret); |
2292 | sd->gspca_dev.usb_err = ret; | 2295 | sd->gspca_dev.usb_err = ret; |
2293 | } | 2296 | } |
2294 | } | 2297 | } |
@@ -2457,7 +2460,7 @@ static void ovfx2_i2c_w(struct sd *sd, u8 reg, u8 value) | |||
2457 | (u16) value, (u16) reg, NULL, 0, 500); | 2460 | (u16) value, (u16) reg, NULL, 0, 500); |
2458 | 2461 | ||
2459 | if (ret < 0) { | 2462 | if (ret < 0) { |
2460 | err("ovfx2_i2c_w %02x failed %d", reg, ret); | 2463 | pr_err("ovfx2_i2c_w %02x failed %d\n", reg, ret); |
2461 | sd->gspca_dev.usb_err = ret; | 2464 | sd->gspca_dev.usb_err = ret; |
2462 | } | 2465 | } |
2463 | 2466 | ||
@@ -2481,7 +2484,7 @@ static int ovfx2_i2c_r(struct sd *sd, u8 reg) | |||
2481 | ret = sd->gspca_dev.usb_buf[0]; | 2484 | ret = sd->gspca_dev.usb_buf[0]; |
2482 | PDEBUG(D_USBI, "ovfx2_i2c_r %02x %02x", reg, ret); | 2485 | PDEBUG(D_USBI, "ovfx2_i2c_r %02x %02x", reg, ret); |
2483 | } else { | 2486 | } else { |
2484 | err("ovfx2_i2c_r %02x failed %d", reg, ret); | 2487 | pr_err("ovfx2_i2c_r %02x failed %d\n", reg, ret); |
2485 | sd->gspca_dev.usb_err = ret; | 2488 | sd->gspca_dev.usb_err = ret; |
2486 | } | 2489 | } |
2487 | 2490 | ||
@@ -2727,7 +2730,7 @@ static void ov_hires_configure(struct sd *sd) | |||
2727 | int high, low; | 2730 | int high, low; |
2728 | 2731 | ||
2729 | if (sd->bridge != BRIDGE_OVFX2) { | 2732 | if (sd->bridge != BRIDGE_OVFX2) { |
2730 | err("error hires sensors only supported with ovfx2"); | 2733 | pr_err("error hires sensors only supported with ovfx2\n"); |
2731 | return; | 2734 | return; |
2732 | } | 2735 | } |
2733 | 2736 | ||
@@ -2762,7 +2765,7 @@ static void ov_hires_configure(struct sd *sd) | |||
2762 | } | 2765 | } |
2763 | break; | 2766 | break; |
2764 | } | 2767 | } |
2765 | err("Error unknown sensor type: %02x%02x", high, low); | 2768 | pr_err("Error unknown sensor type: %02x%02x\n", high, low); |
2766 | } | 2769 | } |
2767 | 2770 | ||
2768 | /* This initializes the OV8110, OV8610 sensor. The OV8110 uses | 2771 | /* This initializes the OV8110, OV8610 sensor. The OV8110 uses |
@@ -2783,7 +2786,7 @@ static void ov8xx0_configure(struct sd *sd) | |||
2783 | if ((rc & 3) == 1) | 2786 | if ((rc & 3) == 1) |
2784 | sd->sensor = SEN_OV8610; | 2787 | sd->sensor = SEN_OV8610; |
2785 | else | 2788 | else |
2786 | err("Unknown image sensor version: %d", rc & 3); | 2789 | pr_err("Unknown image sensor version: %d\n", rc & 3); |
2787 | } | 2790 | } |
2788 | 2791 | ||
2789 | /* This initializes the OV7610, OV7620, or OV76BE sensor. The OV76BE uses | 2792 | /* This initializes the OV7610, OV7620, or OV76BE sensor. The OV76BE uses |
@@ -2840,8 +2843,8 @@ static void ov7xx0_configure(struct sd *sd) | |||
2840 | if (high == 0x76) { | 2843 | if (high == 0x76) { |
2841 | switch (low) { | 2844 | switch (low) { |
2842 | case 0x30: | 2845 | case 0x30: |
2843 | err("Sensor is an OV7630/OV7635"); | 2846 | pr_err("Sensor is an OV7630/OV7635\n"); |
2844 | err("7630 is not supported by this driver"); | 2847 | pr_err("7630 is not supported by this driver\n"); |
2845 | return; | 2848 | return; |
2846 | case 0x40: | 2849 | case 0x40: |
2847 | PDEBUG(D_PROBE, "Sensor is an OV7645"); | 2850 | PDEBUG(D_PROBE, "Sensor is an OV7645"); |
@@ -2869,7 +2872,7 @@ static void ov7xx0_configure(struct sd *sd) | |||
2869 | sd->sensor = SEN_OV7620; | 2872 | sd->sensor = SEN_OV7620; |
2870 | } | 2873 | } |
2871 | } else { | 2874 | } else { |
2872 | err("Unknown image sensor version: %d", rc & 3); | 2875 | pr_err("Unknown image sensor version: %d\n", rc & 3); |
2873 | } | 2876 | } |
2874 | } | 2877 | } |
2875 | 2878 | ||
@@ -2892,8 +2895,7 @@ static void ov6xx0_configure(struct sd *sd) | |||
2892 | switch (rc) { | 2895 | switch (rc) { |
2893 | case 0x00: | 2896 | case 0x00: |
2894 | sd->sensor = SEN_OV6630; | 2897 | sd->sensor = SEN_OV6630; |
2895 | warn("WARNING: Sensor is an OV66308. Your camera may have"); | 2898 | pr_warn("WARNING: Sensor is an OV66308. Your camera may have been misdetected in previous driver versions.\n"); |
2896 | warn("been misdetected in previous driver versions."); | ||
2897 | break; | 2899 | break; |
2898 | case 0x01: | 2900 | case 0x01: |
2899 | sd->sensor = SEN_OV6620; | 2901 | sd->sensor = SEN_OV6620; |
@@ -2909,11 +2911,10 @@ static void ov6xx0_configure(struct sd *sd) | |||
2909 | break; | 2911 | break; |
2910 | case 0x90: | 2912 | case 0x90: |
2911 | sd->sensor = SEN_OV6630; | 2913 | sd->sensor = SEN_OV6630; |
2912 | warn("WARNING: Sensor is an OV66307. Your camera may have"); | 2914 | pr_warn("WARNING: Sensor is an OV66307. Your camera may have been misdetected in previous driver versions.\n"); |
2913 | warn("been misdetected in previous driver versions."); | ||
2914 | break; | 2915 | break; |
2915 | default: | 2916 | default: |
2916 | err("FATAL: Unknown sensor version: 0x%02x", rc); | 2917 | pr_err("FATAL: Unknown sensor version: 0x%02x\n", rc); |
2917 | return; | 2918 | return; |
2918 | } | 2919 | } |
2919 | 2920 | ||
@@ -3407,7 +3408,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
3407 | } else if (init_ov_sensor(sd, OV_HIRES_SID) >= 0) { | 3408 | } else if (init_ov_sensor(sd, OV_HIRES_SID) >= 0) { |
3408 | ov_hires_configure(sd); | 3409 | ov_hires_configure(sd); |
3409 | } else { | 3410 | } else { |
3410 | err("Can't determine sensor slave IDs"); | 3411 | pr_err("Can't determine sensor slave IDs\n"); |
3411 | goto error; | 3412 | goto error; |
3412 | } | 3413 | } |
3413 | 3414 | ||
@@ -3592,7 +3593,7 @@ static void ov511_mode_init_regs(struct sd *sd) | |||
3592 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); | 3593 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); |
3593 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); | 3594 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); |
3594 | if (!alt) { | 3595 | if (!alt) { |
3595 | err("Couldn't get altsetting"); | 3596 | pr_err("Couldn't get altsetting\n"); |
3596 | sd->gspca_dev.usb_err = -EIO; | 3597 | sd->gspca_dev.usb_err = -EIO; |
3597 | return; | 3598 | return; |
3598 | } | 3599 | } |
@@ -3715,7 +3716,7 @@ static void ov518_mode_init_regs(struct sd *sd) | |||
3715 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); | 3716 | intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); |
3716 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); | 3717 | alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); |
3717 | if (!alt) { | 3718 | if (!alt) { |
3718 | err("Couldn't get altsetting"); | 3719 | pr_err("Couldn't get altsetting\n"); |
3719 | sd->gspca_dev.usb_err = -EIO; | 3720 | sd->gspca_dev.usb_err = -EIO; |
3720 | return; | 3721 | return; |
3721 | } | 3722 | } |
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c index 0c6369b7fe18..76907eced4a1 100644 --- a/drivers/media/video/gspca/ov534.c +++ b/drivers/media/video/gspca/ov534.c | |||
@@ -28,6 +28,8 @@ | |||
28 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 28 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
32 | |||
31 | #define MODULE_NAME "ov534" | 33 | #define MODULE_NAME "ov534" |
32 | 34 | ||
33 | #include "gspca.h" | 35 | #include "gspca.h" |
@@ -775,7 +777,7 @@ static void ov534_reg_write(struct gspca_dev *gspca_dev, u16 reg, u8 val) | |||
775 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 777 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
776 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 778 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
777 | if (ret < 0) { | 779 | if (ret < 0) { |
778 | err("write failed %d", ret); | 780 | pr_err("write failed %d\n", ret); |
779 | gspca_dev->usb_err = ret; | 781 | gspca_dev->usb_err = ret; |
780 | } | 782 | } |
781 | } | 783 | } |
@@ -794,7 +796,7 @@ static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg) | |||
794 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 796 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
795 | PDEBUG(D_USBI, "GET 01 0000 %04x %02x", reg, gspca_dev->usb_buf[0]); | 797 | PDEBUG(D_USBI, "GET 01 0000 %04x %02x", reg, gspca_dev->usb_buf[0]); |
796 | if (ret < 0) { | 798 | if (ret < 0) { |
797 | err("read failed %d", ret); | 799 | pr_err("read failed %d\n", ret); |
798 | gspca_dev->usb_err = ret; | 800 | gspca_dev->usb_err = ret; |
799 | } | 801 | } |
800 | return gspca_dev->usb_buf[0]; | 802 | return gspca_dev->usb_buf[0]; |
@@ -858,7 +860,7 @@ static void sccb_reg_write(struct gspca_dev *gspca_dev, u8 reg, u8 val) | |||
858 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); | 860 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); |
859 | 861 | ||
860 | if (!sccb_check_status(gspca_dev)) { | 862 | if (!sccb_check_status(gspca_dev)) { |
861 | err("sccb_reg_write failed"); | 863 | pr_err("sccb_reg_write failed\n"); |
862 | gspca_dev->usb_err = -EIO; | 864 | gspca_dev->usb_err = -EIO; |
863 | } | 865 | } |
864 | } | 866 | } |
@@ -868,11 +870,11 @@ static u8 sccb_reg_read(struct gspca_dev *gspca_dev, u16 reg) | |||
868 | ov534_reg_write(gspca_dev, OV534_REG_SUBADDR, reg); | 870 | ov534_reg_write(gspca_dev, OV534_REG_SUBADDR, reg); |
869 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); | 871 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); |
870 | if (!sccb_check_status(gspca_dev)) | 872 | if (!sccb_check_status(gspca_dev)) |
871 | err("sccb_reg_read failed 1"); | 873 | pr_err("sccb_reg_read failed 1\n"); |
872 | 874 | ||
873 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); | 875 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); |
874 | if (!sccb_check_status(gspca_dev)) | 876 | if (!sccb_check_status(gspca_dev)) |
875 | err("sccb_reg_read failed 2"); | 877 | pr_err("sccb_reg_read failed 2\n"); |
876 | 878 | ||
877 | return ov534_reg_read(gspca_dev, OV534_REG_READ); | 879 | return ov534_reg_read(gspca_dev, OV534_REG_READ); |
878 | } | 880 | } |
diff --git a/drivers/media/video/gspca/ov534_9.c b/drivers/media/video/gspca/ov534_9.c index aaf5428c57f5..a954a31fdcde 100644 --- a/drivers/media/video/gspca/ov534_9.c +++ b/drivers/media/video/gspca/ov534_9.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
28 | |||
27 | #define MODULE_NAME "ov534_9" | 29 | #define MODULE_NAME "ov534_9" |
28 | 30 | ||
29 | #include "gspca.h" | 31 | #include "gspca.h" |
@@ -785,7 +787,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, | 787 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
786 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 788 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
787 | if (ret < 0) { | 789 | if (ret < 0) { |
788 | err("reg_w failed %d", ret); | 790 | pr_err("reg_w failed %d\n", ret); |
789 | gspca_dev->usb_err = ret; | 791 | gspca_dev->usb_err = ret; |
790 | } | 792 | } |
791 | } | 793 | } |
@@ -810,7 +812,7 @@ static u8 reg_r(struct gspca_dev *gspca_dev, u16 reg) | |||
810 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 812 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
811 | PDEBUG(D_USBI, "reg_r [%04x] -> %02x", reg, gspca_dev->usb_buf[0]); | 813 | PDEBUG(D_USBI, "reg_r [%04x] -> %02x", reg, gspca_dev->usb_buf[0]); |
812 | if (ret < 0) { | 814 | if (ret < 0) { |
813 | err("reg_r err %d", ret); | 815 | pr_err("reg_r err %d\n", ret); |
814 | gspca_dev->usb_err = ret; | 816 | gspca_dev->usb_err = ret; |
815 | } | 817 | } |
816 | return gspca_dev->usb_buf[0]; | 818 | return gspca_dev->usb_buf[0]; |
@@ -848,7 +850,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); | 850 | reg_w_i(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); |
849 | 851 | ||
850 | if (!sccb_check_status(gspca_dev)) | 852 | if (!sccb_check_status(gspca_dev)) |
851 | err("sccb_write failed"); | 853 | pr_err("sccb_write failed\n"); |
852 | } | 854 | } |
853 | 855 | ||
854 | static u8 sccb_read(struct gspca_dev *gspca_dev, u16 reg) | 856 | static u8 sccb_read(struct gspca_dev *gspca_dev, u16 reg) |
@@ -856,11 +858,11 @@ static u8 sccb_read(struct gspca_dev *gspca_dev, u16 reg) | |||
856 | reg_w(gspca_dev, OV534_REG_SUBADDR, reg); | 858 | reg_w(gspca_dev, OV534_REG_SUBADDR, reg); |
857 | reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); | 859 | reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); |
858 | if (!sccb_check_status(gspca_dev)) | 860 | if (!sccb_check_status(gspca_dev)) |
859 | err("sccb_read failed 1"); | 861 | pr_err("sccb_read failed 1\n"); |
860 | 862 | ||
861 | reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); | 863 | reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); |
862 | if (!sccb_check_status(gspca_dev)) | 864 | if (!sccb_check_status(gspca_dev)) |
863 | err("sccb_read failed 2"); | 865 | pr_err("sccb_read failed 2\n"); |
864 | 866 | ||
865 | return reg_r(gspca_dev, OV534_REG_READ); | 867 | return reg_r(gspca_dev, OV534_REG_READ); |
866 | } | 868 | } |
diff --git a/drivers/media/video/gspca/pac7302.c b/drivers/media/video/gspca/pac7302.c index 5615d7bd8304..1c44f78ff9e2 100644 --- a/drivers/media/video/gspca/pac7302.c +++ b/drivers/media/video/gspca/pac7302.c | |||
@@ -61,6 +61,8 @@ | |||
61 | 3 | 0x21 | sethvflip() | 61 | 3 | 0x21 | sethvflip() |
62 | */ | 62 | */ |
63 | 63 | ||
64 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
65 | |||
64 | #define MODULE_NAME "pac7302" | 66 | #define MODULE_NAME "pac7302" |
65 | 67 | ||
66 | #include <linux/input.h> | 68 | #include <linux/input.h> |
@@ -408,8 +410,8 @@ static void reg_w_buf(struct gspca_dev *gspca_dev, | |||
408 | index, gspca_dev->usb_buf, len, | 410 | index, gspca_dev->usb_buf, len, |
409 | 500); | 411 | 500); |
410 | if (ret < 0) { | 412 | if (ret < 0) { |
411 | err("reg_w_buf failed index 0x%02x, error %d", | 413 | pr_err("reg_w_buf failed index 0x%02x, error %d\n", |
412 | index, ret); | 414 | index, ret); |
413 | gspca_dev->usb_err = ret; | 415 | gspca_dev->usb_err = ret; |
414 | } | 416 | } |
415 | } | 417 | } |
@@ -431,8 +433,8 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
431 | 0, index, gspca_dev->usb_buf, 1, | 433 | 0, index, gspca_dev->usb_buf, 1, |
432 | 500); | 434 | 500); |
433 | if (ret < 0) { | 435 | if (ret < 0) { |
434 | err("reg_w() failed index 0x%02x, value 0x%02x, error %d", | 436 | pr_err("reg_w() failed index 0x%02x, value 0x%02x, error %d\n", |
435 | index, value, ret); | 437 | index, value, ret); |
436 | gspca_dev->usb_err = ret; | 438 | gspca_dev->usb_err = ret; |
437 | } | 439 | } |
438 | } | 440 | } |
@@ -466,9 +468,8 @@ static void reg_w_page(struct gspca_dev *gspca_dev, | |||
466 | 0, index, gspca_dev->usb_buf, 1, | 468 | 0, index, gspca_dev->usb_buf, 1, |
467 | 500); | 469 | 500); |
468 | if (ret < 0) { | 470 | if (ret < 0) { |
469 | err("reg_w_page() failed index 0x%02x, " | 471 | pr_err("reg_w_page() failed index 0x%02x, value 0x%02x, error %d\n", |
470 | "value 0x%02x, error %d", | 472 | index, page[index], ret); |
471 | index, page[index], ret); | ||
472 | gspca_dev->usb_err = ret; | 473 | gspca_dev->usb_err = ret; |
473 | break; | 474 | break; |
474 | } | 475 | } |
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index f8801b50e64f..7509d05dc065 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -49,6 +49,8 @@ | |||
49 | for max gain, 0x14 for minimal gain. | 49 | for max gain, 0x14 for minimal gain. |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
53 | |||
52 | #define MODULE_NAME "pac7311" | 54 | #define MODULE_NAME "pac7311" |
53 | 55 | ||
54 | #include <linux/input.h> | 56 | #include <linux/input.h> |
@@ -276,8 +278,8 @@ static void reg_w_buf(struct gspca_dev *gspca_dev, | |||
276 | index, gspca_dev->usb_buf, len, | 278 | index, gspca_dev->usb_buf, len, |
277 | 500); | 279 | 500); |
278 | if (ret < 0) { | 280 | if (ret < 0) { |
279 | err("reg_w_buf() failed index 0x%02x, error %d", | 281 | pr_err("reg_w_buf() failed index 0x%02x, error %d\n", |
280 | index, ret); | 282 | index, ret); |
281 | gspca_dev->usb_err = ret; | 283 | gspca_dev->usb_err = ret; |
282 | } | 284 | } |
283 | } | 285 | } |
@@ -299,8 +301,8 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
299 | 0, index, gspca_dev->usb_buf, 1, | 301 | 0, index, gspca_dev->usb_buf, 1, |
300 | 500); | 302 | 500); |
301 | if (ret < 0) { | 303 | if (ret < 0) { |
302 | err("reg_w() failed index 0x%02x, value 0x%02x, error %d", | 304 | pr_err("reg_w() failed index 0x%02x, value 0x%02x, error %d\n", |
303 | index, value, ret); | 305 | index, value, ret); |
304 | gspca_dev->usb_err = ret; | 306 | gspca_dev->usb_err = ret; |
305 | } | 307 | } |
306 | } | 308 | } |
@@ -334,9 +336,8 @@ static void reg_w_page(struct gspca_dev *gspca_dev, | |||
334 | 0, index, gspca_dev->usb_buf, 1, | 336 | 0, index, gspca_dev->usb_buf, 1, |
335 | 500); | 337 | 500); |
336 | if (ret < 0) { | 338 | if (ret < 0) { |
337 | err("reg_w_page() failed index 0x%02x, " | 339 | pr_err("reg_w_page() failed index 0x%02x, value 0x%02x, error %d\n", |
338 | "value 0x%02x, error %d", | 340 | index, page[index], ret); |
339 | index, page[index], ret); | ||
340 | gspca_dev->usb_err = ret; | 341 | gspca_dev->usb_err = ret; |
341 | break; | 342 | break; |
342 | } | 343 | } |
diff --git a/drivers/media/video/gspca/se401.c b/drivers/media/video/gspca/se401.c index 4c283c24c752..3b71bbcd977a 100644 --- a/drivers/media/video/gspca/se401.c +++ b/drivers/media/video/gspca/se401.c | |||
@@ -23,6 +23,8 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
27 | |||
26 | #define MODULE_NAME "se401" | 28 | #define MODULE_NAME "se401" |
27 | 29 | ||
28 | #define BULK_SIZE 4096 | 30 | #define BULK_SIZE 4096 |
@@ -144,8 +146,8 @@ static void se401_write_req(struct gspca_dev *gspca_dev, u16 req, u16 value, | |||
144 | value, 0, NULL, 0, 1000); | 146 | value, 0, NULL, 0, 1000); |
145 | if (err < 0) { | 147 | if (err < 0) { |
146 | if (!silent) | 148 | if (!silent) |
147 | err("write req failed req %#04x val %#04x error %d", | 149 | pr_err("write req failed req %#04x val %#04x error %d\n", |
148 | req, value, err); | 150 | req, value, err); |
149 | gspca_dev->usb_err = err; | 151 | gspca_dev->usb_err = err; |
150 | } | 152 | } |
151 | } | 153 | } |
@@ -158,7 +160,7 @@ static void se401_read_req(struct gspca_dev *gspca_dev, u16 req, int silent) | |||
158 | return; | 160 | return; |
159 | 161 | ||
160 | if (USB_BUF_SZ < READ_REQ_SIZE) { | 162 | if (USB_BUF_SZ < READ_REQ_SIZE) { |
161 | err("USB_BUF_SZ too small!!"); | 163 | pr_err("USB_BUF_SZ too small!!\n"); |
162 | gspca_dev->usb_err = -ENOBUFS; | 164 | gspca_dev->usb_err = -ENOBUFS; |
163 | return; | 165 | return; |
164 | } | 166 | } |
@@ -169,7 +171,8 @@ static void se401_read_req(struct gspca_dev *gspca_dev, u16 req, int silent) | |||
169 | 0, 0, gspca_dev->usb_buf, READ_REQ_SIZE, 1000); | 171 | 0, 0, gspca_dev->usb_buf, READ_REQ_SIZE, 1000); |
170 | if (err < 0) { | 172 | if (err < 0) { |
171 | if (!silent) | 173 | if (!silent) |
172 | err("read req failed req %#04x error %d", req, err); | 174 | pr_err("read req failed req %#04x error %d\n", |
175 | req, err); | ||
173 | gspca_dev->usb_err = err; | 176 | gspca_dev->usb_err = err; |
174 | } | 177 | } |
175 | } | 178 | } |
@@ -188,8 +191,8 @@ static void se401_set_feature(struct gspca_dev *gspca_dev, | |||
188 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 191 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
189 | param, selector, NULL, 0, 1000); | 192 | param, selector, NULL, 0, 1000); |
190 | if (err < 0) { | 193 | if (err < 0) { |
191 | err("set feature failed sel %#04x param %#04x error %d", | 194 | pr_err("set feature failed sel %#04x param %#04x error %d\n", |
192 | selector, param, err); | 195 | selector, param, err); |
193 | gspca_dev->usb_err = err; | 196 | gspca_dev->usb_err = err; |
194 | } | 197 | } |
195 | } | 198 | } |
@@ -202,7 +205,7 @@ static int se401_get_feature(struct gspca_dev *gspca_dev, u16 selector) | |||
202 | return gspca_dev->usb_err; | 205 | return gspca_dev->usb_err; |
203 | 206 | ||
204 | if (USB_BUF_SZ < 2) { | 207 | if (USB_BUF_SZ < 2) { |
205 | err("USB_BUF_SZ too small!!"); | 208 | pr_err("USB_BUF_SZ too small!!\n"); |
206 | gspca_dev->usb_err = -ENOBUFS; | 209 | gspca_dev->usb_err = -ENOBUFS; |
207 | return gspca_dev->usb_err; | 210 | return gspca_dev->usb_err; |
208 | } | 211 | } |
@@ -213,7 +216,8 @@ static int se401_get_feature(struct gspca_dev *gspca_dev, u16 selector) | |||
213 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 216 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
214 | 0, selector, gspca_dev->usb_buf, 2, 1000); | 217 | 0, selector, gspca_dev->usb_buf, 2, 1000); |
215 | if (err < 0) { | 218 | if (err < 0) { |
216 | err("get feature failed sel %#04x error %d", selector, err); | 219 | pr_err("get feature failed sel %#04x error %d\n", |
220 | selector, err); | ||
217 | gspca_dev->usb_err = err; | 221 | gspca_dev->usb_err = err; |
218 | return err; | 222 | return err; |
219 | } | 223 | } |
@@ -300,21 +304,21 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
300 | return gspca_dev->usb_err; | 304 | return gspca_dev->usb_err; |
301 | 305 | ||
302 | if (cd[1] != 0x41) { | 306 | if (cd[1] != 0x41) { |
303 | err("Wrong descriptor type"); | 307 | pr_err("Wrong descriptor type\n"); |
304 | return -ENODEV; | 308 | return -ENODEV; |
305 | } | 309 | } |
306 | 310 | ||
307 | if (!(cd[2] & SE401_FORMAT_BAYER)) { | 311 | if (!(cd[2] & SE401_FORMAT_BAYER)) { |
308 | err("Bayer format not supported!"); | 312 | pr_err("Bayer format not supported!\n"); |
309 | return -ENODEV; | 313 | return -ENODEV; |
310 | } | 314 | } |
311 | 315 | ||
312 | if (cd[3]) | 316 | if (cd[3]) |
313 | info("ExtraFeatures: %d", cd[3]); | 317 | pr_info("ExtraFeatures: %d\n", cd[3]); |
314 | 318 | ||
315 | n = cd[4] | (cd[5] << 8); | 319 | n = cd[4] | (cd[5] << 8); |
316 | if (n > MAX_MODES) { | 320 | if (n > MAX_MODES) { |
317 | err("Too many frame sizes"); | 321 | pr_err("Too many frame sizes\n"); |
318 | return -ENODEV; | 322 | return -ENODEV; |
319 | } | 323 | } |
320 | 324 | ||
@@ -353,15 +357,16 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
353 | sd->fmts[i].pixelformat = V4L2_PIX_FMT_SBGGR8; | 357 | sd->fmts[i].pixelformat = V4L2_PIX_FMT_SBGGR8; |
354 | sd->fmts[i].bytesperline = widths[i]; | 358 | sd->fmts[i].bytesperline = widths[i]; |
355 | sd->fmts[i].sizeimage = widths[i] * heights[i]; | 359 | sd->fmts[i].sizeimage = widths[i] * heights[i]; |
356 | info("Frame size: %dx%d bayer", widths[i], heights[i]); | 360 | pr_info("Frame size: %dx%d bayer\n", |
361 | widths[i], heights[i]); | ||
357 | } else { | 362 | } else { |
358 | /* Found a match use janggu compression */ | 363 | /* Found a match use janggu compression */ |
359 | sd->fmts[i].pixelformat = V4L2_PIX_FMT_SE401; | 364 | sd->fmts[i].pixelformat = V4L2_PIX_FMT_SE401; |
360 | sd->fmts[i].bytesperline = 0; | 365 | sd->fmts[i].bytesperline = 0; |
361 | sd->fmts[i].sizeimage = widths[i] * heights[i] * 3; | 366 | sd->fmts[i].sizeimage = widths[i] * heights[i] * 3; |
362 | info("Frame size: %dx%d 1/%dth janggu", | 367 | pr_info("Frame size: %dx%d 1/%dth janggu\n", |
363 | widths[i], heights[i], | 368 | widths[i], heights[i], |
364 | sd->fmts[i].priv * sd->fmts[i].priv); | 369 | sd->fmts[i].priv * sd->fmts[i].priv); |
365 | } | 370 | } |
366 | } | 371 | } |
367 | 372 | ||
@@ -571,11 +576,12 @@ static void sd_pkt_scan_janggu(struct gspca_dev *gspca_dev, u8 *data, int len) | |||
571 | plen = ((bits + 47) >> 4) << 1; | 576 | plen = ((bits + 47) >> 4) << 1; |
572 | /* Sanity checks */ | 577 | /* Sanity checks */ |
573 | if (plen > 1024) { | 578 | if (plen > 1024) { |
574 | err("invalid packet len %d restarting stream", plen); | 579 | pr_err("invalid packet len %d restarting stream\n", |
580 | plen); | ||
575 | goto error; | 581 | goto error; |
576 | } | 582 | } |
577 | if (info == 3) { | 583 | if (info == 3) { |
578 | err("unknown frame info value restarting stream"); | 584 | pr_err("unknown frame info value restarting stream\n"); |
579 | goto error; | 585 | goto error; |
580 | } | 586 | } |
581 | 587 | ||
@@ -599,8 +605,8 @@ static void sd_pkt_scan_janggu(struct gspca_dev *gspca_dev, u8 *data, int len) | |||
599 | break; | 605 | break; |
600 | case 1: /* EOF */ | 606 | case 1: /* EOF */ |
601 | if (sd->pixels_read != imagesize) { | 607 | if (sd->pixels_read != imagesize) { |
602 | err("frame size %d expected %d", | 608 | pr_err("frame size %d expected %d\n", |
603 | sd->pixels_read, imagesize); | 609 | sd->pixels_read, imagesize); |
604 | goto error; | 610 | goto error; |
605 | } | 611 | } |
606 | sd_complete_frame(gspca_dev, sd->packet, plen); | 612 | sd_complete_frame(gspca_dev, sd->packet, plen); |
diff --git a/drivers/media/video/gspca/sn9c2028.c b/drivers/media/video/gspca/sn9c2028.c index 4271f86dfe01..48aae3926a33 100644 --- a/drivers/media/video/gspca/sn9c2028.c +++ b/drivers/media/video/gspca/sn9c2028.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #define MODULE_NAME "sn9c2028" | 23 | #define MODULE_NAME "sn9c2028" |
22 | 24 | ||
23 | #include "gspca.h" | 25 | #include "gspca.h" |
@@ -75,8 +77,8 @@ static int sn9c2028_command(struct gspca_dev *gspca_dev, u8 *command) | |||
75 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 77 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
76 | 2, 0, gspca_dev->usb_buf, 6, 500); | 78 | 2, 0, gspca_dev->usb_buf, 6, 500); |
77 | if (rc < 0) { | 79 | if (rc < 0) { |
78 | err("command write [%02x] error %d", | 80 | pr_err("command write [%02x] error %d\n", |
79 | gspca_dev->usb_buf[0], rc); | 81 | gspca_dev->usb_buf[0], rc); |
80 | return rc; | 82 | return rc; |
81 | } | 83 | } |
82 | 84 | ||
@@ -93,7 +95,7 @@ static int sn9c2028_read1(struct gspca_dev *gspca_dev) | |||
93 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 95 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
94 | 1, 0, gspca_dev->usb_buf, 1, 500); | 96 | 1, 0, gspca_dev->usb_buf, 1, 500); |
95 | if (rc != 1) { | 97 | if (rc != 1) { |
96 | err("read1 error %d", rc); | 98 | pr_err("read1 error %d\n", rc); |
97 | return (rc < 0) ? rc : -EIO; | 99 | return (rc < 0) ? rc : -EIO; |
98 | } | 100 | } |
99 | PDEBUG(D_USBI, "read1 response %02x", gspca_dev->usb_buf[0]); | 101 | PDEBUG(D_USBI, "read1 response %02x", gspca_dev->usb_buf[0]); |
@@ -109,7 +111,7 @@ static int sn9c2028_read4(struct gspca_dev *gspca_dev, u8 *reading) | |||
109 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 111 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
110 | 4, 0, gspca_dev->usb_buf, 4, 500); | 112 | 4, 0, gspca_dev->usb_buf, 4, 500); |
111 | if (rc != 4) { | 113 | if (rc != 4) { |
112 | err("read4 error %d", rc); | 114 | pr_err("read4 error %d\n", rc); |
113 | return (rc < 0) ? rc : -EIO; | 115 | return (rc < 0) ? rc : -EIO; |
114 | } | 116 | } |
115 | memcpy(reading, gspca_dev->usb_buf, 4); | 117 | memcpy(reading, gspca_dev->usb_buf, 4); |
@@ -131,7 +133,7 @@ static int sn9c2028_long_command(struct gspca_dev *gspca_dev, u8 *command) | |||
131 | for (i = 0; i < 256 && status < 2; i++) | 133 | for (i = 0; i < 256 && status < 2; i++) |
132 | status = sn9c2028_read1(gspca_dev); | 134 | status = sn9c2028_read1(gspca_dev); |
133 | if (status != 2) { | 135 | if (status != 2) { |
134 | err("long command status read error %d", status); | 136 | pr_err("long command status read error %d\n", status); |
135 | return (status < 0) ? status : -EIO; | 137 | return (status < 0) ? status : -EIO; |
136 | } | 138 | } |
137 | 139 | ||
@@ -638,7 +640,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
638 | err_code = start_vivitar_cam(gspca_dev); | 640 | err_code = start_vivitar_cam(gspca_dev); |
639 | break; | 641 | break; |
640 | default: | 642 | default: |
641 | err("Starting unknown camera, please report this"); | 643 | pr_err("Starting unknown camera, please report this\n"); |
642 | return -ENXIO; | 644 | return -ENXIO; |
643 | } | 645 | } |
644 | 646 | ||
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 2ad757dc2e1c..816008fe5bfa 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "sonixj" | 24 | #define MODULE_NAME "sonixj" |
23 | 25 | ||
24 | #include <linux/input.h> | 26 | #include <linux/input.h> |
@@ -1395,7 +1397,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
1395 | return; | 1397 | return; |
1396 | #ifdef GSPCA_DEBUG | 1398 | #ifdef GSPCA_DEBUG |
1397 | if (len > USB_BUF_SZ) { | 1399 | if (len > USB_BUF_SZ) { |
1398 | err("reg_r: buffer overflow"); | 1400 | pr_err("reg_r: buffer overflow\n"); |
1399 | return; | 1401 | return; |
1400 | } | 1402 | } |
1401 | #endif | 1403 | #endif |
@@ -1408,7 +1410,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
1408 | 500); | 1410 | 500); |
1409 | PDEBUG(D_USBI, "reg_r [%02x] -> %02x", value, gspca_dev->usb_buf[0]); | 1411 | PDEBUG(D_USBI, "reg_r [%02x] -> %02x", value, gspca_dev->usb_buf[0]); |
1410 | if (ret < 0) { | 1412 | if (ret < 0) { |
1411 | err("reg_r err %d", ret); | 1413 | pr_err("reg_r err %d\n", ret); |
1412 | gspca_dev->usb_err = ret; | 1414 | gspca_dev->usb_err = ret; |
1413 | } | 1415 | } |
1414 | } | 1416 | } |
@@ -1432,7 +1434,7 @@ static void reg_w1(struct gspca_dev *gspca_dev, | |||
1432 | gspca_dev->usb_buf, 1, | 1434 | gspca_dev->usb_buf, 1, |
1433 | 500); | 1435 | 500); |
1434 | if (ret < 0) { | 1436 | if (ret < 0) { |
1435 | err("reg_w1 err %d", ret); | 1437 | pr_err("reg_w1 err %d\n", ret); |
1436 | gspca_dev->usb_err = ret; | 1438 | gspca_dev->usb_err = ret; |
1437 | } | 1439 | } |
1438 | } | 1440 | } |
@@ -1449,7 +1451,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
1449 | value, buffer[0], buffer[1]); | 1451 | value, buffer[0], buffer[1]); |
1450 | #ifdef GSPCA_DEBUG | 1452 | #ifdef GSPCA_DEBUG |
1451 | if (len > USB_BUF_SZ) { | 1453 | if (len > USB_BUF_SZ) { |
1452 | err("reg_w: buffer overflow"); | 1454 | pr_err("reg_w: buffer overflow\n"); |
1453 | return; | 1455 | return; |
1454 | } | 1456 | } |
1455 | #endif | 1457 | #endif |
@@ -1462,7 +1464,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
1462 | gspca_dev->usb_buf, len, | 1464 | gspca_dev->usb_buf, len, |
1463 | 500); | 1465 | 500); |
1464 | if (ret < 0) { | 1466 | if (ret < 0) { |
1465 | err("reg_w err %d", ret); | 1467 | pr_err("reg_w err %d\n", ret); |
1466 | gspca_dev->usb_err = ret; | 1468 | gspca_dev->usb_err = ret; |
1467 | } | 1469 | } |
1468 | } | 1470 | } |
@@ -1502,7 +1504,7 @@ static void i2c_w1(struct gspca_dev *gspca_dev, u8 reg, u8 val) | |||
1502 | gspca_dev->usb_buf, 8, | 1504 | gspca_dev->usb_buf, 8, |
1503 | 500); | 1505 | 500); |
1504 | if (ret < 0) { | 1506 | if (ret < 0) { |
1505 | err("i2c_w1 err %d", ret); | 1507 | pr_err("i2c_w1 err %d\n", ret); |
1506 | gspca_dev->usb_err = ret; | 1508 | gspca_dev->usb_err = ret; |
1507 | } | 1509 | } |
1508 | } | 1510 | } |
@@ -1527,7 +1529,7 @@ static void i2c_w8(struct gspca_dev *gspca_dev, | |||
1527 | 500); | 1529 | 500); |
1528 | msleep(2); | 1530 | msleep(2); |
1529 | if (ret < 0) { | 1531 | if (ret < 0) { |
1530 | err("i2c_w8 err %d", ret); | 1532 | pr_err("i2c_w8 err %d\n", ret); |
1531 | gspca_dev->usb_err = ret; | 1533 | gspca_dev->usb_err = ret; |
1532 | } | 1534 | } |
1533 | } | 1535 | } |
@@ -1591,7 +1593,7 @@ static void hv7131r_probe(struct gspca_dev *gspca_dev) | |||
1591 | PDEBUG(D_PROBE, "Sensor HV7131R found"); | 1593 | PDEBUG(D_PROBE, "Sensor HV7131R found"); |
1592 | return; | 1594 | return; |
1593 | } | 1595 | } |
1594 | warn("Erroneous HV7131R ID 0x%02x 0x%02x 0x%02x", | 1596 | pr_warn("Erroneous HV7131R ID 0x%02x 0x%02x 0x%02x\n", |
1595 | gspca_dev->usb_buf[0], gspca_dev->usb_buf[1], | 1597 | gspca_dev->usb_buf[0], gspca_dev->usb_buf[1], |
1596 | gspca_dev->usb_buf[2]); | 1598 | gspca_dev->usb_buf[2]); |
1597 | } | 1599 | } |
@@ -1710,7 +1712,7 @@ static void ov7648_probe(struct gspca_dev *gspca_dev) | |||
1710 | sd->sensor = SENSOR_PO1030; | 1712 | sd->sensor = SENSOR_PO1030; |
1711 | return; | 1713 | return; |
1712 | } | 1714 | } |
1713 | err("Unknown sensor %04x", val); | 1715 | pr_err("Unknown sensor %04x\n", val); |
1714 | } | 1716 | } |
1715 | 1717 | ||
1716 | /* 0c45:6142 sensor may be po2030n, gc0305 or gc0307 */ | 1718 | /* 0c45:6142 sensor may be po2030n, gc0305 or gc0307 */ |
@@ -1748,7 +1750,7 @@ static void po2030n_probe(struct gspca_dev *gspca_dev) | |||
1748 | PDEBUG(D_PROBE, "Sensor po2030n"); | 1750 | PDEBUG(D_PROBE, "Sensor po2030n"); |
1749 | /* sd->sensor = SENSOR_PO2030N; */ | 1751 | /* sd->sensor = SENSOR_PO2030N; */ |
1750 | } else { | 1752 | } else { |
1751 | err("Unknown sensor ID %04x", val); | 1753 | pr_err("Unknown sensor ID %04x\n", val); |
1752 | } | 1754 | } |
1753 | } | 1755 | } |
1754 | 1756 | ||
diff --git a/drivers/media/video/gspca/spca1528.c b/drivers/media/video/gspca/spca1528.c index 76c006b2bc83..4131be5df53f 100644 --- a/drivers/media/video/gspca/spca1528.c +++ b/drivers/media/video/gspca/spca1528.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #define MODULE_NAME "spca1528" | 23 | #define MODULE_NAME "spca1528" |
22 | 24 | ||
23 | #include "gspca.h" | 25 | #include "gspca.h" |
@@ -171,7 +173,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
171 | PDEBUG(D_USBI, "GET %02x 0000 %04x %02x", req, index, | 173 | PDEBUG(D_USBI, "GET %02x 0000 %04x %02x", req, index, |
172 | gspca_dev->usb_buf[0]); | 174 | gspca_dev->usb_buf[0]); |
173 | if (ret < 0) { | 175 | if (ret < 0) { |
174 | err("reg_r err %d", ret); | 176 | pr_err("reg_r err %d\n", ret); |
175 | gspca_dev->usb_err = ret; | 177 | gspca_dev->usb_err = ret; |
176 | } | 178 | } |
177 | } | 179 | } |
@@ -193,7 +195,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
193 | value, index, | 195 | value, index, |
194 | NULL, 0, 500); | 196 | NULL, 0, 500); |
195 | if (ret < 0) { | 197 | if (ret < 0) { |
196 | err("reg_w err %d", ret); | 198 | pr_err("reg_w err %d\n", ret); |
197 | gspca_dev->usb_err = ret; | 199 | gspca_dev->usb_err = ret; |
198 | } | 200 | } |
199 | } | 201 | } |
@@ -217,7 +219,7 @@ static void reg_wb(struct gspca_dev *gspca_dev, | |||
217 | value, index, | 219 | value, index, |
218 | gspca_dev->usb_buf, 1, 500); | 220 | gspca_dev->usb_buf, 1, 500); |
219 | if (ret < 0) { | 221 | if (ret < 0) { |
220 | err("reg_w err %d", ret); | 222 | pr_err("reg_w err %d\n", ret); |
221 | gspca_dev->usb_err = ret; | 223 | gspca_dev->usb_err = ret; |
222 | } | 224 | } |
223 | } | 225 | } |
diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c index 3e76951e3c19..bb82c94ece14 100644 --- a/drivers/media/video/gspca/spca500.c +++ b/drivers/media/video/gspca/spca500.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "spca500" | 24 | #define MODULE_NAME "spca500" |
23 | 25 | ||
24 | #include "gspca.h" | 26 | #include "gspca.h" |
@@ -396,7 +398,7 @@ static int reg_w(struct gspca_dev *gspca_dev, | |||
396 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 398 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
397 | value, index, NULL, 0, 500); | 399 | value, index, NULL, 0, 500); |
398 | if (ret < 0) | 400 | if (ret < 0) |
399 | err("reg write: error %d", ret); | 401 | pr_err("reg write: error %d\n", ret); |
400 | return ret; | 402 | return ret; |
401 | } | 403 | } |
402 | 404 | ||
@@ -418,7 +420,7 @@ static int reg_r_12(struct gspca_dev *gspca_dev, | |||
418 | gspca_dev->usb_buf, length, | 420 | gspca_dev->usb_buf, length, |
419 | 500); /* timeout */ | 421 | 500); /* timeout */ |
420 | if (ret < 0) { | 422 | if (ret < 0) { |
421 | err("reg_r_12 err %d", ret); | 423 | pr_err("reg_r_12 err %d\n", ret); |
422 | return ret; | 424 | return ret; |
423 | } | 425 | } |
424 | return (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]; | 426 | return (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]; |
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index f7ef282cc600..7aaac72aee91 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "spca501" | 24 | #define MODULE_NAME "spca501" |
23 | 25 | ||
24 | #include "gspca.h" | 26 | #include "gspca.h" |
@@ -1852,7 +1854,7 @@ static int reg_write(struct usb_device *dev, | |||
1852 | PDEBUG(D_USBO, "reg write: 0x%02x 0x%02x 0x%02x", | 1854 | PDEBUG(D_USBO, "reg write: 0x%02x 0x%02x 0x%02x", |
1853 | req, index, value); | 1855 | req, index, value); |
1854 | if (ret < 0) | 1856 | if (ret < 0) |
1855 | err("reg write: error %d", ret); | 1857 | pr_err("reg write: error %d\n", ret); |
1856 | return ret; | 1858 | return ret; |
1857 | } | 1859 | } |
1858 | 1860 | ||
diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/video/gspca/spca505.c index e5bf865147d7..16722dc60394 100644 --- a/drivers/media/video/gspca/spca505.c +++ b/drivers/media/video/gspca/spca505.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "spca505" | 24 | #define MODULE_NAME "spca505" |
23 | 25 | ||
24 | #include "gspca.h" | 26 | #include "gspca.h" |
@@ -578,7 +580,7 @@ static int reg_write(struct usb_device *dev, | |||
578 | PDEBUG(D_USBO, "reg write: 0x%02x,0x%02x:0x%02x, %d", | 580 | PDEBUG(D_USBO, "reg write: 0x%02x,0x%02x:0x%02x, %d", |
579 | req, index, value, ret); | 581 | req, index, value, ret); |
580 | if (ret < 0) | 582 | if (ret < 0) |
581 | err("reg write: error %d", ret); | 583 | pr_err("reg write: error %d\n", ret); |
582 | return ret; | 584 | return ret; |
583 | } | 585 | } |
584 | 586 | ||
@@ -685,8 +687,8 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
685 | return ret; | 687 | return ret; |
686 | } | 688 | } |
687 | if (ret != 0x0101) { | 689 | if (ret != 0x0101) { |
688 | err("After vector read returns 0x%04x should be 0x0101", | 690 | pr_err("After vector read returns 0x%04x should be 0x0101\n", |
689 | ret); | 691 | ret); |
690 | } | 692 | } |
691 | 693 | ||
692 | ret = reg_write(gspca_dev->dev, 0x06, 0x16, 0x0a); | 694 | ret = reg_write(gspca_dev->dev, 0x06, 0x16, 0x0a); |
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index 9d0b46027b93..a44fe3d25965 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #define MODULE_NAME "spca508" | 23 | #define MODULE_NAME "spca508" |
22 | 24 | ||
23 | #include "gspca.h" | 25 | #include "gspca.h" |
@@ -1275,7 +1277,7 @@ static int reg_write(struct usb_device *dev, | |||
1275 | PDEBUG(D_USBO, "reg write i:0x%04x = 0x%02x", | 1277 | PDEBUG(D_USBO, "reg write i:0x%04x = 0x%02x", |
1276 | index, value); | 1278 | index, value); |
1277 | if (ret < 0) | 1279 | if (ret < 0) |
1278 | err("reg write: error %d", ret); | 1280 | pr_err("reg write: error %d\n", ret); |
1279 | return ret; | 1281 | return ret; |
1280 | } | 1282 | } |
1281 | 1283 | ||
@@ -1297,7 +1299,7 @@ static int reg_read(struct gspca_dev *gspca_dev, | |||
1297 | PDEBUG(D_USBI, "reg read i:%04x --> %02x", | 1299 | PDEBUG(D_USBI, "reg read i:%04x --> %02x", |
1298 | index, gspca_dev->usb_buf[0]); | 1300 | index, gspca_dev->usb_buf[0]); |
1299 | if (ret < 0) { | 1301 | if (ret < 0) { |
1300 | err("reg_read err %d", ret); | 1302 | pr_err("reg_read err %d\n", ret); |
1301 | return ret; | 1303 | return ret; |
1302 | } | 1304 | } |
1303 | return gspca_dev->usb_buf[0]; | 1305 | return gspca_dev->usb_buf[0]; |
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index e836e778dfb6..c82fd53cef95 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #define MODULE_NAME "spca561" | 25 | #define MODULE_NAME "spca561" |
24 | 26 | ||
25 | #include <linux/input.h> | 27 | #include <linux/input.h> |
@@ -315,7 +317,7 @@ static void reg_w_val(struct usb_device *dev, __u16 index, __u8 value) | |||
315 | value, index, NULL, 0, 500); | 317 | value, index, NULL, 0, 500); |
316 | PDEBUG(D_USBO, "reg write: 0x%02x:0x%02x", index, value); | 318 | PDEBUG(D_USBO, "reg write: 0x%02x:0x%02x", index, value); |
317 | if (ret < 0) | 319 | if (ret < 0) |
318 | err("reg write: error %d", ret); | 320 | pr_err("reg write: error %d\n", ret); |
319 | } | 321 | } |
320 | 322 | ||
321 | static void write_vector(struct gspca_dev *gspca_dev, | 323 | 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 5ba96aff2252..df805f798282 100644 --- a/drivers/media/video/gspca/sq905.c +++ b/drivers/media/video/gspca/sq905.c | |||
@@ -33,6 +33,8 @@ | |||
33 | * drivers. | 33 | * drivers. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
37 | |||
36 | #define MODULE_NAME "sq905" | 38 | #define MODULE_NAME "sq905" |
37 | 39 | ||
38 | #include <linux/workqueue.h> | 40 | #include <linux/workqueue.h> |
@@ -123,8 +125,7 @@ static int sq905_command(struct gspca_dev *gspca_dev, u16 index) | |||
123 | SQ905_COMMAND, index, gspca_dev->usb_buf, 1, | 125 | SQ905_COMMAND, index, gspca_dev->usb_buf, 1, |
124 | SQ905_CMD_TIMEOUT); | 126 | SQ905_CMD_TIMEOUT); |
125 | if (ret < 0) { | 127 | if (ret < 0) { |
126 | err("%s: usb_control_msg failed (%d)", | 128 | pr_err("%s: usb_control_msg failed (%d)\n", __func__, ret); |
127 | __func__, ret); | ||
128 | return ret; | 129 | return ret; |
129 | } | 130 | } |
130 | 131 | ||
@@ -135,8 +136,7 @@ static int sq905_command(struct gspca_dev *gspca_dev, u16 index) | |||
135 | SQ905_PING, 0, gspca_dev->usb_buf, 1, | 136 | SQ905_PING, 0, gspca_dev->usb_buf, 1, |
136 | SQ905_CMD_TIMEOUT); | 137 | SQ905_CMD_TIMEOUT); |
137 | if (ret < 0) { | 138 | if (ret < 0) { |
138 | err("%s: usb_control_msg failed 2 (%d)", | 139 | pr_err("%s: usb_control_msg failed 2 (%d)\n", __func__, ret); |
139 | __func__, ret); | ||
140 | return ret; | 140 | return ret; |
141 | } | 141 | } |
142 | 142 | ||
@@ -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 | err("%s: usb_control_msg failed (%d)", __func__, ret); | 161 | pr_err("%s: usb_control_msg failed (%d)\n", __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 | err("%s: usb_control_msg failed (%d)", __func__, ret); | 189 | pr_err("%s: usb_control_msg failed (%d)\n", __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,8 +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 | err("bulk read fail (%d) len %d/%d", | 198 | pr_err("bulk read fail (%d) len %d/%d\n", ret, act_len, size); |
199 | ret, act_len, size); | ||
200 | return -EIO; | 199 | return -EIO; |
201 | } | 200 | } |
202 | return 0; | 201 | return 0; |
@@ -226,7 +225,7 @@ static void sq905_dostream(struct work_struct *work) | |||
226 | 225 | ||
227 | buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); | 226 | buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); |
228 | if (!buffer) { | 227 | if (!buffer) { |
229 | err("Couldn't allocate USB buffer"); | 228 | pr_err("Couldn't allocate USB buffer\n"); |
230 | goto quit_stream; | 229 | goto quit_stream; |
231 | } | 230 | } |
232 | 231 | ||
diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/video/gspca/sq905c.c index 457563b7a71b..c2c056056e08 100644 --- a/drivers/media/video/gspca/sq905c.c +++ b/drivers/media/video/gspca/sq905c.c | |||
@@ -27,6 +27,8 @@ | |||
27 | * and may contain code fragments from it. | 27 | * and may contain code fragments from it. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
31 | |||
30 | #define MODULE_NAME "sq905c" | 32 | #define MODULE_NAME "sq905c" |
31 | 33 | ||
32 | #include <linux/workqueue.h> | 34 | #include <linux/workqueue.h> |
@@ -95,8 +97,7 @@ static int sq905c_command(struct gspca_dev *gspca_dev, u16 command, u16 index) | |||
95 | command, index, NULL, 0, | 97 | command, index, NULL, 0, |
96 | SQ905C_CMD_TIMEOUT); | 98 | SQ905C_CMD_TIMEOUT); |
97 | if (ret < 0) { | 99 | if (ret < 0) { |
98 | err("%s: usb_control_msg failed (%d)", | 100 | pr_err("%s: usb_control_msg failed (%d)\n", __func__, ret); |
99 | __func__, ret); | ||
100 | return ret; | 101 | return ret; |
101 | } | 102 | } |
102 | 103 | ||
@@ -115,8 +116,7 @@ static int sq905c_read(struct gspca_dev *gspca_dev, u16 command, u16 index, | |||
115 | command, index, gspca_dev->usb_buf, size, | 116 | command, index, gspca_dev->usb_buf, size, |
116 | SQ905C_CMD_TIMEOUT); | 117 | SQ905C_CMD_TIMEOUT); |
117 | if (ret < 0) { | 118 | if (ret < 0) { |
118 | err("%s: usb_control_msg failed (%d)", | 119 | pr_err("%s: usb_control_msg failed (%d)\n", __func__, ret); |
119 | __func__, ret); | ||
120 | return ret; | 120 | return ret; |
121 | } | 121 | } |
122 | 122 | ||
@@ -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 | err("Couldn't allocate USB buffer"); | 149 | pr_err("Couldn't allocate USB buffer\n"); |
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 8215d5dcd456..e4255b4905e7 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #define MODULE_NAME "sq930x" | 25 | #define MODULE_NAME "sq930x" |
24 | 26 | ||
25 | #include "gspca.h" | 27 | #include "gspca.h" |
@@ -468,7 +470,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
468 | value, 0, gspca_dev->usb_buf, len, | 470 | value, 0, gspca_dev->usb_buf, len, |
469 | 500); | 471 | 500); |
470 | if (ret < 0) { | 472 | if (ret < 0) { |
471 | err("reg_r %04x failed %d", value, ret); | 473 | pr_err("reg_r %04x failed %d\n", value, ret); |
472 | gspca_dev->usb_err = ret; | 474 | gspca_dev->usb_err = ret; |
473 | } | 475 | } |
474 | } | 476 | } |
@@ -488,7 +490,7 @@ static void reg_w(struct gspca_dev *gspca_dev, u16 value, u16 index) | |||
488 | 500); | 490 | 500); |
489 | msleep(30); | 491 | msleep(30); |
490 | if (ret < 0) { | 492 | if (ret < 0) { |
491 | err("reg_w %04x %04x failed %d", value, index, ret); | 493 | pr_err("reg_w %04x %04x failed %d\n", value, index, ret); |
492 | gspca_dev->usb_err = ret; | 494 | gspca_dev->usb_err = ret; |
493 | } | 495 | } |
494 | } | 496 | } |
@@ -511,7 +513,7 @@ static void reg_wb(struct gspca_dev *gspca_dev, u16 value, u16 index, | |||
511 | 1000); | 513 | 1000); |
512 | msleep(30); | 514 | msleep(30); |
513 | if (ret < 0) { | 515 | if (ret < 0) { |
514 | err("reg_wb %04x %04x failed %d", value, index, ret); | 516 | pr_err("reg_wb %04x %04x failed %d\n", value, index, ret); |
515 | gspca_dev->usb_err = ret; | 517 | gspca_dev->usb_err = ret; |
516 | } | 518 | } |
517 | } | 519 | } |
@@ -556,7 +558,7 @@ static void i2c_write(struct sd *sd, | |||
556 | gspca_dev->usb_buf, buf - gspca_dev->usb_buf, | 558 | gspca_dev->usb_buf, buf - gspca_dev->usb_buf, |
557 | 500); | 559 | 500); |
558 | if (ret < 0) { | 560 | if (ret < 0) { |
559 | err("i2c_write failed %d", ret); | 561 | pr_err("i2c_write failed %d\n", ret); |
560 | gspca_dev->usb_err = ret; | 562 | gspca_dev->usb_err = ret; |
561 | } | 563 | } |
562 | } | 564 | } |
@@ -575,7 +577,7 @@ static void ucbus_write(struct gspca_dev *gspca_dev, | |||
575 | 577 | ||
576 | #ifdef GSPCA_DEBUG | 578 | #ifdef GSPCA_DEBUG |
577 | if ((batchsize - 1) * 3 > USB_BUF_SZ) { | 579 | if ((batchsize - 1) * 3 > USB_BUF_SZ) { |
578 | err("Bug: usb_buf overflow"); | 580 | pr_err("Bug: usb_buf overflow\n"); |
579 | gspca_dev->usb_err = -ENOMEM; | 581 | gspca_dev->usb_err = -ENOMEM; |
580 | return; | 582 | return; |
581 | } | 583 | } |
@@ -612,7 +614,7 @@ static void ucbus_write(struct gspca_dev *gspca_dev, | |||
612 | gspca_dev->usb_buf, buf - gspca_dev->usb_buf, | 614 | gspca_dev->usb_buf, buf - gspca_dev->usb_buf, |
613 | 500); | 615 | 500); |
614 | if (ret < 0) { | 616 | if (ret < 0) { |
615 | err("ucbus_write failed %d", ret); | 617 | pr_err("ucbus_write failed %d\n", ret); |
616 | gspca_dev->usb_err = ret; | 618 | gspca_dev->usb_err = ret; |
617 | return; | 619 | return; |
618 | } | 620 | } |
@@ -688,7 +690,7 @@ static void cmos_probe(struct gspca_dev *gspca_dev) | |||
688 | break; | 690 | break; |
689 | } | 691 | } |
690 | if (i >= ARRAY_SIZE(probe_order)) { | 692 | if (i >= ARRAY_SIZE(probe_order)) { |
691 | err("Unknown sensor"); | 693 | pr_err("Unknown sensor\n"); |
692 | gspca_dev->usb_err = -EINVAL; | 694 | gspca_dev->usb_err = -EINVAL; |
693 | return; | 695 | return; |
694 | } | 696 | } |
@@ -696,7 +698,8 @@ static void cmos_probe(struct gspca_dev *gspca_dev) | |||
696 | switch (sd->sensor) { | 698 | switch (sd->sensor) { |
697 | case SENSOR_OV7660: | 699 | case SENSOR_OV7660: |
698 | case SENSOR_OV9630: | 700 | case SENSOR_OV9630: |
699 | err("Sensor %s not yet treated", sensor_tb[sd->sensor].name); | 701 | pr_err("Sensor %s not yet treated\n", |
702 | sensor_tb[sd->sensor].name); | ||
700 | gspca_dev->usb_err = -EINVAL; | 703 | gspca_dev->usb_err = -EINVAL; |
701 | break; | 704 | break; |
702 | } | 705 | } |
@@ -1091,7 +1094,7 @@ static void sd_dq_callback(struct gspca_dev *gspca_dev) | |||
1091 | gspca_dev->cam.bulk_nurbs = 1; | 1094 | gspca_dev->cam.bulk_nurbs = 1; |
1092 | ret = usb_submit_urb(gspca_dev->urb[0], GFP_ATOMIC); | 1095 | ret = usb_submit_urb(gspca_dev->urb[0], GFP_ATOMIC); |
1093 | if (ret < 0) | 1096 | if (ret < 0) |
1094 | err("sd_dq_callback() err %d", ret); | 1097 | pr_err("sd_dq_callback() err %d\n", ret); |
1095 | 1098 | ||
1096 | /* wait a little time, otherwise the webcam crashes */ | 1099 | /* wait a little time, otherwise the webcam crashes */ |
1097 | msleep(100); | 1100 | msleep(100); |
diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/video/gspca/stk014.c index 763747700f10..42a7a28a6c8b 100644 --- a/drivers/media/video/gspca/stk014.c +++ b/drivers/media/video/gspca/stk014.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #define MODULE_NAME "stk014" | 23 | #define MODULE_NAME "stk014" |
22 | 24 | ||
23 | #include "gspca.h" | 25 | #include "gspca.h" |
@@ -137,7 +139,7 @@ static u8 reg_r(struct gspca_dev *gspca_dev, | |||
137 | gspca_dev->usb_buf, 1, | 139 | gspca_dev->usb_buf, 1, |
138 | 500); | 140 | 500); |
139 | if (ret < 0) { | 141 | if (ret < 0) { |
140 | err("reg_r err %d", ret); | 142 | pr_err("reg_r err %d\n", ret); |
141 | gspca_dev->usb_err = ret; | 143 | gspca_dev->usb_err = ret; |
142 | return 0; | 144 | return 0; |
143 | } | 145 | } |
@@ -162,7 +164,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
162 | 0, | 164 | 0, |
163 | 500); | 165 | 500); |
164 | if (ret < 0) { | 166 | if (ret < 0) { |
165 | err("reg_w err %d", ret); | 167 | pr_err("reg_w err %d\n", ret); |
166 | gspca_dev->usb_err = ret; | 168 | gspca_dev->usb_err = ret; |
167 | } | 169 | } |
168 | } | 170 | } |
@@ -192,7 +194,7 @@ static void rcv_val(struct gspca_dev *gspca_dev, | |||
192 | &alen, | 194 | &alen, |
193 | 500); /* timeout in milliseconds */ | 195 | 500); /* timeout in milliseconds */ |
194 | if (ret < 0) { | 196 | if (ret < 0) { |
195 | err("rcv_val err %d", ret); | 197 | pr_err("rcv_val err %d\n", ret); |
196 | gspca_dev->usb_err = ret; | 198 | gspca_dev->usb_err = ret; |
197 | } | 199 | } |
198 | } | 200 | } |
@@ -235,7 +237,7 @@ static void snd_val(struct gspca_dev *gspca_dev, | |||
235 | &alen, | 237 | &alen, |
236 | 500); /* timeout in milliseconds */ | 238 | 500); /* timeout in milliseconds */ |
237 | if (ret < 0) { | 239 | if (ret < 0) { |
238 | err("snd_val err %d", ret); | 240 | pr_err("snd_val err %d\n", ret); |
239 | gspca_dev->usb_err = ret; | 241 | gspca_dev->usb_err = ret; |
240 | } else { | 242 | } else { |
241 | if (ads == 0x003f08) { | 243 | if (ads == 0x003f08) { |
@@ -315,7 +317,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
315 | ret = reg_r(gspca_dev, 0x0740); | 317 | ret = reg_r(gspca_dev, 0x0740); |
316 | if (gspca_dev->usb_err >= 0) { | 318 | if (gspca_dev->usb_err >= 0) { |
317 | if (ret != 0xff) { | 319 | if (ret != 0xff) { |
318 | err("init reg: 0x%02x", ret); | 320 | pr_err("init reg: 0x%02x\n", ret); |
319 | gspca_dev->usb_err = -EIO; | 321 | gspca_dev->usb_err = -EIO; |
320 | } | 322 | } |
321 | } | 323 | } |
@@ -349,8 +351,8 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
349 | gspca_dev->iface, | 351 | gspca_dev->iface, |
350 | gspca_dev->alt); | 352 | gspca_dev->alt); |
351 | if (ret < 0) { | 353 | if (ret < 0) { |
352 | err("set intf %d %d failed", | 354 | pr_err("set intf %d %d failed\n", |
353 | gspca_dev->iface, gspca_dev->alt); | 355 | gspca_dev->iface, gspca_dev->alt); |
354 | gspca_dev->usb_err = ret; | 356 | gspca_dev->usb_err = ret; |
355 | goto out; | 357 | goto out; |
356 | } | 358 | } |
diff --git a/drivers/media/video/gspca/stv0680.c b/drivers/media/video/gspca/stv0680.c index e2ef41cf72d7..4dcc7e37f9fd 100644 --- a/drivers/media/video/gspca/stv0680.c +++ b/drivers/media/video/gspca/stv0680.c | |||
@@ -27,6 +27,8 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
31 | |||
30 | #define MODULE_NAME "stv0680" | 32 | #define MODULE_NAME "stv0680" |
31 | 33 | ||
32 | #include "gspca.h" | 34 | #include "gspca.h" |
@@ -79,7 +81,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); | 81 | val, 0, gspca_dev->usb_buf, size, 500); |
80 | 82 | ||
81 | if ((ret < 0) && (req != 0x0a)) | 83 | if ((ret < 0) && (req != 0x0a)) |
82 | err("usb_control_msg error %i, request = 0x%x, error = %i", | 84 | pr_err("usb_control_msg error %i, request = 0x%x, error = %i\n", |
83 | set, req, ret); | 85 | set, req, ret); |
84 | 86 | ||
85 | return ret; | 87 | return ret; |
@@ -236,7 +238,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
236 | 238 | ||
237 | if (stv_sndctrl(gspca_dev, 2, 0x06, 0x0100, 0x12) != 0x12 || | 239 | if (stv_sndctrl(gspca_dev, 2, 0x06, 0x0100, 0x12) != 0x12 || |
238 | gspca_dev->usb_buf[8] != 0x53 || gspca_dev->usb_buf[9] != 0x05) { | 240 | gspca_dev->usb_buf[8] != 0x53 || gspca_dev->usb_buf[9] != 0x05) { |
239 | err("Could not get descriptor 0100."); | 241 | pr_err("Could not get descriptor 0100\n"); |
240 | return stv0680_handle_error(gspca_dev, -EIO); | 242 | return stv0680_handle_error(gspca_dev, -EIO); |
241 | } | 243 | } |
242 | 244 | ||
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index abf1658fa33e..b1fca7db1015 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -27,6 +27,8 @@ | |||
27 | * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web | 27 | * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
31 | |||
30 | #include <linux/input.h> | 32 | #include <linux/input.h> |
31 | #include "stv06xx_sensor.h" | 33 | #include "stv06xx_sensor.h" |
32 | 34 | ||
@@ -189,7 +191,7 @@ int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value) | |||
189 | 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, | 191 | 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, |
190 | STV06XX_URB_MSG_TIMEOUT); | 192 | STV06XX_URB_MSG_TIMEOUT); |
191 | if (err < 0) { | 193 | if (err < 0) { |
192 | err("I2C: Read error writing address: %d", err); | 194 | pr_err("I2C: Read error writing address: %d\n", err); |
193 | return err; | 195 | return err; |
194 | } | 196 | } |
195 | 197 | ||
@@ -213,14 +215,14 @@ static void stv06xx_dump_bridge(struct sd *sd) | |||
213 | int i; | 215 | int i; |
214 | u8 data, buf; | 216 | u8 data, buf; |
215 | 217 | ||
216 | info("Dumping all stv06xx bridge registers"); | 218 | pr_info("Dumping all stv06xx bridge registers\n"); |
217 | for (i = 0x1400; i < 0x160f; i++) { | 219 | for (i = 0x1400; i < 0x160f; i++) { |
218 | stv06xx_read_bridge(sd, i, &data); | 220 | stv06xx_read_bridge(sd, i, &data); |
219 | 221 | ||
220 | info("Read 0x%x from address 0x%x", data, i); | 222 | pr_info("Read 0x%x from address 0x%x\n", data, i); |
221 | } | 223 | } |
222 | 224 | ||
223 | info("Testing stv06xx bridge registers for writability"); | 225 | pr_info("Testing stv06xx bridge registers for writability\n"); |
224 | for (i = 0x1400; i < 0x160f; i++) { | 226 | for (i = 0x1400; i < 0x160f; i++) { |
225 | stv06xx_read_bridge(sd, i, &data); | 227 | stv06xx_read_bridge(sd, i, &data); |
226 | buf = data; | 228 | buf = data; |
@@ -228,12 +230,12 @@ static void stv06xx_dump_bridge(struct sd *sd) | |||
228 | stv06xx_write_bridge(sd, i, 0xff); | 230 | stv06xx_write_bridge(sd, i, 0xff); |
229 | stv06xx_read_bridge(sd, i, &data); | 231 | stv06xx_read_bridge(sd, i, &data); |
230 | if (data == 0xff) | 232 | if (data == 0xff) |
231 | info("Register 0x%x is read/write", i); | 233 | pr_info("Register 0x%x is read/write\n", i); |
232 | else if (data != buf) | 234 | else if (data != buf) |
233 | info("Register 0x%x is read/write," | 235 | pr_info("Register 0x%x is read/write, but only partially\n", |
234 | " but only partially", i); | 236 | i); |
235 | else | 237 | else |
236 | info("Register 0x%x is read-only", i); | 238 | pr_info("Register 0x%x is read-only\n", i); |
237 | 239 | ||
238 | stv06xx_write_bridge(sd, i, buf); | 240 | stv06xx_write_bridge(sd, i, buf); |
239 | } | 241 | } |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c index b8156855f2b7..a8698b7a7566 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c | |||
@@ -28,6 +28,8 @@ | |||
28 | * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web | 28 | * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
32 | |||
31 | #include "stv06xx_hdcs.h" | 33 | #include "stv06xx_hdcs.h" |
32 | 34 | ||
33 | static const struct ctrl hdcs1x00_ctrl[] = { | 35 | static const struct ctrl hdcs1x00_ctrl[] = { |
@@ -428,7 +430,7 @@ static int hdcs_probe_1x00(struct sd *sd) | |||
428 | if (ret < 0 || sensor != 0x08) | 430 | if (ret < 0 || sensor != 0x08) |
429 | return -ENODEV; | 431 | return -ENODEV; |
430 | 432 | ||
431 | info("HDCS-1000/1100 sensor detected"); | 433 | pr_info("HDCS-1000/1100 sensor detected\n"); |
432 | 434 | ||
433 | sd->gspca_dev.cam.cam_mode = hdcs1x00_mode; | 435 | sd->gspca_dev.cam.cam_mode = hdcs1x00_mode; |
434 | sd->gspca_dev.cam.nmodes = ARRAY_SIZE(hdcs1x00_mode); | 436 | sd->gspca_dev.cam.nmodes = ARRAY_SIZE(hdcs1x00_mode); |
@@ -487,7 +489,7 @@ static int hdcs_probe_1020(struct sd *sd) | |||
487 | if (ret < 0 || sensor != 0x10) | 489 | if (ret < 0 || sensor != 0x10) |
488 | return -ENODEV; | 490 | return -ENODEV; |
489 | 491 | ||
490 | info("HDCS-1020 sensor detected"); | 492 | pr_info("HDCS-1020 sensor detected\n"); |
491 | 493 | ||
492 | sd->gspca_dev.cam.cam_mode = hdcs1020_mode; | 494 | sd->gspca_dev.cam.cam_mode = hdcs1020_mode; |
493 | sd->gspca_dev.cam.nmodes = ARRAY_SIZE(hdcs1020_mode); | 495 | sd->gspca_dev.cam.nmodes = ARRAY_SIZE(hdcs1020_mode); |
@@ -601,11 +603,11 @@ static int hdcs_dump(struct sd *sd) | |||
601 | { | 603 | { |
602 | u16 reg, val; | 604 | u16 reg, val; |
603 | 605 | ||
604 | info("Dumping sensor registers:"); | 606 | pr_info("Dumping sensor registers:\n"); |
605 | 607 | ||
606 | for (reg = HDCS_IDENT; reg <= HDCS_ROWEXPH; reg++) { | 608 | for (reg = HDCS_IDENT; reg <= HDCS_ROWEXPH; reg++) { |
607 | stv06xx_read_sensor(sd, reg, &val); | 609 | stv06xx_read_sensor(sd, reg, &val); |
608 | info("reg 0x%02x = 0x%02x", reg, val); | 610 | pr_info("reg 0x%02x = 0x%02x\n", reg, val); |
609 | } | 611 | } |
610 | return 0; | 612 | return 0; |
611 | } | 613 | } |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c b/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c index 75a5b9c2f15f..26f14fc4a135 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c | |||
@@ -44,6 +44,8 @@ | |||
44 | * PB_CFILLIN = R5 = 0x0E (14 dec) : Sets the frame rate | 44 | * PB_CFILLIN = R5 = 0x0E (14 dec) : Sets the frame rate |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
48 | |||
47 | #include "stv06xx_pb0100.h" | 49 | #include "stv06xx_pb0100.h" |
48 | 50 | ||
49 | static const struct ctrl pb0100_ctrl[] = { | 51 | static const struct ctrl pb0100_ctrl[] = { |
@@ -190,7 +192,7 @@ static int pb0100_probe(struct sd *sd) | |||
190 | if (!sensor_settings) | 192 | if (!sensor_settings) |
191 | return -ENOMEM; | 193 | return -ENOMEM; |
192 | 194 | ||
193 | info("Photobit pb0100 sensor detected"); | 195 | pr_info("Photobit pb0100 sensor detected\n"); |
194 | 196 | ||
195 | sd->gspca_dev.cam.cam_mode = pb0100_mode; | 197 | sd->gspca_dev.cam.cam_mode = pb0100_mode; |
196 | sd->gspca_dev.cam.nmodes = ARRAY_SIZE(pb0100_mode); | 198 | sd->gspca_dev.cam.nmodes = ARRAY_SIZE(pb0100_mode); |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c b/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c index 8a456de4970a..9940e035b3ab 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c | |||
@@ -26,6 +26,8 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
30 | |||
29 | #include "stv06xx_st6422.h" | 31 | #include "stv06xx_st6422.h" |
30 | 32 | ||
31 | /* controls */ | 33 | /* controls */ |
@@ -136,7 +138,7 @@ static int st6422_probe(struct sd *sd) | |||
136 | if (sd->bridge != BRIDGE_ST6422) | 138 | if (sd->bridge != BRIDGE_ST6422) |
137 | return -ENODEV; | 139 | return -ENODEV; |
138 | 140 | ||
139 | info("st6422 sensor detected"); | 141 | pr_info("st6422 sensor detected\n"); |
140 | 142 | ||
141 | sensor_settings = kmalloc(sizeof *sensor_settings, GFP_KERNEL); | 143 | sensor_settings = kmalloc(sizeof *sensor_settings, GFP_KERNEL); |
142 | if (!sensor_settings) | 144 | if (!sensor_settings) |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c index b05a15495144..a5c69d9ebdd4 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c | |||
@@ -27,6 +27,8 @@ | |||
27 | * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web | 27 | * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
31 | |||
30 | #include "stv06xx_vv6410.h" | 32 | #include "stv06xx_vv6410.h" |
31 | 33 | ||
32 | static struct v4l2_pix_format vv6410_mode[] = { | 34 | static struct v4l2_pix_format vv6410_mode[] = { |
@@ -112,7 +114,7 @@ static int vv6410_probe(struct sd *sd) | |||
112 | return -ENODEV; | 114 | return -ENODEV; |
113 | 115 | ||
114 | if (data == 0x19) { | 116 | if (data == 0x19) { |
115 | info("vv6410 sensor detected"); | 117 | pr_info("vv6410 sensor detected\n"); |
116 | 118 | ||
117 | sensor_settings = kmalloc(ARRAY_SIZE(vv6410_ctrl) * sizeof(s32), | 119 | sensor_settings = kmalloc(ARRAY_SIZE(vv6410_ctrl) * sizeof(s32), |
118 | GFP_KERNEL); | 120 | GFP_KERNEL); |
@@ -222,11 +224,11 @@ static int vv6410_dump(struct sd *sd) | |||
222 | u8 i; | 224 | u8 i; |
223 | int err = 0; | 225 | int err = 0; |
224 | 226 | ||
225 | info("Dumping all vv6410 sensor registers"); | 227 | pr_info("Dumping all vv6410 sensor registers\n"); |
226 | for (i = 0; i < 0xff && !err; i++) { | 228 | for (i = 0; i < 0xff && !err; i++) { |
227 | u16 data; | 229 | u16 data; |
228 | err = stv06xx_read_sensor(sd, i, &data); | 230 | err = stv06xx_read_sensor(sd, i, &data); |
229 | info("Register 0x%x contained 0x%x", i, data); | 231 | pr_info("Register 0x%x contained 0x%x\n", i, data); |
230 | } | 232 | } |
231 | return (err < 0) ? err : 0; | 233 | return (err < 0) ? err : 0; |
232 | } | 234 | } |
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index 6ec232902183..c8909772435a 100644 --- a/drivers/media/video/gspca/sunplus.c +++ b/drivers/media/video/gspca/sunplus.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "sunplus" | 24 | #define MODULE_NAME "sunplus" |
23 | 25 | ||
24 | #include "gspca.h" | 26 | #include "gspca.h" |
@@ -325,7 +327,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
325 | 327 | ||
326 | #ifdef GSPCA_DEBUG | 328 | #ifdef GSPCA_DEBUG |
327 | if (len > USB_BUF_SZ) { | 329 | if (len > USB_BUF_SZ) { |
328 | err("reg_r: buffer overflow"); | 330 | pr_err("reg_r: buffer overflow\n"); |
329 | return; | 331 | return; |
330 | } | 332 | } |
331 | #endif | 333 | #endif |
@@ -340,7 +342,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
340 | len ? gspca_dev->usb_buf : NULL, len, | 342 | len ? gspca_dev->usb_buf : NULL, len, |
341 | 500); | 343 | 500); |
342 | if (ret < 0) { | 344 | if (ret < 0) { |
343 | err("reg_r err %d", ret); | 345 | pr_err("reg_r err %d\n", ret); |
344 | gspca_dev->usb_err = ret; | 346 | gspca_dev->usb_err = ret; |
345 | } | 347 | } |
346 | } | 348 | } |
@@ -365,7 +367,7 @@ static void reg_w_1(struct gspca_dev *gspca_dev, | |||
365 | gspca_dev->usb_buf, 1, | 367 | gspca_dev->usb_buf, 1, |
366 | 500); | 368 | 500); |
367 | if (ret < 0) { | 369 | if (ret < 0) { |
368 | err("reg_w_1 err %d", ret); | 370 | pr_err("reg_w_1 err %d\n", ret); |
369 | gspca_dev->usb_err = ret; | 371 | gspca_dev->usb_err = ret; |
370 | } | 372 | } |
371 | } | 373 | } |
@@ -385,7 +387,7 @@ static void reg_w_riv(struct gspca_dev *gspca_dev, | |||
385 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 387 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
386 | value, index, NULL, 0, 500); | 388 | value, index, NULL, 0, 500); |
387 | if (ret < 0) { | 389 | if (ret < 0) { |
388 | err("reg_w_riv err %d", ret); | 390 | pr_err("reg_w_riv err %d\n", ret); |
389 | gspca_dev->usb_err = ret; | 391 | gspca_dev->usb_err = ret; |
390 | return; | 392 | return; |
391 | } | 393 | } |
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 6caed734a06a..7ee2c8271dcc 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #define MODULE_NAME "vc032x" | 25 | #define MODULE_NAME "vc032x" |
24 | 26 | ||
25 | #include "gspca.h" | 27 | #include "gspca.h" |
@@ -3169,7 +3171,7 @@ static void reg_r_i(struct gspca_dev *gspca_dev, | |||
3169 | index, gspca_dev->usb_buf, len, | 3171 | index, gspca_dev->usb_buf, len, |
3170 | 500); | 3172 | 500); |
3171 | if (ret < 0) { | 3173 | if (ret < 0) { |
3172 | err("reg_r err %d", ret); | 3174 | pr_err("reg_r err %d\n", ret); |
3173 | gspca_dev->usb_err = ret; | 3175 | gspca_dev->usb_err = ret; |
3174 | } | 3176 | } |
3175 | } | 3177 | } |
@@ -3210,7 +3212,7 @@ static void reg_w_i(struct gspca_dev *gspca_dev, | |||
3210 | value, index, NULL, 0, | 3212 | value, index, NULL, 0, |
3211 | 500); | 3213 | 500); |
3212 | if (ret < 0) { | 3214 | if (ret < 0) { |
3213 | err("reg_w err %d", ret); | 3215 | pr_err("reg_w err %d\n", ret); |
3214 | gspca_dev->usb_err = ret; | 3216 | gspca_dev->usb_err = ret; |
3215 | } | 3217 | } |
3216 | } | 3218 | } |
@@ -3235,8 +3237,7 @@ static u16 read_sensor_register(struct gspca_dev *gspca_dev, | |||
3235 | 3237 | ||
3236 | reg_r(gspca_dev, 0xa1, 0xb33f, 1); | 3238 | reg_r(gspca_dev, 0xa1, 0xb33f, 1); |
3237 | if (!(gspca_dev->usb_buf[0] & 0x02)) { | 3239 | if (!(gspca_dev->usb_buf[0] & 0x02)) { |
3238 | err("I2c Bus Busy Wait %02x", | 3240 | pr_err("I2c Bus Busy Wait %02x\n", gspca_dev->usb_buf[0]); |
3239 | gspca_dev->usb_buf[0]); | ||
3240 | return 0; | 3241 | return 0; |
3241 | } | 3242 | } |
3242 | reg_w(gspca_dev, 0xa0, address, 0xb33a); | 3243 | reg_w(gspca_dev, 0xa0, address, 0xb33a); |
@@ -3349,7 +3350,7 @@ static void i2c_write(struct gspca_dev *gspca_dev, | |||
3349 | msleep(20); | 3350 | msleep(20); |
3350 | } while (--retry > 0); | 3351 | } while (--retry > 0); |
3351 | if (retry <= 0) | 3352 | if (retry <= 0) |
3352 | err("i2c_write timeout"); | 3353 | pr_err("i2c_write timeout\n"); |
3353 | } | 3354 | } |
3354 | 3355 | ||
3355 | static void put_tab_to_reg(struct gspca_dev *gspca_dev, | 3356 | static void put_tab_to_reg(struct gspca_dev *gspca_dev, |
@@ -3446,7 +3447,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
3446 | 3447 | ||
3447 | switch (sensor) { | 3448 | switch (sensor) { |
3448 | case -1: | 3449 | case -1: |
3449 | err("Unknown sensor..."); | 3450 | pr_err("Unknown sensor...\n"); |
3450 | return -EINVAL; | 3451 | return -EINVAL; |
3451 | case SENSOR_HV7131R: | 3452 | case SENSOR_HV7131R: |
3452 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); | 3453 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); |
diff --git a/drivers/media/video/gspca/vicam.c b/drivers/media/video/gspca/vicam.c index 84dfbab923b5..81dd4c99d025 100644 --- a/drivers/media/video/gspca/vicam.c +++ b/drivers/media/video/gspca/vicam.c | |||
@@ -26,6 +26,8 @@ | |||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
30 | |||
29 | #define MODULE_NAME "vicam" | 31 | #define MODULE_NAME "vicam" |
30 | #define HEADER_SIZE 64 | 32 | #define HEADER_SIZE 64 |
31 | 33 | ||
@@ -117,7 +119,7 @@ static int vicam_control_msg(struct gspca_dev *gspca_dev, u8 request, | |||
117 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 119 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
118 | value, index, data, len, 1000); | 120 | value, index, data, len, 1000); |
119 | if (ret < 0) | 121 | if (ret < 0) |
120 | err("control msg req %02X error %d", request, ret); | 122 | pr_err("control msg req %02X error %d\n", request, ret); |
121 | 123 | ||
122 | return ret; | 124 | return ret; |
123 | } | 125 | } |
@@ -189,8 +191,8 @@ static int vicam_read_frame(struct gspca_dev *gspca_dev, u8 *data, int size) | |||
189 | data, size, &act_len, 10000); | 191 | data, size, &act_len, 10000); |
190 | /* successful, it returns 0, otherwise negative */ | 192 | /* successful, it returns 0, otherwise negative */ |
191 | if (ret < 0 || act_len != size) { | 193 | if (ret < 0 || act_len != size) { |
192 | err("bulk read fail (%d) len %d/%d", | 194 | pr_err("bulk read fail (%d) len %d/%d\n", |
193 | ret, act_len, size); | 195 | ret, act_len, size); |
194 | return -EIO; | 196 | return -EIO; |
195 | } | 197 | } |
196 | return 0; | 198 | return 0; |
@@ -216,7 +218,7 @@ static void vicam_dostream(struct work_struct *work) | |||
216 | HEADER_SIZE; | 218 | HEADER_SIZE; |
217 | buffer = kmalloc(frame_sz, GFP_KERNEL | GFP_DMA); | 219 | buffer = kmalloc(frame_sz, GFP_KERNEL | GFP_DMA); |
218 | if (!buffer) { | 220 | if (!buffer) { |
219 | err("Couldn't allocate USB buffer"); | 221 | pr_err("Couldn't allocate USB buffer\n"); |
220 | goto exit; | 222 | goto exit; |
221 | } | 223 | } |
222 | 224 | ||
@@ -269,7 +271,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
269 | ret = request_ihex_firmware(&fw, "vicam/firmware.fw", | 271 | ret = request_ihex_firmware(&fw, "vicam/firmware.fw", |
270 | &gspca_dev->dev->dev); | 272 | &gspca_dev->dev->dev); |
271 | if (ret) { | 273 | if (ret) { |
272 | err("Failed to load \"vicam/firmware.fw\": %d\n", ret); | 274 | pr_err("Failed to load \"vicam/firmware.fw\": %d\n", ret); |
273 | return ret; | 275 | return ret; |
274 | } | 276 | } |
275 | 277 | ||
diff --git a/drivers/media/video/gspca/w996Xcf.c b/drivers/media/video/gspca/w996Xcf.c index 4a9e622e5e1b..27d2cef0692a 100644 --- a/drivers/media/video/gspca/w996Xcf.c +++ b/drivers/media/video/gspca/w996Xcf.c | |||
@@ -31,6 +31,8 @@ | |||
31 | the sensor drivers to v4l2 sub drivers, and properly split of this | 31 | the sensor drivers to v4l2 sub drivers, and properly split of this |
32 | driver from ov519.c */ | 32 | driver from ov519.c */ |
33 | 33 | ||
34 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
35 | |||
34 | #define W9968CF_I2C_BUS_DELAY 4 /* delay in us for I2C bit r/w operations */ | 36 | #define W9968CF_I2C_BUS_DELAY 4 /* delay in us for I2C bit r/w operations */ |
35 | 37 | ||
36 | #define Y_QUANTABLE (&sd->jpeg_hdr[JPEG_QT0_OFFSET]) | 38 | #define Y_QUANTABLE (&sd->jpeg_hdr[JPEG_QT0_OFFSET]) |
@@ -81,7 +83,7 @@ static void w9968cf_write_fsb(struct sd *sd, u16* data) | |||
81 | USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE, | 83 | USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE, |
82 | value, 0x06, sd->gspca_dev.usb_buf, 6, 500); | 84 | value, 0x06, sd->gspca_dev.usb_buf, 6, 500); |
83 | if (ret < 0) { | 85 | if (ret < 0) { |
84 | err("Write FSB registers failed (%d)", ret); | 86 | pr_err("Write FSB registers failed (%d)\n", ret); |
85 | sd->gspca_dev.usb_err = ret; | 87 | sd->gspca_dev.usb_err = ret; |
86 | } | 88 | } |
87 | } | 89 | } |
@@ -108,7 +110,7 @@ static void w9968cf_write_sb(struct sd *sd, u16 value) | |||
108 | udelay(W9968CF_I2C_BUS_DELAY); | 110 | udelay(W9968CF_I2C_BUS_DELAY); |
109 | 111 | ||
110 | if (ret < 0) { | 112 | if (ret < 0) { |
111 | err("Write SB reg [01] %04x failed", value); | 113 | pr_err("Write SB reg [01] %04x failed\n", value); |
112 | sd->gspca_dev.usb_err = ret; | 114 | sd->gspca_dev.usb_err = ret; |
113 | } | 115 | } |
114 | } | 116 | } |
@@ -135,7 +137,7 @@ static int w9968cf_read_sb(struct sd *sd) | |||
135 | ret = sd->gspca_dev.usb_buf[0] | | 137 | ret = sd->gspca_dev.usb_buf[0] | |
136 | (sd->gspca_dev.usb_buf[1] << 8); | 138 | (sd->gspca_dev.usb_buf[1] << 8); |
137 | } else { | 139 | } else { |
138 | err("Read SB reg [01] failed"); | 140 | pr_err("Read SB reg [01] failed\n"); |
139 | sd->gspca_dev.usb_err = ret; | 141 | sd->gspca_dev.usb_err = ret; |
140 | } | 142 | } |
141 | 143 | ||
diff --git a/drivers/media/video/gspca/xirlink_cit.c b/drivers/media/video/gspca/xirlink_cit.c index c089a0f6f1d0..3aed42acdb5a 100644 --- a/drivers/media/video/gspca/xirlink_cit.c +++ b/drivers/media/video/gspca/xirlink_cit.c | |||
@@ -27,6 +27,8 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
31 | |||
30 | #define MODULE_NAME "xirlink-cit" | 32 | #define MODULE_NAME "xirlink-cit" |
31 | 33 | ||
32 | #include <linux/input.h> | 34 | #include <linux/input.h> |
@@ -800,8 +802,8 @@ static int cit_write_reg(struct gspca_dev *gspca_dev, u16 value, u16 index) | |||
800 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, | 802 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, |
801 | value, index, NULL, 0, 1000); | 803 | value, index, NULL, 0, 1000); |
802 | if (err < 0) | 804 | if (err < 0) |
803 | err("Failed to write a register (index 0x%04X," | 805 | pr_err("Failed to write a register (index 0x%04X, value 0x%02X, error %d)\n", |
804 | " value 0x%02X, error %d)", index, value, err); | 806 | index, value, err); |
805 | 807 | ||
806 | return 0; | 808 | return 0; |
807 | } | 809 | } |
@@ -816,8 +818,8 @@ static int cit_read_reg(struct gspca_dev *gspca_dev, u16 index, int verbose) | |||
816 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, | 818 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, |
817 | 0x00, index, buf, 8, 1000); | 819 | 0x00, index, buf, 8, 1000); |
818 | if (res < 0) { | 820 | if (res < 0) { |
819 | err("Failed to read a register (index 0x%04X, error %d)", | 821 | pr_err("Failed to read a register (index 0x%04X, error %d)\n", |
820 | index, res); | 822 | index, res); |
821 | return res; | 823 | return res; |
822 | } | 824 | } |
823 | 825 | ||
@@ -1587,7 +1589,7 @@ static int cit_get_packet_size(struct gspca_dev *gspca_dev) | |||
1587 | intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); | 1589 | intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); |
1588 | alt = usb_altnum_to_altsetting(intf, gspca_dev->alt); | 1590 | alt = usb_altnum_to_altsetting(intf, gspca_dev->alt); |
1589 | if (!alt) { | 1591 | if (!alt) { |
1590 | err("Couldn't get altsetting"); | 1592 | pr_err("Couldn't get altsetting\n"); |
1591 | return -EIO; | 1593 | return -EIO; |
1592 | } | 1594 | } |
1593 | 1595 | ||
@@ -2824,7 +2826,7 @@ static int sd_isoc_nego(struct gspca_dev *gspca_dev) | |||
2824 | 2826 | ||
2825 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 1); | 2827 | ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 1); |
2826 | if (ret < 0) | 2828 | if (ret < 0) |
2827 | err("set alt 1 err %d", ret); | 2829 | pr_err("set alt 1 err %d\n", ret); |
2828 | 2830 | ||
2829 | return ret; | 2831 | return ret; |
2830 | } | 2832 | } |
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 61cdd56a74a9..9d78fb896518 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "zc3xx" | 24 | #define MODULE_NAME "zc3xx" |
23 | 25 | ||
24 | #include <linux/input.h> | 26 | #include <linux/input.h> |
@@ -5666,7 +5668,7 @@ static u8 reg_r_i(struct gspca_dev *gspca_dev, | |||
5666 | index, gspca_dev->usb_buf, 1, | 5668 | index, gspca_dev->usb_buf, 1, |
5667 | 500); | 5669 | 500); |
5668 | if (ret < 0) { | 5670 | if (ret < 0) { |
5669 | err("reg_r_i err %d", ret); | 5671 | pr_err("reg_r_i err %d\n", ret); |
5670 | gspca_dev->usb_err = ret; | 5672 | gspca_dev->usb_err = ret; |
5671 | return 0; | 5673 | return 0; |
5672 | } | 5674 | } |
@@ -5698,7 +5700,7 @@ static void reg_w_i(struct gspca_dev *gspca_dev, | |||
5698 | value, index, NULL, 0, | 5700 | value, index, NULL, 0, |
5699 | 500); | 5701 | 500); |
5700 | if (ret < 0) { | 5702 | if (ret < 0) { |
5701 | err("reg_w_i err %d", ret); | 5703 | pr_err("reg_w_i err %d\n", ret); |
5702 | gspca_dev->usb_err = ret; | 5704 | gspca_dev->usb_err = ret; |
5703 | } | 5705 | } |
5704 | } | 5706 | } |
@@ -5724,7 +5726,7 @@ static u16 i2c_read(struct gspca_dev *gspca_dev, | |||
5724 | msleep(20); | 5726 | msleep(20); |
5725 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ | 5727 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
5726 | if (retbyte != 0x00) | 5728 | if (retbyte != 0x00) |
5727 | err("i2c_r status error %02x", retbyte); | 5729 | pr_err("i2c_r status error %02x\n", retbyte); |
5728 | retval = reg_r_i(gspca_dev, 0x0095); /* read Lowbyte */ | 5730 | retval = reg_r_i(gspca_dev, 0x0095); /* read Lowbyte */ |
5729 | retval |= reg_r_i(gspca_dev, 0x0096) << 8; /* read Hightbyte */ | 5731 | retval |= reg_r_i(gspca_dev, 0x0096) << 8; /* read Hightbyte */ |
5730 | PDEBUG(D_USBI, "i2c r [%02x] -> %04x (%02x)", | 5732 | PDEBUG(D_USBI, "i2c r [%02x] -> %04x (%02x)", |
@@ -5748,7 +5750,7 @@ static u8 i2c_write(struct gspca_dev *gspca_dev, | |||
5748 | msleep(1); | 5750 | msleep(1); |
5749 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ | 5751 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
5750 | if (retbyte != 0x00) | 5752 | if (retbyte != 0x00) |
5751 | err("i2c_w status error %02x", retbyte); | 5753 | pr_err("i2c_w status error %02x\n", retbyte); |
5752 | PDEBUG(D_USBO, "i2c w [%02x] = %02x%02x (%02x)", | 5754 | PDEBUG(D_USBO, "i2c w [%02x] = %02x%02x (%02x)", |
5753 | reg, valH, valL, retbyte); | 5755 | reg, valH, valL, retbyte); |
5754 | return retbyte; | 5756 | return retbyte; |
@@ -6497,7 +6499,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
6497 | PDEBUG(D_PROBE, "Sensor GC0303"); | 6499 | PDEBUG(D_PROBE, "Sensor GC0303"); |
6498 | break; | 6500 | break; |
6499 | default: | 6501 | default: |
6500 | warn("Unknown sensor - set to TAS5130C"); | 6502 | pr_warn("Unknown sensor - set to TAS5130C\n"); |
6501 | sd->sensor = SENSOR_TAS5130C; | 6503 | sd->sensor = SENSOR_TAS5130C; |
6502 | } | 6504 | } |
6503 | break; | 6505 | break; |
@@ -6603,7 +6605,7 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
6603 | sd->sensor = SENSOR_OV7620; /* same sensor (?) */ | 6605 | sd->sensor = SENSOR_OV7620; /* same sensor (?) */ |
6604 | break; | 6606 | break; |
6605 | default: | 6607 | default: |
6606 | err("Unknown sensor %04x", sensor); | 6608 | pr_err("Unknown sensor %04x\n", sensor); |
6607 | return -EINVAL; | 6609 | return -EINVAL; |
6608 | } | 6610 | } |
6609 | } | 6611 | } |