Re: [PATCH 06/20] usb: hcd-pci: introduce pm-ops for platform-pci devs

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

 



On Fri, 9 Sep 2011, Felipe Balbi wrote:

> > In this case, all we have to do is export a single symbol:  
> > ehci_hc_driver.  Then ehci-tegra can copy that into a private structure
> > and overwrite whatever fields it wants.  Very simple, no extra tests or
> > redirections needed.  The other ehci-<arch> drivers can use
> > ehci_hc_driver directly when they call usb_create_hcd().
> 
> Because archs which don't need to do anything, still need to copy
> ehci_hc_driver and pass that back to ehci-hcd.c.

They don't need to copy anything.  They just pass a pointer to 
ehci_hc_driver to whatever needs it -- either usb_create_hcd() or some 
routine in ehci-hcd.c.

> My suggestion is so that archs which are "fully compliant", will just
> not initialize platform_data.

But even then, you complicate ehci-hcd by making it check for an 
override every time one of its methods is called.  It's better for 
non-"fully-compliant" archs to use an hc_driver structure that already 
contains the necessary method pointers.

Alan Stern

--
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