Commit 69a85942ff2df8e1ee0a3b6afe8b1d85dce58333

Authored by Greg Kroah-Hartman
1 parent 9908a32e94

USB: remove err() macro from usb core code

USB should not be having it's own printk macros, so remove err() and
use the system-wide standard of dev_err() wherever possible.  In the
few places that will not work out, use a basic printk().

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 5 changed files with 17 additions and 14 deletions Side-by-side Diff

drivers/usb/core/devio.c
... ... @@ -1777,19 +1777,20 @@
1777 1777 retval = register_chrdev_region(USB_DEVICE_DEV, USB_DEVICE_MAX,
1778 1778 "usb_device");
1779 1779 if (retval) {
1780   - err("unable to register minors for usb_device");
  1780 + printk(KERN_ERR "Unable to register minors for usb_device\n");
1781 1781 goto out;
1782 1782 }
1783 1783 cdev_init(&usb_device_cdev, &usbdev_file_operations);
1784 1784 retval = cdev_add(&usb_device_cdev, USB_DEVICE_DEV, USB_DEVICE_MAX);
1785 1785 if (retval) {
1786   - err("unable to get usb_device major %d", USB_DEVICE_MAJOR);
  1786 + printk(KERN_ERR "Unable to get usb_device major %d\n",
  1787 + USB_DEVICE_MAJOR);
1787 1788 goto error_cdev;
1788 1789 }
1789 1790 #ifdef CONFIG_USB_DEVICE_CLASS
1790 1791 usb_classdev_class = class_create(THIS_MODULE, "usb_device");
1791 1792 if (IS_ERR(usb_classdev_class)) {
1792   - err("unable to register usb_device class");
  1793 + printk(KERN_ERR "Unable to register usb_device class\n");
1793 1794 retval = PTR_ERR(usb_classdev_class);
1794 1795 cdev_del(&usb_device_cdev);
1795 1796 usb_classdev_class = NULL;
drivers/usb/core/endpoint.c
... ... @@ -169,7 +169,8 @@
169 169 error = alloc_chrdev_region(&dev, 0, MAX_ENDPOINT_MINORS,
170 170 "usb_endpoint");
171 171 if (error) {
172   - err("unable to get a dynamic major for usb endpoints");
  172 + printk(KERN_ERR "Unable to get a dynamic major for "
  173 + "usb endpoints.\n");
173 174 return error;
174 175 }
175 176 usb_endpoint_major = MAJOR(dev);
drivers/usb/core/file.c
... ... @@ -86,7 +86,7 @@
86 86 usb_class->class = class_create(THIS_MODULE, "usb");
87 87 if (IS_ERR(usb_class->class)) {
88 88 result = IS_ERR(usb_class->class);
89   - err("class_create failed for usb devices");
  89 + printk(KERN_ERR "class_create failed for usb devices\n");
90 90 kfree(usb_class);
91 91 usb_class = NULL;
92 92 }
... ... @@ -115,7 +115,8 @@
115 115  
116 116 error = register_chrdev(USB_MAJOR, "usb", &usb_fops);
117 117 if (error)
118   - err("unable to get major %d for usb devices", USB_MAJOR);
  118 + printk(KERN_ERR "Unable to get major %d for usb devices\n",
  119 + USB_MAJOR);
119 120  
120 121 return error;
121 122 }
drivers/usb/core/inode.c
... ... @@ -180,8 +180,8 @@
180 180 listmode = option & S_IRWXUGO;
181 181 break;
182 182 default:
183   - err("usbfs: unrecognised mount option \"%s\" "
184   - "or missing value\n", p);
  183 + printk(KERN_ERR "usbfs: unrecognised mount option "
  184 + "\"%s\" or missing value\n", p);
185 185 return -EINVAL;
186 186 }
187 187 }
... ... @@ -601,7 +601,7 @@
601 601 /* create the devices special file */
602 602 retval = simple_pin_fs(&usb_fs_type, &usbfs_mount, &usbfs_mount_count);
603 603 if (retval) {
604   - err ("Unable to get usbfs mount");
  604 + printk(KERN_ERR "Unable to get usbfs mount\n");
605 605 goto exit;
606 606 }
607 607  
... ... @@ -613,7 +613,7 @@
613 613 NULL, &usbfs_devices_fops,
614 614 listuid, listgid);
615 615 if (devices_usbfs_dentry == NULL) {
616   - err ("Unable to create devices usbfs file");
  616 + printk(KERN_ERR "Unable to create devices usbfs file\n");
617 617 retval = -ENODEV;
618 618 goto error_clean_mounts;
619 619 }
... ... @@ -665,7 +665,7 @@
665 665 bus->usbfs_dentry = fs_create_file (name, busmode | S_IFDIR, parent,
666 666 bus, NULL, busuid, busgid);
667 667 if (bus->usbfs_dentry == NULL) {
668   - err ("error creating usbfs bus entry");
  668 + printk(KERN_ERR "Error creating usbfs bus entry\n");
669 669 return;
670 670 }
671 671 }
... ... @@ -696,7 +696,7 @@
696 696 &usbdev_file_operations,
697 697 devuid, devgid);
698 698 if (dev->usbfs_dentry == NULL) {
699   - err ("error creating usbfs device entry");
  699 + printk(KERN_ERR "Error creating usbfs device entry\n");
700 700 return;
701 701 }
702 702  
drivers/usb/core/urb.c
... ... @@ -70,7 +70,7 @@
70 70 iso_packets * sizeof(struct usb_iso_packet_descriptor),
71 71 mem_flags);
72 72 if (!urb) {
73   - err("alloc_urb: kmalloc failed");
  73 + printk(KERN_ERR "alloc_urb: kmalloc failed\n");
74 74 return NULL;
75 75 }
76 76 usb_init_urb(urb);
... ... @@ -407,7 +407,7 @@
407 407  
408 408 /* fail if submitter gave bogus flags */
409 409 if (urb->transfer_flags != orig_flags) {
410   - err("BOGUS urb flags, %x --> %x",
  410 + dev_err(&dev->dev, "BOGUS urb flags, %x --> %x\n",
411 411 orig_flags, urb->transfer_flags);
412 412 return -EINVAL;
413 413 }