summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-ventana.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana.c')
-rw-r--r--arch/arm/mach-tegra/board-ventana.c51
1 files changed, 2 insertions, 49 deletions
diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c
index a7265bd6c0da..845494baf9e5 100644
--- a/arch/arm/mach-tegra/board-ventana.c
+++ b/arch/arm/mach-tegra/board-ventana.c
@@ -491,56 +491,9 @@ static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
},
};
-static struct platform_device *tegra_usb_otg_host_register(void)
-{
- struct platform_device *pdev;
- void *platform_data;
- int val;
-
- pdev = platform_device_alloc(tegra_ehci1_device.name, tegra_ehci1_device.id);
- if (!pdev)
- return NULL;
-
- val = platform_device_add_resources(pdev, tegra_ehci1_device.resource,
- tegra_ehci1_device.num_resources);
- if (val)
- goto error;
-
- pdev->dev.dma_mask = tegra_ehci1_device.dev.dma_mask;
- pdev->dev.coherent_dma_mask = tegra_ehci1_device.dev.coherent_dma_mask;
-
- platform_data = kmalloc(sizeof(struct tegra_ehci_platform_data), GFP_KERNEL);
- if (!platform_data)
- goto error;
-
- memcpy(platform_data, &tegra_ehci_pdata[0],
- sizeof(struct tegra_ehci_platform_data));
- pdev->dev.platform_data = platform_data;
-
- val = platform_device_add(pdev);
- if (val)
- goto error_add;
-
- return pdev;
-
-error_add:
- kfree(platform_data);
-error:
- pr_err("%s: failed to add the host contoller device\n", __func__);
- platform_device_put(pdev);
- return NULL;
-}
-
-static void tegra_usb_otg_host_unregister(struct platform_device *pdev)
-{
- kfree(pdev->dev.platform_data);
- pdev->dev.platform_data = NULL;
- platform_device_unregister(pdev);
-}
-
static struct tegra_otg_platform_data tegra_otg_pdata = {
- .host_register = &tegra_usb_otg_host_register,
- .host_unregister = &tegra_usb_otg_host_unregister,
+ .ehci_device = &tegra_ehci1_device,
+ .ehci_pdata = &tegra_ehci_pdata[0],
};
static int __init ventana_gps_init(void)