On Wed, 2005-07-06 at 15:33, Michael Burian wrote: > hi all, > > I forward ported Benedikt's patch from May, and added the Kconfig change > suggested by Jean Philippe. > > I've tried with a CF card (USB cardreader) and an usb memory stick > 128MB, both worked. > > as neither attaching nor inlining does really work, please get the > tarball containing patches and readme from [1] > > patch is against linux-2.6.12-ep93xx (resp. linux-2.6.12 mainline) > and may (not) apply to different versions. > > please test, and tell me if it does (not) work. Once it works > we can care about cosmetic stuff. > ohci changes made the call to amba_set_drvdata useless. usb_create_hcd and usb_put_hcd are now in charge of setting the dev->driver_data field Here is a patch that removes this calls and permit usb-ohci module removal without segfault. JP Francois
diff -uprN linux-2.6.12.1/drivers/usb/host/ohci-ep93xx.c linux-2.6.12-ep93xx-usb/drivers/usb/host/ohci-ep93xx.c --- linux-2.6.12.1/drivers/usb/host/ohci-ep93xx.c 2005-07-07 09:20:20.000000000 +0200 +++ linux-2.6.12-ep93xx-usb/drivers/usb/host/ohci-ep93xx.c 2005-07-07 09:27:16.000000000 +0200 @@ -80,8 +80,7 @@ void usb_hcd_ep93xx_remove(struct usb_hc * * Store this function in the HCD's struct pci_driver as probe(). */ -int usb_hcd_ep93xx_probe(const struct hc_driver *driver, - struct usb_hcd **hcd_out, struct amba_device *dev) +int usb_hcd_ep93xx_probe(const struct hc_driver *driver, struct amba_device *dev) { int retval; struct usb_hcd *hcd; @@ -200,16 +199,12 @@ static const struct hc_driver ohci_ep93x static int ep93xxohci_probe(struct amba_device *dev, void *id) { - struct usb_hcd *hcd = NULL; int ret = -ENODEV; if (usb_disabled()) return -ENODEV; - ret = usb_hcd_ep93xx_probe(&ohci_ep93xx_hc_driver, &hcd, dev); - - if (ret == 0) - amba_set_drvdata(dev, hcd); + ret = usb_hcd_ep93xx_probe(&ohci_ep93xx_hc_driver, dev); return ret; } @@ -220,8 +215,6 @@ static int ep93xxohci_remove(struct amba usb_hcd_ep93xx_remove(hcd, dev); - amba_set_drvdata(dev, NULL); - return 0; }