aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-09-27 23:05:34 -0400
committerFelipe Balbi <balbi@ti.com>2013-10-04 10:44:43 -0400
commitf8cffc84a2ff8efc2ecca6128485877109e499f5 (patch)
tree80f10d5cd4ff6c7d324ed55ccbe17a1ccff7d87a /drivers/usb
parent33d7be354025d7273556783e8a8d9408af1d802b (diff)
usb: gadget: udc-core: Do not report -EISNAM error from gadgetfs
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. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c
index 59891b1c48fc..27768a7d986a 100644
--- a/drivers/usb/gadget/udc-core.c
+++ b/drivers/usb/gadget/udc-core.c
@@ -356,7 +356,8 @@ static int udc_bind_to_driver(struct usb_udc *udc, struct usb_gadget_driver *dri
356 kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE); 356 kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE);
357 return 0; 357 return 0;
358err1: 358err1:
359 dev_err(&udc->dev, "failed to start %s: %d\n", 359 if (ret != -EISNAM)
360 dev_err(&udc->dev, "failed to start %s: %d\n",
360 udc->driver->function, ret); 361 udc->driver->function, ret);
361 udc->driver = NULL; 362 udc->driver = NULL;
362 udc->dev.driver = NULL; 363 udc->dev.driver = NULL;