Re: [Resend PATCH V3 7/8] usb/acpi: add the support of usb hub ports' acpi binding without attached devices.

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

 



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?

>  struct usb_hub_port {
>  	void			*port_owner;
>  	struct usb_device	*child;
> +	unsigned long		platform_data;

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.

I'll go test the other patches in this series now...

greg k-h
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux