diff options
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
| -rw-r--r-- | drivers/usb/host/ohci-at91.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 476b5a5baf25..418444ebb1b8 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
| @@ -469,7 +469,7 @@ MODULE_DEVICE_TABLE(of, at91_ohci_dt_ids); | |||
| 469 | static int ohci_at91_of_init(struct platform_device *pdev) | 469 | static int ohci_at91_of_init(struct platform_device *pdev) |
| 470 | { | 470 | { |
| 471 | struct device_node *np = pdev->dev.of_node; | 471 | struct device_node *np = pdev->dev.of_node; |
| 472 | int i, gpio; | 472 | int i, gpio, ret; |
| 473 | enum of_gpio_flags flags; | 473 | enum of_gpio_flags flags; |
| 474 | struct at91_usbh_data *pdata; | 474 | struct at91_usbh_data *pdata; |
| 475 | u32 ports; | 475 | u32 ports; |
| @@ -481,10 +481,9 @@ static int ohci_at91_of_init(struct platform_device *pdev) | |||
| 481 | * Since shared usb code relies on it, set it here for now. | 481 | * Since shared usb code relies on it, set it here for now. |
| 482 | * Once we have dma capability bindings this can go away. | 482 | * Once we have dma capability bindings this can go away. |
| 483 | */ | 483 | */ |
| 484 | if (!pdev->dev.dma_mask) | 484 | ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); |
| 485 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; | 485 | if (ret) |
| 486 | if (!pdev->dev.coherent_dma_mask) | 486 | return ret; |
| 487 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
| 488 | 487 | ||
| 489 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 488 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
| 490 | if (!pdata) | 489 | if (!pdata) |
