diff options
author | Arve Hjønnevåg <arve@android.com> | 2012-11-26 16:09:13 -0800 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2014-05-02 23:12:19 +0200 |
commit | 9a82ffc50f02991446f56d448a68424baaef6061 (patch) | |
tree | 9f86b0104b3762dde240125caff5ae6b5521332e | |
parent | 9e4e6fea5c941090961736ab84edbbd5b26335d8 (diff) | |
download | kernel_goldelico_gta04-9a82ffc50f02991446f56d448a68424baaef6061.zip kernel_goldelico_gta04-9a82ffc50f02991446f56d448a68424baaef6061.tar.gz kernel_goldelico_gta04-9a82ffc50f02991446f56d448a68424baaef6061.tar.bz2 |
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/phy/otg-wakelock.c b/drivers/usb/phy/otg-wakelock.c index e17e272..479376b 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)); |