On Fri, 27 Sep 2013, Fabio Estevam wrote: > From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> > > When mounting a gadgetfs the following error message is seen: > > $ modprobe gadgetfs > gadgetfs: USB Gadget filesystem, version 24 Aug 2004 > $ mkdir /dev/gadget > $ mount -t gadgetfs none /dev/gadget > nop ci_hdrc.0: failed to start (null): -120 > > The error comes from gadgetfs_probe(), which returns -EISNAM (-120). > > As Alan Stern explains[1] this is the normal behavior: > > "It is a temporary measure, used only when the file system is set up > initially. The real bind routine is gadgetfs_bind(), which gets called > when userspace configures the gadget. > > In short, this is how it is intended to work. It isn't a bug." > > [1] http://marc.info/?l=linux-usb&m=138029668707075&w=2 > > So in order to prevent the error message, do not report EISNAM as an error. > > Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> > --- > drivers/usb/gadget/udc-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c > index 59891b1..0887e15 100644 > --- a/drivers/usb/gadget/udc-core.c > +++ b/drivers/usb/gadget/udc-core.c > @@ -344,7 +344,7 @@ static int udc_bind_to_driver(struct usb_udc *udc, struct usb_gadget_driver *dri > udc->gadget->dev.driver = &driver->driver; > > ret = driver->bind(udc->gadget, driver); > - if (ret) > + if (ret && ret != -EISNAM) > goto err1; > ret = usb_gadget_udc_start(udc->gadget, driver); > if (ret) { You still have to _treat_ -EISNAM as an error. Just don't _report_ it in the system log. Alan Stern -- 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