aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/atm/usbatm.c10
-rw-r--r--drivers/usb/atm/usbatm.h10
-rw-r--r--drivers/usb/atm/xusbatm.c2
-rw-r--r--drivers/usb/core/devio.c3
-rw-r--r--drivers/usb/core/inode.c6
-rw-r--r--drivers/usb/core/message.c3
-rw-r--r--drivers/usb/image/mdc800.c8
-rw-r--r--drivers/usb/misc/usblcd.c2
-rw-r--r--drivers/usb/misc/uss720.c7
9 files changed, 32 insertions, 19 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index 0da2c25bab3b..06dd114910d4 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -344,7 +344,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
344 __func__, sarb->len, vcc); 344 __func__, sarb->len, vcc);
345 /* discard cells already received */ 345 /* discard cells already received */
346 skb_trim(sarb, 0); 346 skb_trim(sarb, 0);
347 UDSL_ASSERT(sarb->tail + ATM_CELL_PAYLOAD <= sarb->end); 347 UDSL_ASSERT(instance, sarb->tail + ATM_CELL_PAYLOAD <= sarb->end);
348 } 348 }
349 349
350 memcpy(skb_tail_pointer(sarb), source + ATM_CELL_HEADER, ATM_CELL_PAYLOAD); 350 memcpy(skb_tail_pointer(sarb), source + ATM_CELL_HEADER, ATM_CELL_PAYLOAD);
@@ -432,7 +432,7 @@ static void usbatm_extract_cells(struct usbatm_data *instance,
432 unsigned char *cell_buf = instance->cell_buf; 432 unsigned char *cell_buf = instance->cell_buf;
433 unsigned int space_left = stride - buf_usage; 433 unsigned int space_left = stride - buf_usage;
434 434
435 UDSL_ASSERT(buf_usage <= stride); 435 UDSL_ASSERT(instance, buf_usage <= stride);
436 436
437 if (avail_data >= space_left) { 437 if (avail_data >= space_left) {
438 /* add new data and process cell */ 438 /* add new data and process cell */
@@ -475,7 +475,7 @@ static unsigned int usbatm_write_cells(struct usbatm_data *instance,
475 unsigned int stride = instance->tx_channel.stride; 475 unsigned int stride = instance->tx_channel.stride;
476 476
477 vdbg("%s: skb->len=%d, avail_space=%u", __func__, skb->len, avail_space); 477 vdbg("%s: skb->len=%d, avail_space=%u", __func__, skb->len, avail_space);
478 UDSL_ASSERT(!(avail_space % stride)); 478 UDSL_ASSERT(instance, !(avail_space % stride));
479 479
480 for (bytes_written = 0; bytes_written < avail_space && ctrl->len; 480 for (bytes_written = 0; bytes_written < avail_space && ctrl->len;
481 bytes_written += stride, target += stride) { 481 bytes_written += stride, target += stride) {
@@ -547,7 +547,7 @@ static void usbatm_rx_process(unsigned long data)
547 if (!urb->iso_frame_desc[i].status) { 547 if (!urb->iso_frame_desc[i].status) {
548 unsigned int actual_length = urb->iso_frame_desc[i].actual_length; 548 unsigned int actual_length = urb->iso_frame_desc[i].actual_length;
549 549
550 UDSL_ASSERT(actual_length <= packet_size); 550 UDSL_ASSERT(instance, actual_length <= packet_size);
551 551
552 if (!merge_length) 552 if (!merge_length)
553 merge_start = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset; 553 merge_start = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset;
@@ -1188,7 +1188,7 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
1188 struct urb *urb; 1188 struct urb *urb;
1189 unsigned int iso_packets = usb_pipeisoc(channel->endpoint) ? channel->buf_size / channel->packet_size : 0; 1189 unsigned int iso_packets = usb_pipeisoc(channel->endpoint) ? channel->buf_size / channel->packet_size : 0;
1190 1190
1191 UDSL_ASSERT(!usb_pipeisoc(channel->endpoint) || usb_pipein(channel->endpoint)); 1191 UDSL_ASSERT(instance, !usb_pipeisoc(channel->endpoint) || usb_pipein(channel->endpoint));
1192 1192
1193 urb = usb_alloc_urb(iso_packets, GFP_KERNEL); 1193 urb = usb_alloc_urb(iso_packets, GFP_KERNEL);
1194 if (!urb) { 1194 if (!urb) {
diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h
index e6887c6cf3cf..f6f4508a9d42 100644
--- a/drivers/usb/atm/usbatm.h
+++ b/drivers/usb/atm/usbatm.h
@@ -40,9 +40,15 @@
40*/ 40*/
41 41
42#ifdef DEBUG 42#ifdef DEBUG
43#define UDSL_ASSERT(x) BUG_ON(!(x)) 43#define UDSL_ASSERT(instance, x) BUG_ON(!(x))
44#else 44#else
45#define UDSL_ASSERT(x) do { if (!(x)) warn("failed assertion '%s' at line %d", __stringify(x), __LINE__); } while(0) 45#define UDSL_ASSERT(instance, x) \
46 do { \
47 if (!(x)) \
48 dev_warn(&(instance)->usb_intf->dev, \
49 "failed assertion '%s' at line %d", \
50 __stringify(x), __LINE__); \
51 } while(0)
46#endif 52#endif
47 53
48#define usb_err(instance, format, arg...) \ 54#define usb_err(instance, format, arg...) \
diff --git a/drivers/usb/atm/xusbatm.c b/drivers/usb/atm/xusbatm.c
index 8472543eee81..17d167bbd2dc 100644
--- a/drivers/usb/atm/xusbatm.c
+++ b/drivers/usb/atm/xusbatm.c
@@ -193,7 +193,7 @@ static int __init xusbatm_init(void)
193 num_vendor != num_product || 193 num_vendor != num_product ||
194 num_vendor != num_rx_endpoint || 194 num_vendor != num_rx_endpoint ||
195 num_vendor != num_tx_endpoint) { 195 num_vendor != num_tx_endpoint) {
196 warn("malformed module parameters"); 196 printk(KERN_WARNING "xusbatm: malformed module parameters\n");
197 return -EINVAL; 197 return -EINVAL;
198 } 198 }
199 199
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 528befdcc781..7f621149f9f2 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -413,7 +413,8 @@ static void driver_disconnect(struct usb_interface *intf)
413 if (likely(ifnum < 8*sizeof(ps->ifclaimed))) 413 if (likely(ifnum < 8*sizeof(ps->ifclaimed)))
414 clear_bit(ifnum, &ps->ifclaimed); 414 clear_bit(ifnum, &ps->ifclaimed);
415 else 415 else
416 warn("interface number %u out of range", ifnum); 416 dev_warn(&intf->dev, "interface number %u out of range\n",
417 ifnum);
417 418
418 usb_set_intfdata(intf, NULL); 419 usb_set_intfdata(intf, NULL);
419 420
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index 77fa7a080801..2cf2dc8528d8 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -240,7 +240,9 @@ static void update_sb(struct super_block *sb)
240 update_special(bus); 240 update_special(bus);
241 break; 241 break;
242 default: 242 default:
243 warn("Unknown node %s mode %x found on remount!\n",bus->d_name.name,bus->d_inode->i_mode); 243 printk(KERN_WARNING "usbfs: Unknown node %s "
244 "mode %x found on remount!\n",
245 bus->d_name.name, bus->d_inode->i_mode);
244 break; 246 break;
245 } 247 }
246 } 248 }
@@ -259,7 +261,7 @@ static int remount(struct super_block *sb, int *flags, char *data)
259 return 0; 261 return 0;
260 262
261 if (parse_options(sb, data)) { 263 if (parse_options(sb, data)) {
262 warn("usbfs: mount parameter error:"); 264 printk(KERN_WARNING "usbfs: mount parameter error.\n");
263 return -EINVAL; 265 return -EINVAL;
264 } 266 }
265 267
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 286b4431a097..887738577b28 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1204,7 +1204,8 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate)
1204 1204
1205 alt = usb_altnum_to_altsetting(iface, alternate); 1205 alt = usb_altnum_to_altsetting(iface, alternate);
1206 if (!alt) { 1206 if (!alt) {
1207 warn("selecting invalid altsetting %d", alternate); 1207 dev_warn(&dev->dev, "selecting invalid altsetting %d",
1208 alternate);
1208 return -EINVAL; 1209 return -EINVAL;
1209 } 1210 }
1210 1211
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 0fb114ca1eba..228552beb534 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -361,7 +361,8 @@ static int mdc800_usb_waitForIRQ (int mode, int msec)
361 361
362 if (mdc800->state == NOT_CONNECTED) 362 if (mdc800->state == NOT_CONNECTED)
363 { 363 {
364 warn ("Camera gets disconnected during waiting for irq."); 364 printk(KERN_WARNING "mdc800: Camera gets disconnected "
365 "during waiting for irq.\n");
365 mdc800->camera_request_ready=0; 366 mdc800->camera_request_ready=0;
366 return -2; 367 return -2;
367 } 368 }
@@ -443,7 +444,7 @@ static int mdc800_usb_probe (struct usb_interface *intf,
443 444
444 if (mdc800->dev != NULL) 445 if (mdc800->dev != NULL)
445 { 446 {
446 warn ("only one Mustek MDC800 is supported."); 447 dev_warn(&intf->dev, "only one Mustek MDC800 is supported.\n");
447 return -ENODEV; 448 return -ENODEV;
448 } 449 }
449 450
@@ -701,7 +702,8 @@ static ssize_t mdc800_device_read (struct file *file, char __user *buf, size_t l
701 } 702 }
702 if (mdc800->state == WORKING) 703 if (mdc800->state == WORKING)
703 { 704 {
704 warn ("Illegal State \"working\" reached during read ?!"); 705 printk(KERN_WARNING "mdc800: Illegal State \"working\""
706 "reached during read ?!\n");
705 mutex_unlock(&mdc800->io_lock); 707 mutex_unlock(&mdc800->io_lock);
706 return -EBUSY; 708 return -EBUSY;
707 } 709 }
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index 2db4228fbb01..d589324bb0d0 100644
--- a/drivers/usb/misc/usblcd.c
+++ b/drivers/usb/misc/usblcd.c
@@ -311,7 +311,7 @@ static int lcd_probe(struct usb_interface *interface, const struct usb_device_id
311 dev->interface = interface; 311 dev->interface = interface;
312 312
313 if (le16_to_cpu(dev->udev->descriptor.idProduct) != 0x0001) { 313 if (le16_to_cpu(dev->udev->descriptor.idProduct) != 0x0001) {
314 warn(KERN_INFO "USBLCD model not supported."); 314 dev_warn(&interface->dev, "USBLCD model not supported.\n");
315 return -ENODEV; 315 return -ENODEV;
316 } 316 }
317 317
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
index f1255b0a182d..594f3e4e8c2e 100644
--- a/drivers/usb/misc/uss720.c
+++ b/drivers/usb/misc/uss720.c
@@ -228,11 +228,12 @@ static int get_1284_register(struct parport *pp, unsigned char reg, unsigned cha
228 ret = rq->urb->status; 228 ret = rq->urb->status;
229 *val = priv->reg[(reg >= 9) ? 0 : regindex[reg]]; 229 *val = priv->reg[(reg >= 9) ? 0 : regindex[reg]];
230 if (ret) 230 if (ret)
231 warn("get_1284_register: usb error %d", ret); 231 printk(KERN_WARNING "get_1284_register: "
232 "usb error %d\n", ret);
232 kref_put(&rq->ref_count, destroy_async); 233 kref_put(&rq->ref_count, destroy_async);
233 return ret; 234 return ret;
234 } 235 }
235 warn("get_1284_register timeout"); 236 printk(KERN_WARNING "get_1284_register timeout\n");
236 kill_all_async_requests_priv(priv); 237 kill_all_async_requests_priv(priv);
237 return -EIO; 238 return -EIO;
238} 239}
@@ -716,7 +717,7 @@ static int uss720_probe(struct usb_interface *intf,
716 spin_lock_init(&priv->asynclock); 717 spin_lock_init(&priv->asynclock);
717 INIT_LIST_HEAD(&priv->asynclist); 718 INIT_LIST_HEAD(&priv->asynclist);
718 if (!(pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops))) { 719 if (!(pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops))) {
719 warn("could not register parport"); 720 printk(KERN_WARNING "uss720: could not register parport\n");
720 goto probe_abort; 721 goto probe_abort;
721 } 722 }
722 723