diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-14 12:37:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:41:08 -0400 |
commit | aa82661baf8a48379355ffa8bf162b07cf487600 (patch) | |
tree | 22b555a5227c2d6f3a145d5a5350b2b473602262 /drivers/media/video | |
parent | 1817b1692a2eab022e805d32e910f4556c89dce8 (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/media/video')
-rw-r--r-- | drivers/media/video/dabusb.c | 4 | ||||
-rw-r--r-- | drivers/media/video/ov511.c | 19 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/konicawc.c | 8 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/quickcam_messenger.c | 14 |
4 files changed, 27 insertions, 18 deletions
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 | ||