Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127841
b: refs/heads/master
c: 9fd7a1d
h: refs/heads/master
i:
  127839: e362ad5
v: v3
  • Loading branch information
Inaky Perez-Gonzalez authored and David S. Miller committed Jan 8, 2009
1 parent a996999 commit cf23c3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2e9da4b09c99857080afd2e8143f70bc03ebe9b
refs/heads/master: 9fd7a1d92b4462acaa460bb0f58b12ede6ffe6b9
6 changes: 6 additions & 0 deletions trunk/drivers/net/wimax/i2400m/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,13 @@ int i2400mu_probe(struct usb_interface *iface,
i2400m->bus_fw_name = I2400MU_FW_FILE_NAME;
i2400m->bus_bm_mac_addr_impaired = 0;

#ifdef CONFIG_PM
iface->needs_remote_wakeup = 1; /* autosuspend (15s delay) */
device_init_wakeup(dev, 1);
usb_autopm_enable(i2400mu->usb_iface);
usb_dev->autosuspend_delay = 15 * HZ;
usb_dev->autosuspend_disabled = 0;
#endif

result = i2400m_setup(i2400m, I2400M_BRI_MAC_REINIT);
if (result < 0) {
Expand Down Expand Up @@ -493,7 +495,9 @@ int i2400mu_suspend(struct usb_interface *iface, pm_message_t pm_msg)
int result = 0;
struct device *dev = &iface->dev;
struct i2400mu *i2400mu = usb_get_intfdata(iface);
#ifdef CONFIG_PM
struct usb_device *usb_dev = i2400mu->usb_dev;
#endif
struct i2400m *i2400m = &i2400mu->i2400m;

d_fnstart(3, dev, "(iface %p pm_msg %u)\n", iface, pm_msg.event);
Expand All @@ -503,11 +507,13 @@ int i2400mu_suspend(struct usb_interface *iface, pm_message_t pm_msg)
atomic_dec(&i2400mu->do_autopm);
result = i2400m_cmd_enter_powersave(i2400m);
atomic_inc(&i2400mu->do_autopm);
#ifdef CONFIG_PM
if (result < 0 && usb_dev->auto_pm == 0) {
/* System suspend, can't fail */
dev_err(dev, "failed to suspend, will reset on resume\n");
result = 0;
}
#endif
if (result < 0)
goto error_enter_powersave;
i2400mu_notification_release(i2400mu);
Expand Down

0 comments on commit cf23c3e

Please sign in to comment.