On Mon, Oct 28, 2002 at 04:13:01PM -0800, Christopher Hoover wrote:
> [ Sorry; this time without patch mangling ... ]
>
>
> Dereferencing hcd.pdev will always oops with SA-1111. It has to be
> treated as a cookie, not a pointer in any common OHCI HCD code.
>
> Apparently we need a clean way to go from struct device * to struct
> ohci_hcd *. I added dev_to_ohci that does the obvious thing and added
> separate implementations for PCI and SA-1111. Two implementations is
> ugly but I didn't think it wise (for me) to hack on the PCI/driverfs
> interface, so I just cut & paste the old code.
>
> Two patches. The first is a diff from linux-2.5.44 and
> linux-2.5.44-rmk1. It is from rmk and adds a struct device pointer to
> ohci_hcd.
Why? What is that needed for? Oh wait, you don't have a pci device,
right? So where in the device tree does the sa111 controller show up?
What type of bus is it on?
> +struct ohci_hcd *dev_to_ohci(struct device *dev) {
> + struct pci_dev *pdev =
> + container_of (dev, struct pci_dev, dev);
> + struct ohci_hcd *ohci =
> + container_of (pci_get_drvdata (pdev), struct ohci_hcd, hcd);
> +
> + return ohci;
> +}
First { in a function goes on a new line :)
David, any opinions on this patch?
thanks,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel