On Thu, 3 May 2007, Ragner Magalhaes wrote: > This patch adds some features that allow the file-storage gadget > to work as a usb_function module.
This looks a lot cleaner than your earlier attempts. However in several places you took out code without adding any sort of replacement. For example, here: > -static void ep0_complete(struct usb_ep *ep, struct usb_request *req) > -{ > - struct fsg_dev *fsg = ep->driver_data; > - > - if (req->actual > 0) > - dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual); > - if (req->status || req->actual != req->length) > - DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, > - req->status, req->actual, req->length); > - if (req->status == -ECONNRESET) // Request was cancelled > - usb_ep_fifo_flush(ep); > - > - if (req->status == 0 && req->context) > - ((fsg_routine_t) (req->context))(fsg); > -} Your modified driver doesn't call dump_msg(), DBG(), or the function pointer stored in req->context. > + set_usb_function_data (fsg->f, fsg); We're trying to move away from the style David used, so in new code open parens should always be placed right next to the function name (no space in between). Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel