aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-08-14 12:37:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-17 17:41:08 -0400
commitaa82661baf8a48379355ffa8bf162b07cf487600 (patch)
tree22b555a5227c2d6f3a145d5a5350b2b473602262 /drivers
parent1817b1692a2eab022e805d32e910f4556c89dce8 (diff)
USB: remove warn() macro from usb media drivers
USB should not be having it's own printk macros, so remove warn() and use the system-wide standard of dev_warn() wherever possible. In the few places that will not work out, use a basic printk(). Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/radio/dsbr100.c13
-rw-r--r--drivers/media/video/dabusb.c4
-rw-r--r--drivers/media/video/ov511.c19
-rw-r--r--drivers/media/video/usbvideo/konicawc.c8
-rw-r--r--drivers/media/video/usbvideo/quickcam_messenger.c14
5 files changed, 35 insertions, 23 deletions
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c
index 66783fffe4c1..78f56944e640 100644
--- a/drivers/media/radio/dsbr100.c
+++ b/drivers/media/radio/dsbr100.c
@@ -310,7 +310,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
310 310
311 radio->curfreq = f->frequency; 311 radio->curfreq = f->frequency;
312 if (dsbr100_setfreq(radio, radio->curfreq)==-1) 312 if (dsbr100_setfreq(radio, radio->curfreq)==-1)
313 warn("Set frequency failed"); 313 dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
314 return 0; 314 return 0;
315} 315}
316 316
@@ -361,12 +361,14 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
361 case V4L2_CID_AUDIO_MUTE: 361 case V4L2_CID_AUDIO_MUTE:
362 if (ctrl->value) { 362 if (ctrl->value) {
363 if (dsbr100_stop(radio) == -1) { 363 if (dsbr100_stop(radio) == -1) {
364 warn("Radio did not respond properly"); 364 dev_warn(&radio->usbdev->dev,
365 "Radio did not respond properly\n");
365 return -EBUSY; 366 return -EBUSY;
366 } 367 }
367 } else { 368 } else {
368 if (dsbr100_start(radio) == -1) { 369 if (dsbr100_start(radio) == -1) {
369 warn("Radio did not respond properly"); 370 dev_warn(&radio->usbdev->dev,
371 "Radio did not respond properly\n");
370 return -EBUSY; 372 return -EBUSY;
371 } 373 }
372 } 374 }
@@ -416,7 +418,8 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
416 radio->muted = 1; 418 radio->muted = 1;
417 419
418 if (dsbr100_start(radio)<0) { 420 if (dsbr100_start(radio)<0) {
419 warn("Radio did not start up properly"); 421 dev_warn(&radio->usbdev->dev,
422 "Radio did not start up properly\n");
420 radio->users = 0; 423 radio->users = 0;
421 unlock_kernel(); 424 unlock_kernel();
422 return -EIO; 425 return -EIO;
@@ -501,7 +504,7 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
501 radio->curfreq = FREQ_MIN*FREQ_MUL; 504 radio->curfreq = FREQ_MIN*FREQ_MUL;
502 video_set_drvdata(radio->videodev, radio); 505 video_set_drvdata(radio->videodev, radio);
503 if (video_register_device(radio->videodev, VFL_TYPE_RADIO, radio_nr) < 0) { 506 if (video_register_device(radio->videodev, VFL_TYPE_RADIO, radio_nr) < 0) {
504 warn("Could not register video device"); 507 dev_warn(&intf->dev, "Could not register video device\n");
505 video_device_release(radio->videodev); 508 video_device_release(radio->videodev);
506 kfree(radio->transfer_buffer); 509 kfree(radio->transfer_buffer);
507 kfree(radio); 510 kfree(radio);
diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c
index 3aa538afcc0b..298810d5262b 100644
--- a/drivers/media/video/dabusb.c
+++ b/drivers/media/video/dabusb.c
@@ -192,7 +192,7 @@ static void dabusb_iso_complete (struct urb *purb)
192 err("dabusb_iso_complete: invalid len %d", len); 192 err("dabusb_iso_complete: invalid len %d", len);
193 } 193 }
194 else 194 else
195 warn("dabusb_iso_complete: corrupted packet status: %d", purb->iso_frame_desc[i].status); 195 dev_warn(&purb->dev->dev, "dabusb_iso_complete: corrupted packet status: %d\n", purb->iso_frame_desc[i].status);
196 if (dst != purb->actual_length) 196 if (dst != purb->actual_length)
197 err("dst!=purb->actual_length:%d!=%d", dst, purb->actual_length); 197 err("dst!=purb->actual_length:%d!=%d", dst, purb->actual_length);
198 } 198 }
@@ -289,7 +289,7 @@ static int dabusb_bulk (pdabusb_t s, pbulk_transfer_t pb)
289 } 289 }
290 290
291 if( ret == -EPIPE ) { 291 if( ret == -EPIPE ) {
292 warn("CLEAR_FEATURE request to remove STALL condition."); 292 dev_warn(&s->usbdev->dev, "CLEAR_FEATURE request to remove STALL condition.\n");
293 if(usb_clear_halt(s->usbdev, usb_pipeendpoint(pipe))) 293 if(usb_clear_halt(s->usbdev, usb_pipeendpoint(pipe)))
294 err("request failed"); 294 err("request failed");
295 } 295 }
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index 935d73de57bd..210f1240b331 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -1098,9 +1098,10 @@ ov51x_clear_snapshot(struct usb_ov511 *ov)
1098 reg_w(ov, R51x_SYS_SNAP, 0x02); 1098 reg_w(ov, R51x_SYS_SNAP, 0x02);
1099 reg_w(ov, R51x_SYS_SNAP, 0x00); 1099 reg_w(ov, R51x_SYS_SNAP, 0x00);
1100 } else if (ov->bclass == BCL_OV518) { 1100 } else if (ov->bclass == BCL_OV518) {
1101 warn("snapshot reset not supported yet on OV518(+)"); 1101 dev_warn(&ov->dev->dev,
1102 "snapshot reset not supported yet on OV518(+)\n");
1102 } else { 1103 } else {
1103 err("clear snap: invalid bridge type"); 1104 dev_err(&ov->dev->dev, "clear snap: invalid bridge type\n");
1104 } 1105 }
1105} 1106}
1106 1107
@@ -1115,14 +1116,16 @@ ov51x_check_snapshot(struct usb_ov511 *ov)
1115 if (ov->bclass == BCL_OV511) { 1116 if (ov->bclass == BCL_OV511) {
1116 ret = reg_r(ov, R51x_SYS_SNAP); 1117 ret = reg_r(ov, R51x_SYS_SNAP);
1117 if (ret < 0) { 1118 if (ret < 0) {
1118 err("Error checking snspshot status (%d)", ret); 1119 dev_err(&ov->dev->dev,
1120 "Error checking snspshot status (%d)\n", ret);
1119 } else if (ret & 0x08) { 1121 } else if (ret & 0x08) {
1120 status = 1; 1122 status = 1;
1121 } 1123 }
1122 } else if (ov->bclass == BCL_OV518) { 1124 } else if (ov->bclass == BCL_OV518) {
1123 warn("snapshot check not supported yet on OV518(+)"); 1125 dev_warn(&ov->dev->dev,
1126 "snapshot check not supported yet on OV518(+)\n");
1124 } else { 1127 } else {
1125 err("check snap: invalid bridge type"); 1128 dev_err(&ov->dev->dev, "clear snap: invalid bridge type\n");
1126 } 1129 }
1127 1130
1128 return status; 1131 return status;
@@ -5217,7 +5220,8 @@ saa7111a_configure(struct usb_ov511 *ov)
5217 if (ov->bclass == BCL_OV511) 5220 if (ov->bclass == BCL_OV511)
5218 reg_w(ov, 0x11, 0x00); 5221 reg_w(ov, 0x11, 0x00);
5219 else 5222 else
5220 warn("SAA7111A not yet supported with OV518/OV518+"); 5223 dev_warn(&ov->dev->dev,
5224 "SAA7111A not yet supported with OV518/OV518+\n");
5221 5225
5222 return 0; 5226 return 0;
5223} 5227}
@@ -5456,7 +5460,8 @@ ov518_configure(struct usb_ov511 *ov)
5456 * required. OV518 has no uncompressed mode, to save RAM. */ 5460 * required. OV518 has no uncompressed mode, to save RAM. */
5457 if (!dumppix && !ov->compress) { 5461 if (!dumppix && !ov->compress) {
5458 ov->compress = 1; 5462 ov->compress = 1;
5459 warn("Compression required with OV518...enabling"); 5463 dev_warn(&ov->dev->dev,
5464 "Compression required with OV518...enabling\n");
5460 } 5465 }
5461 5466
5462 if (ov->bridge == BRG_OV518) { 5467 if (ov->bridge == BRG_OV518) {
diff --git a/drivers/media/video/usbvideo/konicawc.c b/drivers/media/video/usbvideo/konicawc.c
index e986c28b7bb0..da27a5287983 100644
--- a/drivers/media/video/usbvideo/konicawc.c
+++ b/drivers/media/video/usbvideo/konicawc.c
@@ -229,7 +229,8 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
229 229
230 cam->input = input_dev = input_allocate_device(); 230 cam->input = input_dev = input_allocate_device();
231 if (!input_dev) { 231 if (!input_dev) {
232 warn("Not enough memory for camera's input device\n"); 232 dev_warn(&dev->dev,
233 "Not enough memory for camera's input device\n");
233 return; 234 return;
234 } 235 }
235 236
@@ -243,8 +244,9 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
243 244
244 error = input_register_device(cam->input); 245 error = input_register_device(cam->input);
245 if (error) { 246 if (error) {
246 warn("Failed to register camera's input device, err: %d\n", 247 dev_warn(&dev->dev,
247 error); 248 "Failed to register camera's input device, err: %d\n",
249 error);
248 input_free_device(cam->input); 250 input_free_device(cam->input);
249 cam->input = NULL; 251 cam->input = NULL;
250 } 252 }
diff --git a/drivers/media/video/usbvideo/quickcam_messenger.c b/drivers/media/video/usbvideo/quickcam_messenger.c
index 05c61b523115..4459b8a7f818 100644
--- a/drivers/media/video/usbvideo/quickcam_messenger.c
+++ b/drivers/media/video/usbvideo/quickcam_messenger.c
@@ -93,7 +93,7 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
93 93
94 cam->input = input_dev = input_allocate_device(); 94 cam->input = input_dev = input_allocate_device();
95 if (!input_dev) { 95 if (!input_dev) {
96 warn("insufficient mem for cam input device"); 96 dev_warn(&dev->dev, "insufficient mem for cam input device\n");
97 return; 97 return;
98 } 98 }
99 99
@@ -107,8 +107,9 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
107 107
108 error = input_register_device(cam->input); 108 error = input_register_device(cam->input);
109 if (error) { 109 if (error) {
110 warn("Failed to register camera's input device, err: %d\n", 110 dev_warn(&dev->dev,
111 error); 111 "Failed to register camera's input device, err: %d\n",
112 error);
112 input_free_device(cam->input); 113 input_free_device(cam->input);
113 cam->input = NULL; 114 cam->input = NULL;
114 } 115 }
@@ -587,8 +588,9 @@ static int qcm_compress_iso(struct uvd *uvd, struct urb *dataurb)
587 dataurb->iso_frame_desc[i].offset; 588 dataurb->iso_frame_desc[i].offset;
588 589
589 if (st < 0) { 590 if (st < 0) {
590 warn("Data error: packet=%d. len=%d. status=%d.", 591 dev_warn(&uvd->dev->dev,
591 i, n, st); 592 "Data error: packet=%d. len=%d. status=%d.\n",
593 i, n, st);
592 uvd->stats.iso_err_count++; 594 uvd->stats.iso_err_count++;
593 continue; 595 continue;
594 } 596 }
@@ -699,7 +701,7 @@ static void qcm_stop_data(struct uvd *uvd)
699 701
700 ret = qcm_camera_off(uvd); 702 ret = qcm_camera_off(uvd);
701 if (ret) 703 if (ret)
702 warn("couldn't turn the cam off."); 704 dev_warn(&uvd->dev->dev, "couldn't turn the cam off.\n");
703 705
704 uvd->streaming = 0; 706 uvd->streaming = 0;
705 707