* Alan Stern | 2011-05-13 13:52:36 [-0400]: >> struct usb_gadget; >> +struct usb_gadget_driver; >> +typedef int (*usb_gad_bind_t)(struct usb_gadget *gadget); > >Ugh! Please don't do this. Write out the full function type at the >place where it is used, just like all the other function pointer >declarations do. I tried to save here key strokes and since it is not a complex (like a struct) it is not a big deal. And we do it in other places in kernel. But if you prefer it written out, I will change it. >> /* the rest of the api to the controller hardware: device operations, >> * which don't involve endpoints (or i/o). >> @@ -430,6 +432,8 @@ struct usb_gadget_ops { >> int (*pullup) (struct usb_gadget *, int is_on); >> int (*ioctl)(struct usb_gadget *, >> unsigned code, unsigned long param); >> + int (*start)(struct usb_gadget *, struct usb_gadget_driver *); >> + int (*stop)(struct usb_gadget *, struct usb_gadget_driver *); >> }; >> >> /** >> @@ -769,6 +773,7 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget) >> struct usb_gadget_driver { >> char *function; >> enum usb_device_speed speed; >> + usb_gad_bind_t bind; >> void (*unbind)(struct usb_gadget *); >> int (*setup)(struct usb_gadget *, >> const struct usb_ctrlrequest *); > >After all, why should bind be different from unbind or setup? Yeah that is messy. I did not want to change the prototype for setup which has nothing to do with this patch. >Also, there should be kerneldoc for the new bind method in the comments >preceding the definition of struct usb_gadget_driver. Okay, I will add it. > >Alan Stern > Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html