From: Mark Brown Date: Thu, 17 Oct 2013 23:15:01 +0000 (+0100) Subject: Merge remote-tracking branch 'usb/usb-next' X-Git-Tag: next-20131017~21 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0144315772fe1157194c677db02424e5968bbcb2;p=karo-tx-linux.git Merge remote-tracking branch 'usb/usb-next' --- 0144315772fe1157194c677db02424e5968bbcb2 diff --cc drivers/usb/host/ehci-exynos.c index d919ed47bd47,016352e0f5a7..e97c198e052f --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@@ -89,13 -84,14 +84,13 @@@ static int exynos_ehci_probe(struct pla * Since shared usb code relies on it, set it here for now. * Once we move to full device tree support this will vanish off. */ - if (!pdev->dev.dma_mask) - pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; - if (!pdev->dev.coherent_dma_mask) - pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); + err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); + if (err) + return err; - s5p_setup_vbus_gpio(pdev); + exynos_setup_vbus_gpio(pdev); - hcd = usb_create_hcd(&s5p_ehci_hc_driver, + hcd = usb_create_hcd(&exynos_ehci_hc_driver, &pdev->dev, dev_name(&pdev->dev)); if (!hcd) { dev_err(&pdev->dev, "Unable to create HCD\n"); diff --cc drivers/usb/host/ohci-exynos.c index 866f2464f9de,a87baedc0aa7..91ec9b2cd378 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@@ -114,14 -71,19 +71,18 @@@ static int exynos_ohci_probe(struct pla * Since shared usb code relies on it, set it here for now. * Once we move to full device tree support this will vanish off. */ - if (!pdev->dev.dma_mask) - pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; - if (!pdev->dev.coherent_dma_mask) - pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); + err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); + if (err) + return err; - exynos_ohci = devm_kzalloc(&pdev->dev, sizeof(struct exynos_ohci_hcd), - GFP_KERNEL); - if (!exynos_ohci) + hcd = usb_create_hcd(&exynos_ohci_hc_driver, + &pdev->dev, dev_name(&pdev->dev)); + if (!hcd) { + dev_err(&pdev->dev, "Unable to create HCD\n"); return -ENOMEM; + } + + exynos_ohci = to_exynos_ohci(hcd); if (of_device_is_compatible(pdev->dev.of_node, "samsung,exynos5440-ohci"))