diff options
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 73544bd440b..9692bef159f 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c | |||
@@ -581,15 +581,16 @@ static const struct hc_driver tegra_ehci_hc_driver = { | |||
581 | .port_handed_over = ehci_port_handed_over, | 581 | .port_handed_over = ehci_port_handed_over, |
582 | }; | 582 | }; |
583 | 583 | ||
584 | static int setup_vbus_gpio(struct platform_device *pdev) | 584 | static int setup_vbus_gpio(struct platform_device *pdev, |
585 | struct tegra_ehci_platform_data *pdata) | ||
585 | { | 586 | { |
586 | int err = 0; | 587 | int err = 0; |
587 | int gpio; | 588 | int gpio; |
588 | 589 | ||
589 | if (!pdev->dev.of_node) | 590 | gpio = pdata->vbus_gpio; |
590 | return 0; | 591 | if (!gpio_is_valid(gpio)) |
591 | 592 | gpio = of_get_named_gpio(pdev->dev.of_node, | |
592 | gpio = of_get_named_gpio(pdev->dev.of_node, "nvidia,vbus-gpio", 0); | 593 | "nvidia,vbus-gpio", 0); |
593 | if (!gpio_is_valid(gpio)) | 594 | if (!gpio_is_valid(gpio)) |
594 | return 0; | 595 | return 0; |
595 | 596 | ||
@@ -633,7 +634,7 @@ static int tegra_ehci_probe(struct platform_device *pdev) | |||
633 | if (!pdev->dev.dma_mask) | 634 | if (!pdev->dev.dma_mask) |
634 | pdev->dev.dma_mask = &tegra_ehci_dma_mask; | 635 | pdev->dev.dma_mask = &tegra_ehci_dma_mask; |
635 | 636 | ||
636 | setup_vbus_gpio(pdev); | 637 | setup_vbus_gpio(pdev, pdata); |
637 | 638 | ||
638 | tegra = kzalloc(sizeof(struct tegra_ehci_hcd), GFP_KERNEL); | 639 | tegra = kzalloc(sizeof(struct tegra_ehci_hcd), GFP_KERNEL); |
639 | if (!tegra) | 640 | if (!tegra) |