Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6-block.git] / drivers / usb / core / devio.c
index 7a4fa791dc196f18a042e4c203ca21b5a0313e97..2bccefebff1b4a05caf7f07961751c68e73cc462 100644 (file)
@@ -413,7 +413,8 @@ static void driver_disconnect(struct usb_interface *intf)
        if (likely(ifnum < 8*sizeof(ps->ifclaimed)))
                clear_bit(ifnum, &ps->ifclaimed);
        else
-               warn("interface number %u out of range", ifnum);
+               dev_warn(&intf->dev, "interface number %u out of range\n",
+                        ifnum);
 
        usb_set_intfdata(intf, NULL);
 
@@ -624,6 +625,8 @@ static int usbdev_open(struct inode *inode, struct file *file)
        smp_wmb();
        list_add_tail(&ps->list, &dev->filelist);
        file->private_data = ps;
+       snoop(&dev->dev, "opened by process %d: %s\n", task_pid_nr(current),
+                       current->comm);
  out:
        if (ret) {
                kfree(ps);
@@ -1774,19 +1777,20 @@ int __init usb_devio_init(void)
        retval = register_chrdev_region(USB_DEVICE_DEV, USB_DEVICE_MAX,
                                        "usb_device");
        if (retval) {
-               err("unable to register minors for usb_device");
+               printk(KERN_ERR "Unable to register minors for usb_device\n");
                goto out;
        }
        cdev_init(&usb_device_cdev, &usbdev_file_operations);
        retval = cdev_add(&usb_device_cdev, USB_DEVICE_DEV, USB_DEVICE_MAX);
        if (retval) {
-               err("unable to get usb_device major %d", USB_DEVICE_MAJOR);
+               printk(KERN_ERR "Unable to get usb_device major %d\n",
+                      USB_DEVICE_MAJOR);
                goto error_cdev;
        }
 #ifdef CONFIG_USB_DEVICE_CLASS
        usb_classdev_class = class_create(THIS_MODULE, "usb_device");
        if (IS_ERR(usb_classdev_class)) {
-               err("unable to register usb_device class");
+               printk(KERN_ERR "Unable to register usb_device class\n");
                retval = PTR_ERR(usb_classdev_class);
                cdev_del(&usb_device_cdev);
                usb_classdev_class = NULL;