summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-09-23 11:20:08 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-04-14 14:01:51 -0500
commit89931eda832db8e42038d3593163a8579d581f29 (patch)
treef7e0f49ae036c9db45d165bb3f26603aab250245
parent1dac5bb977be0ecfd98cab8d1fbb3ce6cb6b090c (diff)
ENGR00320792-3 usb: gadget: mark init as late_initcall
Since we introduce -EPROBE_DEFER for udc driver, it will be probed at late_initcall if it is defered. When the gadget is built in, it will return "couldn't find an available UDC" at such case. That's the problem we met at below link: http://marc.info/?l=linux-usb&m=137706435611447&w=2 We have no driver's probe at gadget driver, so we can't return -EPROBE_DEFER. And it is also not suitable to defer udc_bind_to_driver if the udc is not found temporarily, since it is hard to decide the return value for usb_gadget_probe_driver. Due to above reasons, mark gadget's init as late_initcall may be a moderate solution. Signed-off-by: Peter Chen <peter.chen@freescale.com>
-rw-r--r--drivers/usb/gadget/acm_ms.c2
-rw-r--r--drivers/usb/gadget/audio.c2
-rw-r--r--drivers/usb/gadget/cdc2.c2
-rw-r--r--drivers/usb/gadget/ether.c2
-rw-r--r--drivers/usb/gadget/gmidi.c2
-rw-r--r--drivers/usb/gadget/hid.c2
-rw-r--r--drivers/usb/gadget/multi.c2
-rw-r--r--drivers/usb/gadget/ncm.c2
-rw-r--r--drivers/usb/gadget/nokia.c2
-rw-r--r--drivers/usb/gadget/printer.c2
-rw-r--r--drivers/usb/gadget/serial.c2
-rw-r--r--drivers/usb/gadget/webcam.c2
-rw-r--r--drivers/usb/gadget/zero.c2
13 files changed, 13 insertions, 13 deletions
diff --git a/drivers/usb/gadget/acm_ms.c b/drivers/usb/gadget/acm_ms.c
index a252444cc0a7..dd74b032753b 100644
--- a/drivers/usb/gadget/acm_ms.c
+++ b/drivers/usb/gadget/acm_ms.c
@@ -275,7 +275,7 @@ static int __init init(void)
{
return usb_composite_probe(&acm_ms_driver);
}
-module_init(init);
+late_initcall(init);
static void __exit cleanup(void)
{
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c
index 231b0efe8fdc..04345a46692f 100644
--- a/drivers/usb/gadget/audio.c
+++ b/drivers/usb/gadget/audio.c
@@ -176,7 +176,7 @@ static int __init init(void)
{
return usb_composite_probe(&audio_driver);
}
-module_init(init);
+late_initcall(init);
static void __exit cleanup(void)
{
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c
index e126b6b248e6..0fd9470b79c0 100644
--- a/drivers/usb/gadget/cdc2.c
+++ b/drivers/usb/gadget/cdc2.c
@@ -239,7 +239,7 @@ static int __init init(void)
{
return usb_composite_probe(&cdc_driver);
}
-module_init(init);
+late_initcall(init);
static void __exit cleanup(void)
{
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index c1c113ef950c..e0722e9a843c 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -483,7 +483,7 @@ static int __init init(void)
{
return usb_composite_probe(&eth_driver);
}
-module_init(init);
+late_initcall(init);
static void __exit cleanup(void)
{
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c
index e879e2c9f461..67bd00ade722 100644
--- a/drivers/usb/gadget/gmidi.c
+++ b/drivers/usb/gadget/gmidi.c
@@ -167,7 +167,7 @@ static int __init midi_init(void)
{
return usb_composite_probe(&midi_driver);
}
-module_init(midi_init);
+late_initcall(midi_init);
static void __exit midi_cleanup(void)
{
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c
index 778613eb37af..42756a09411b 100644
--- a/drivers/usb/gadget/hid.c
+++ b/drivers/usb/gadget/hid.c
@@ -256,7 +256,7 @@ static int __init hidg_init(void)
return status;
}
-module_init(hidg_init);
+late_initcall(hidg_init);
static void __exit hidg_cleanup(void)
{
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c
index 940f6cde8e89..2ab5d71c3365 100644
--- a/drivers/usb/gadget/multi.c
+++ b/drivers/usb/gadget/multi.c
@@ -512,7 +512,7 @@ static int __init multi_init(void)
{
return usb_composite_probe(&multi_driver);
}
-module_init(multi_init);
+late_initcall(multi_init);
static void __exit multi_exit(void)
{
diff --git a/drivers/usb/gadget/ncm.c b/drivers/usb/gadget/ncm.c
index 81956feca1bd..6be75d451b67 100644
--- a/drivers/usb/gadget/ncm.c
+++ b/drivers/usb/gadget/ncm.c
@@ -212,7 +212,7 @@ static int __init init(void)
{
return usb_composite_probe(&ncm_driver);
}
-module_init(init);
+late_initcall(init);
static void __exit cleanup(void)
{
diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c
index 3ab386167519..bfb8a4756ff8 100644
--- a/drivers/usb/gadget/nokia.c
+++ b/drivers/usb/gadget/nokia.c
@@ -351,7 +351,7 @@ static int __init nokia_init(void)
{
return usb_composite_probe(&nokia_driver);
}
-module_init(nokia_init);
+late_initcall(nokia_init);
static void __exit nokia_cleanup(void)
{
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index 69b76efd11e9..fa34d67fc57e 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -1281,7 +1281,7 @@ init(void)
return status;
}
-module_init(init);
+late_initcall(init);
static void __exit
cleanup(void)
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 1f5f978d35d5..0c7b826e46fc 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -267,7 +267,7 @@ static int __init init(void)
return usb_composite_probe(&gserial_driver);
}
-module_init(init);
+late_initcall(init);
static void __exit cleanup(void)
{
diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c
index 8cef1e658c29..79655b9e23af 100644
--- a/drivers/usb/gadget/webcam.c
+++ b/drivers/usb/gadget/webcam.c
@@ -402,7 +402,7 @@ webcam_cleanup(void)
usb_composite_unregister(&webcam_driver);
}
-module_init(webcam_init);
+late_initcall(webcam_init);
module_exit(webcam_cleanup);
MODULE_AUTHOR("Laurent Pinchart");
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 134f354ede62..7a3180f60b20 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -418,7 +418,7 @@ static int __init init(void)
{
return usb_composite_probe(&zero_driver);
}
-module_init(init);
+late_initcall(init);
static void __exit cleanup(void)
{