summaryrefslogtreecommitdiff
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorKrishna Yarlagadda <kyarlagadda@nvidia.com>2012-06-13 18:20:16 +0530
committerLokesh Pathak <lpathak@nvidia.com>2012-06-18 08:22:13 -0700
commit3deb1f094fa06f10fb905d71ac5c8425fb0a6c21 (patch)
tree3868380d13b0166ad93885ec2c016bb7e612a445 /drivers/usb/otg
parentfdb906a1f0b7f0eeca4c20c58cb4fefc51d62124 (diff)
USB: tegra: otg: Enable host by default
Host support should be disabled only when there is platform data specifying proper setting. Bug 998001 Change-Id: I99ff534074dd7ebbf12b53dcf53d6286925965d2 Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/108760 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r--drivers/usb/otg/tegra-otg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c
index 9aa155caaebd..8442fcfc2796 100644
--- a/drivers/usb/otg/tegra-otg.c
+++ b/drivers/usb/otg/tegra-otg.c
@@ -152,8 +152,6 @@ static void tegra_start_host(struct tegra_otg_data *tegra)
memcpy(platform_data, pdata->ehci_pdata,
sizeof(struct tegra_usb_platform_data));
pdev->dev.platform_data = platform_data;
- tegra->builtin_host = !pdata->ehci_pdata->builtin_host_disabled;
-
val = platform_device_add(pdev);
if (val)
goto error_add;
@@ -398,6 +396,7 @@ static int tegra_otg_probe(struct platform_device *pdev)
{
struct tegra_otg_data *tegra;
struct resource *res;
+ struct tegra_usb_otg_data *pdata = dev_get_platdata(&pdev->dev);
int err;
tegra = kzalloc(sizeof(struct tegra_otg_data), GFP_KERNEL);
@@ -413,6 +412,10 @@ static int tegra_otg_probe(struct platform_device *pdev)
tegra->otg.set_power = tegra_otg_set_power;
spin_lock_init(&tegra->lock);
+ if (pdata) {
+ tegra->builtin_host = !pdata->ehci_pdata->builtin_host_disabled;
+ }
+
platform_set_drvdata(pdev, tegra);
tegra_clone = tegra;
tegra->interrupt_mode = true;