Skip to contentSkip to conversation

usb: ulpi: ulpi_init should be executed in subsys_initcall

PATCH Superseded Lu Baolu 4 participants 7 messages May 27, 2015 – Jun 4, 2015

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Lu Baolu

author
#0 lore raw

PATCH v4 1/1 usb: ulpi: ulpi_init should be executed in subsys_initcall

Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus in module_init(). This could cause unnecessary probe delays.

---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/common/ulpi.c +1 -1
index 0e6f968..01c0c04 100644
@@ -242,7 +242,7 @@ static int __init ulpi_init(void)
 {
 	return bus_register(&ulpi_bus);
 }
-module_init(ulpi_init);
+subsys_initcall(ulpi_init);
 
 static void __exit ulpi_exit(void)
 {
Signature · 1 line
2.1.4
#1 lore raw
Quoted 3 lines · Lu Baolu

Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus in module_init(). This could cause unnecessary probe delays.

What do you mean by "probe delays"?

Quoted 13 lines
---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/common/ulpi.c +0 -0
index 0e6f968..01c0c04 100644

drivers/usb/common/ulpi.c static int __init ulpi_init(void) · line 245

Quoted 5 lines
drivers/usb/common/ulpi.c +1 -1
@@ -242,7 +242,7 @@ static int __init ulpi_init(void)
 {
 	return bus_register(&ulpi_bus);
 }
-module_init(ulpi_init);
+subsys_initcall(ulpi_init);

Hasn't this already been rejected?

confused,

greg k-h

#2 lore raw

Hi,

Quoted 6 lines · Greg Kroah-Hartman
Quoted 3 lines · Lu Baolu

Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus in module_init(). This could cause unnecessary probe delays.

What do you mean by "probe delays"?

I believe he meant the bus users' probe delays. i.e. unnecessary -EPROBE_DEFER happening on ulpi_drivers in case they're registered before ulpi bus itself.

Is that correct, Baolu?

Br, David

author
#3 lore raw
Quoted 7 lines · David Cohen

Hi,

Quoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Lu Baolu

Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus in module_init(). This could cause unnecessary probe delays.

Quoted 6 lines
Quoted 1 line

What do you mean by "probe delays"?

I believe he meant the bus users' probe delays. i.e. unnecessary -EPROBE_DEFER happening on ulpi_drivers in case they're registered before ulpi bus itself.

Is that correct, Baolu?

Yes.

Quoted 8 lines

Br, David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

maintainer
#4 lore raw

Hi Baolu,

Quoted 8 lines · Baolu
Quoted 7 lines · David Cohen

Hi,

Quoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Lu Baolu

Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus in module_init(). This could cause unnecessary probe delays.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

What do you mean by "probe delays"?

I believe he meant the bus users' probe delays. i.e. unnecessary -EPROBE_DEFER happening on ulpi_drivers in case they're registered before ulpi bus itself.

Is that correct, Baolu?

Yes.

Could you prepare one more version of this patche with the change log included.

Thanks,

Signature · 1 line
heikki
author
#5 lore raw
Quoted 12 lines · Heikki Krogerus

Hi Baolu,

Quoted 9 lines · Baolu
Quoted 8 lines · David Cohen

Hi,

Quoted 5 lines · Greg Kroah-Hartman
Quoted 3 lines · Lu Baolu

Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus in module_init(). This could cause unnecessary probe delays.

What do you mean by "probe delays"?

Quoted 8 lines
Quoted 6 lines
Quoted 5 lines

I believe he meant the bus users' probe delays. i.e. unnecessary -EPROBE_DEFER happening on ulpi_drivers in case they're registered before ulpi bus itself.

Is that correct, Baolu?

Yes.

Could you prepare one more version of this patche with the change log included.

Sure. I will resent it soon.

Quoted 4 lines

Thanks,

#6 lore raw
In reply to Lu Baolu
Quoted 10 lines · Lu Baolu

Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus in module_init(). This could cause unnecessary probe delays.

---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

A v4 patch with no "changelog" as to what is different from previous versions? That's reason enough for me to just ignore this :(