On 2012/5/12 8:15, Greg KH wrote:
On Fri, May 11, 2012 at 04:08:31PM +0800, Lan Tianyu wrote:
The usb port is a device in the acpi table but it's not in the linux
usb subsystem. USB hub port doesn't have struct device. So the acpi
glue framework only can cover the usb port connected with usb device
and store the acpi handle to struct device.archdata.acpi_handle. This
patch adds the member platform_data in the struct usb_hub_port and
gets the hub port's acpi_handle and store it in the port's platform_data
to resolve no attached device no binding problem. The acpi method "_UPC"
and "_PLD" can be accessed without attached device.
No, that's a hack. Please do this correctly and use the real structures
here, not an unsigned long.
Why not make the hub a real struct device? That would solve this
problem, right?
You mean make the hub ports a real struct device. Yeah. But that may be
a little complex. The device tree and sys fs hierarchy will be changed.
struct usb_hub_port {
void *port_owner;
struct usb_device *child;
+ unsigned long platform_data;
How about this?
struct usb_hub_port {
void *port_owner;
struct usb_device *child;
+ #ifdef CONFIG_ACPI
+ acpi_handle port_acpi_handle;
+ #endif
Yeah, no, that's not ok, sorry. We use real pointers because we can,
don't use opaque types here, where you are really putting a pointer in
here. Be specific.
I'm not going to accept this patch, sorry. Please rework it, and I'm
guessing, the one after this.
All right.
I'll go test the other patches in this series now...
Great thanks for your patience to me(a freshman). :)
greg k-h
--
Best Regards
Tianyu Lan
linux kernel enabling team
--
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