Re: [PATCH V4 2/8] usb: make usb port a real device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Jun 2012, Lan Tianyu wrote:

> This patch is to make usb port a real device under usb hub interface.
> Move port_owner to struct usb_port.
> 
> Signed-off-by: Lan Tianyu <tianyu.lan@xxxxxxxxx>
> ---
>  drivers/usb/core/hub.c |   93 +++++++++++++++++++++++++++++++++++++++--------
>  1 files changed, 77 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 4cc8dc9..c19e088 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -37,6 +37,12 @@
>  #endif
>  #endif
>  
> +struct usb_port {
> +	struct usb_device *udev;

Why is this field present?  It never gets used anywhere.

If you really want to keep it, please rename it to "hdev", because it 
is a pointer to a hub device, not to a general USB device.  However I 
think it isn't needed, because the hub device is always accessible via 
usb_port->parent->parent.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux