usb: host: tegra: protect bus suspend with CONFIG_PM
authorAllen Martin <AMartin@nvidia.com>
Fri, 19 Nov 2010 22:15:34 +0000 (14:15 -0800)
committerColin Cross <ccross@android.com>
Thu, 25 Nov 2010 00:28:34 +0000 (16:28 -0800)
Protect the bus suspend/resume functions behind #ifdef CONFIG_PM.
This prevents a compile error if CONFIG_PM is turned off.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
drivers/usb/host/ehci-tegra.c

index e3b01b39fc3f2f96a9a9bc87153240aff06758d4..60db07950528a70e5ce682344d37669e46df4eb1 100644 (file)
@@ -415,6 +415,7 @@ static int tegra_ehci_setup(struct usb_hcd *hcd)
        return retval;
 }
 
+#ifdef CONFIG_PM
 static int tegra_ehci_bus_suspend(struct usb_hcd *hcd)
 {
        struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller);
@@ -442,6 +443,7 @@ static int tegra_ehci_bus_resume(struct usb_hcd *hcd)
        tegra->port_resuming = 1;
        return ehci_bus_resume(hcd);
 }
+#endif
 
 static const struct hc_driver tegra_ehci_hc_driver = {
        .description            = hcd_name,