On Mon, 25 Mar 2013, Arnd Bergmann wrote:
> This lets us use the ehci-generic driver on platforms without special
> requirements for their ehci controllers. In particular, this is true
> for the vt8500/wm8x50 platforms, which currently have a separate
> driver that causes problems with multiplatform configurations.
> static int ehci_platform_probe(struct platform_device *dev)
> {
> struct usb_hcd *hcd;
> struct resource *res_mem;
> - struct usb_ehci_pdata *pdata = dev->dev.platform_data;
> + struct usb_ehci_pdata *pdata;
> int irq;
> int err = -ENOMEM;
>
> - if (!pdata) {
> - WARN_ON(1);
> - return -ENODEV;
> - }
> -
> if (usb_disabled())
> return -ENODEV;
>
> + if (!dev->dev.platform_data) {
> + dev->dev.platform_data = &ehci_platform_defaults;
> + dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
> + dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
In view of Felipe's comment, shouldn't these last two lines be
controlled by dev->dev.of_node != NULL instead?
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html