On 02/13/2012 05:44 PM, Alan Stern wrote: > On Sun, 12 Feb 2012, Hauke Mehrtens wrote: > >> This adds a generic driver for platform devices. It works like the PCI >> driver and is based on it. This is for devices which do not have an own >> bus but their EHCI controller works like a PCI controller. It will be >> used for the Broadcom bcma and ssb USB EHCI controller. > >> +static int ehci_platform_reset(struct usb_hcd *hcd) >> +{ >> + struct platform_device *pdev = to_platform_device(hcd->self.controller); >> + struct usb_hci_pdata *pdata = pdev->dev.platform_data; > > A minor problem here is that quite a few of the existing platform > drivers already use pdev->dev.platform_data for their own structures. > Somehow those structures will need to be combined with your > usb_hci_pdata stuff. Have you considered how to do this? > > Obviously it's not a major problem because the other drivers can be > switched over to your scheme one at a time. Still, it's worth thinking > over. It does not make sense to have these "old" structures when using the new driver. platform_data should be used to provide the driver with some additional data and this driver has it's own struct, so the code registering a device for this driver should provide the struct the driver needs and noone would use an other platform_data. I do not think it makes sense to convert all platform drivers to the generic platform driver as some are doing many things no other driver does and the generic driver would need too many workarounds. We should focus on the simple drivers at first. Hauke -- 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