]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/core/inode.c
USB: remove warn() macro from usb drivers
[linux-2.6-omap-h63xx.git] / drivers / usb / core / inode.c
index 1d253dd4ea8143040b4175286331d349a95a1e9c..2cf2dc8528d88bcb72d3157c2c3f37bd7660b647 100644 (file)
@@ -97,7 +97,7 @@ enum {
        Opt_err,
 };
 
-static match_table_t tokens = {
+static const match_table_t tokens = {
        {Opt_devuid, "devuid=%u"},
        {Opt_devgid, "devgid=%u"},
        {Opt_devmode, "devmode=%o"},
@@ -240,7 +240,9 @@ static void update_sb(struct super_block *sb)
                                update_special(bus);
                                break;
                        default:
-                               warn("Unknown node %s mode %x found on remount!\n",bus->d_name.name,bus->d_inode->i_mode);
+                               printk(KERN_WARNING "usbfs: Unknown node %s "
+                                      "mode %x found on remount!\n",
+                                      bus->d_name.name, bus->d_inode->i_mode);
                                break;
                        }
                }
@@ -259,7 +261,7 @@ static int remount(struct super_block *sb, int *flags, char *data)
                return 0;
 
        if (parse_options(sb, data)) {
-               warn("usbfs: mount parameter error:");
+               printk(KERN_WARNING "usbfs: mount parameter error.\n");
                return -EINVAL;
        }
 
@@ -712,25 +714,11 @@ static void usbfs_add_device(struct usb_device *dev)
 
 static void usbfs_remove_device(struct usb_device *dev)
 {
-       struct dev_state *ds;
-       struct siginfo sinfo;
-
        if (dev->usbfs_dentry) {
                fs_remove_file (dev->usbfs_dentry);
                dev->usbfs_dentry = NULL;
        }
-       while (!list_empty(&dev->filelist)) {
-               ds = list_entry(dev->filelist.next, struct dev_state, list);
-               wake_up_all(&ds->wait);
-               list_del_init(&ds->list);
-               if (ds->discsignr) {
-                       sinfo.si_signo = ds->discsignr;
-                       sinfo.si_errno = EPIPE;
-                       sinfo.si_code = SI_ASYNCIO;
-                       sinfo.si_addr = ds->disccontext;
-                       kill_pid_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid, ds->secid);
-               }
-       }
+       usb_fs_classdev_common_remove(dev);
 }
 
 static int usbfs_notify(struct notifier_block *self, unsigned long action, void *dev)