]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/usb/gadget/inode.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[net-next-2.6.git] / drivers / usb / gadget / inode.c
index 3f1d771c8be584c28c54d356e8238de954626c32..3ed73f49cf188cd98b92cc3e847a6e40f0062efb 100644 (file)
@@ -1774,7 +1774,6 @@ static struct usb_gadget_driver gadgetfs_driver = {
        .speed          = USB_SPEED_FULL,
 #endif
        .function       = (char *) driver_desc,
-       .bind           = gadgetfs_bind,
        .unbind         = gadgetfs_unbind,
        .setup          = gadgetfs_setup,
        .disconnect     = gadgetfs_disconnect,
@@ -1797,7 +1796,6 @@ static int gadgetfs_probe (struct usb_gadget *gadget)
 
 static struct usb_gadget_driver probe_driver = {
        .speed          = USB_SPEED_HIGH,
-       .bind           = gadgetfs_probe,
        .unbind         = gadgetfs_nop,
        .setup          = (void *)gadgetfs_nop,
        .disconnect     = gadgetfs_nop,
@@ -1907,7 +1905,7 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
 
        /* triggers gadgetfs_bind(); then we can enumerate. */
        spin_unlock_irq (&dev->lock);
-       value = usb_gadget_register_driver (&gadgetfs_driver);
+       value = usb_gadget_probe_driver(&gadgetfs_driver, gadgetfs_bind);
        if (value != 0) {
                kfree (dev->buf);
                dev->buf = NULL;
@@ -1993,6 +1991,7 @@ gadgetfs_make_inode (struct super_block *sb,
        struct inode *inode = new_inode (sb);
 
        if (inode) {
+               inode->i_ino = get_next_ino();
                inode->i_mode = mode;
                inode->i_uid = default_uid;
                inode->i_gid = default_gid;
@@ -2046,7 +2045,7 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
                return -ESRCH;
 
        /* fake probe to determine $CHIP */
-       (void) usb_gadget_register_driver (&probe_driver);
+       (void) usb_gadget_probe_driver(&probe_driver, gadgetfs_probe);
        if (!CHIP)
                return -ENODEV;
 
@@ -2098,11 +2097,11 @@ enomem0:
 }
 
 /* "mount -t gadgetfs path /dev/gadget" ends up here */
-static int
-gadgetfs_get_sb (struct file_system_type *t, int flags,
-               const char *path, void *opts, struct vfsmount *mnt)
+static struct dentry *
+gadgetfs_mount (struct file_system_type *t, int flags,
+               const char *path, void *opts)
 {
-       return get_sb_single (t, flags, opts, gadgetfs_fill_super, mnt);
+       return mount_single (t, flags, opts, gadgetfs_fill_super);
 }
 
 static void
@@ -2120,7 +2119,7 @@ gadgetfs_kill_sb (struct super_block *sb)
 static struct file_system_type gadgetfs_type = {
        .owner          = THIS_MODULE,
        .name           = shortname,
-       .get_sb         = gadgetfs_get_sb,
+       .mount          = gadgetfs_mount,
        .kill_sb        = gadgetfs_kill_sb,
 };