diff options
Diffstat (limited to 'drivers/net/wimax')
-rw-r--r-- | drivers/net/wimax/i2400m/usb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c index 6d4b65fd9c17..c6d93465c7e2 100644 --- a/drivers/net/wimax/i2400m/usb.c +++ b/drivers/net/wimax/i2400m/usb.c | |||
@@ -397,11 +397,13 @@ int i2400mu_probe(struct usb_interface *iface, | |||
397 | i2400m->bus_fw_name = I2400MU_FW_FILE_NAME; | 397 | i2400m->bus_fw_name = I2400MU_FW_FILE_NAME; |
398 | i2400m->bus_bm_mac_addr_impaired = 0; | 398 | i2400m->bus_bm_mac_addr_impaired = 0; |
399 | 399 | ||
400 | #ifdef CONFIG_PM | ||
400 | iface->needs_remote_wakeup = 1; /* autosuspend (15s delay) */ | 401 | iface->needs_remote_wakeup = 1; /* autosuspend (15s delay) */ |
401 | device_init_wakeup(dev, 1); | 402 | device_init_wakeup(dev, 1); |
402 | usb_autopm_enable(i2400mu->usb_iface); | 403 | usb_autopm_enable(i2400mu->usb_iface); |
403 | usb_dev->autosuspend_delay = 15 * HZ; | 404 | usb_dev->autosuspend_delay = 15 * HZ; |
404 | usb_dev->autosuspend_disabled = 0; | 405 | usb_dev->autosuspend_disabled = 0; |
406 | #endif | ||
405 | 407 | ||
406 | result = i2400m_setup(i2400m, I2400M_BRI_MAC_REINIT); | 408 | result = i2400m_setup(i2400m, I2400M_BRI_MAC_REINIT); |
407 | if (result < 0) { | 409 | if (result < 0) { |
@@ -493,7 +495,9 @@ int i2400mu_suspend(struct usb_interface *iface, pm_message_t pm_msg) | |||
493 | int result = 0; | 495 | int result = 0; |
494 | struct device *dev = &iface->dev; | 496 | struct device *dev = &iface->dev; |
495 | struct i2400mu *i2400mu = usb_get_intfdata(iface); | 497 | struct i2400mu *i2400mu = usb_get_intfdata(iface); |
498 | #ifdef CONFIG_PM | ||
496 | struct usb_device *usb_dev = i2400mu->usb_dev; | 499 | struct usb_device *usb_dev = i2400mu->usb_dev; |
500 | #endif | ||
497 | struct i2400m *i2400m = &i2400mu->i2400m; | 501 | struct i2400m *i2400m = &i2400mu->i2400m; |
498 | 502 | ||
499 | d_fnstart(3, dev, "(iface %p pm_msg %u)\n", iface, pm_msg.event); | 503 | d_fnstart(3, dev, "(iface %p pm_msg %u)\n", iface, pm_msg.event); |
@@ -503,11 +507,13 @@ int i2400mu_suspend(struct usb_interface *iface, pm_message_t pm_msg) | |||
503 | atomic_dec(&i2400mu->do_autopm); | 507 | atomic_dec(&i2400mu->do_autopm); |
504 | result = i2400m_cmd_enter_powersave(i2400m); | 508 | result = i2400m_cmd_enter_powersave(i2400m); |
505 | atomic_inc(&i2400mu->do_autopm); | 509 | atomic_inc(&i2400mu->do_autopm); |
510 | #ifdef CONFIG_PM | ||
506 | if (result < 0 && usb_dev->auto_pm == 0) { | 511 | if (result < 0 && usb_dev->auto_pm == 0) { |
507 | /* System suspend, can't fail */ | 512 | /* System suspend, can't fail */ |
508 | dev_err(dev, "failed to suspend, will reset on resume\n"); | 513 | dev_err(dev, "failed to suspend, will reset on resume\n"); |
509 | result = 0; | 514 | result = 0; |
510 | } | 515 | } |
516 | #endif | ||
511 | if (result < 0) | 517 | if (result < 0) |
512 | goto error_enter_powersave; | 518 | goto error_enter_powersave; |
513 | i2400mu_notification_release(i2400mu); | 519 | i2400mu_notification_release(i2400mu); |