aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArve Hjønnevåg2012-11-26 18:09:13 -0600
committerArve Hjønnevåg2013-02-22 17:27:45 -0600
commitb73d1c2590b8af4355fdc0f1fed6f791bd6e89b7 (patch)
tree087133a0526f84f93b3dfd49d7479a1a52a437b7
parentfa0836860e89d3ae6cc6d28918de2a8495656ed1 (diff)
downloadkernel-common-b73d1c2590b8af4355fdc0f1fed6f791bd6e89b7.tar.gz
kernel-common-b73d1c2590b8af4355fdc0f1fed6f791bd6e89b7.tar.xz
kernel-common-b73d1c2590b8af4355fdc0f1fed6f791bd6e89b7.zip
usb: otg: otg-wakelock: Fix build for 3.7
Signed-off-by: Arve Hjønnevåg <arve@android.com>
-rw-r--r--drivers/usb/otg/otg-wakelock.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/otg/otg-wakelock.c b/drivers/usb/otg/otg-wakelock.c
index e17e2729906..479376bfa48 100644
--- a/drivers/usb/otg/otg-wakelock.c
+++ b/drivers/usb/otg/otg-wakelock.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/device.h> 18#include <linux/device.h>
19#include <linux/err.h>
19#include <linux/module.h> 20#include <linux/module.h>
20#include <linux/notifier.h> 21#include <linux/notifier.h>
21#include <linux/wakelock.h> 22#include <linux/wakelock.h>
@@ -138,13 +139,15 @@ MODULE_PARM_DESC(enabled, "enable wakelock when VBUS present");
138static int __init otg_wakelock_init(void) 139static int __init otg_wakelock_init(void)
139{ 140{
140 int ret; 141 int ret;
142 struct usb_phy *phy;
141 143
142 otgwl_xceiv = usb_get_transceiver(); 144 phy = usb_get_phy(USB_PHY_TYPE_USB2);
143 145
144 if (!otgwl_xceiv) { 146 if (IS_ERR(phy)) {
145 pr_err("%s: No USB transceiver found\n", __func__); 147 pr_err("%s: No USB transceiver found\n", __func__);
146 return -ENODEV; 148 return PTR_ERR(phy);
147 } 149 }
150 otgwl_xceiv = phy;
148 151
149 snprintf(vbus_lock.name, sizeof(vbus_lock.name), "vbus-%s", 152 snprintf(vbus_lock.name, sizeof(vbus_lock.name), "vbus-%s",
150 dev_name(otgwl_xceiv->dev)); 153 dev_name(otgwl_xceiv->dev));