Separate in-urb allocation and submission.
This is needed for the driver-model rework.
Compile-tested only.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
                goto error;
        }
 
-       /* Allocate buffers for our cport in messages and start them up */
+       /* Allocate buffers for our cport in messages */
        for (i = 0; i < NUM_CPORT_IN_URB; ++i) {
                struct urb *urb;
                u8 *buffer;
                                  cport_in_callback, hd);
                es1->cport_in_urb[i] = urb;
                es1->cport_in_buffer[i] = buffer;
-               retval = usb_submit_urb(urb, GFP_KERNEL);
-               if (retval)
-                       goto error;
        }
 
        /* Allocate urbs for our CPort OUT messages */
                                                        (S_IWUSR | S_IRUGO),
                                                        gb_debugfs_get(), es1,
                                                        &apb1_log_enable_fops);
+
+       for (i = 0; i < NUM_CPORT_IN_URB; ++i) {
+               retval = usb_submit_urb(es1->cport_in_urb[i], GFP_KERNEL);
+               if (retval)
+                       goto error;
+       }
+
        return 0;
 error:
        ap_disconnect(interface);