aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2012-11-26 16:09:13 -0800
committerArve Hjønnevåg <arve@android.com>2013-07-01 15:51:48 -0700
commit5f08b153be002b4a314c410083de23e049333d02 (patch)
treeb684d19a58f760837ba5d1a62276ae471a9f0960
parent37a05ab72b8c67523c0766319dfabe9290ad7d18 (diff)
usb: otg: otg-wakelock: Fix build for 3.7
Signed-off-by: Arve Hjønnevåg <arve@android.com>
-rw-r--r--drivers/usb/phy/otg-wakelock.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/phy/otg-wakelock.c b/drivers/usb/phy/otg-wakelock.c
index e17e2729906..479376bfa48 100644
--- a/drivers/usb/phy/otg-wakelock.c
+++ b/drivers/usb/phy/otg-wakelock.c
@@ -16,6 +16,7 @@
#include <linux/kernel.h>
#include <linux/device.h>
+#include <linux/err.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/wakelock.h>
@@ -138,13 +139,15 @@ MODULE_PARM_DESC(enabled, "enable wakelock when VBUS present");
static int __init otg_wakelock_init(void)
{
int ret;
+ struct usb_phy *phy;
- otgwl_xceiv = usb_get_transceiver();
+ phy = usb_get_phy(USB_PHY_TYPE_USB2);
- if (!otgwl_xceiv) {
+ if (IS_ERR(phy)) {
pr_err("%s: No USB transceiver found\n", __func__);
- return -ENODEV;
+ return PTR_ERR(phy);
}
+ otgwl_xceiv = phy;
snprintf(vbus_lock.name, sizeof(vbus_lock.name), "vbus-%s",
dev_name(otgwl_xceiv->dev));