aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sq930x.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-21 18:56:57 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-04 10:06:05 -0400
commit133a9fe949862d9ed8411fb423739f4cee08232d (patch)
tree4a465a6823412503b73ef0462e3ffad3415fab39 /drivers/media/video/gspca/sq930x.c
parent42f4e774a30d0e9894741b62af4174c73ecc53da (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/gspca/sq930x.c')
-rw-r--r--drivers/media/video/gspca/sq930x.c21
1 files changed, 12 insertions, 9 deletions
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);