diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2011-01-04 18:10:33 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:43:25 -0800 |
commit | 918a75585d3db690f078cc705664fb698a0a0f7b (patch) | |
tree | 99f5249ae5fc364dcdf946ca818d7cb4d4176004 /drivers/usb/otg | |
parent | c9d4246d778b8fdb5d4fa08fb76f7646daa4b633 (diff) |
tegra: otg: Don't use global functions in board files
Releasing the platform_data in unregister.
Original-Change-Id: Iba1c6e7ad42b0886f8ce9dadf9664bcc266398d4
Reviewed-on: http://git-master/r/14963
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R0e004bd1328eac471c56390b4f79d6ec8c04d877
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r-- | drivers/usb/otg/tegra-otg.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c index 1a858b05acc4..e3b7d5f38eaa 100644 --- a/drivers/usb/otg/tegra-otg.c +++ b/drivers/usb/otg/tegra-otg.c @@ -43,9 +43,6 @@ #define USB_VBUS_STATUS (1 << 10) #define USB_INTS (USB_VBUS_INT_STATUS | USB_ID_INT_STATUS) -extern struct platform_device *tegra_usb_otg_host_register(); -extern void tegra_usb_otg_host_unregister(struct platform_device *pdev); - struct tegra_otg_data { struct otg_transceiver otg; unsigned long int_status; @@ -83,15 +80,17 @@ static const char *tegra_state_name(enum usb_otg_state state) void tegra_start_host(struct tegra_otg_data *tegra) { + struct tegra_otg_platform_data *pdata = tegra->otg.dev->platform_data; if (!tegra->pdev) { - tegra->pdev = tegra_usb_otg_host_register(); + tegra->pdev = pdata->host_register(); } } void tegra_stop_host(struct tegra_otg_data *tegra) { + struct tegra_otg_platform_data *pdata = tegra->otg.dev->platform_data; if (tegra->pdev) { - tegra_usb_otg_host_unregister(tegra->pdev); + pdata->host_unregister(tegra->pdev); tegra->pdev = NULL; } } @@ -255,7 +254,6 @@ static int tegra_otg_probe(struct platform_device *pdev) tegra->otg.set_peripheral = tegra_otg_set_peripheral; tegra->otg.set_suspend = tegra_otg_set_suspend; tegra->otg.set_power = tegra_otg_set_power; - tegra->host = pdev->dev.platform_data; spin_lock_init(&tegra->lock); platform_set_drvdata(pdev, tegra); |