Skip to content

Commit

Permalink
ditto for usb hub and net phy
Browse files Browse the repository at this point in the history
  • Loading branch information
polesapart committed Nov 21, 2014
1 parent e97ddb9 commit e1443f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ void phy_start_machine(struct phy_device *phydev,
{
phydev->adjust_state = handler;

schedule_delayed_work(&phydev->state_queue, HZ);
queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, HZ);
}

/**
Expand Down Expand Up @@ -682,7 +682,7 @@ static void phy_change(struct work_struct *work)

/* reschedule state queue work to run as soon as possible */
cancel_delayed_work_sync(&phydev->state_queue);
schedule_delayed_work(&phydev->state_queue, 0);
queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, 0);

return;

Expand Down Expand Up @@ -966,5 +966,5 @@ void phy_state_machine(struct work_struct *work)
if (err < 0)
phy_error(phydev);

schedule_delayed_work(&phydev->state_queue, PHY_STATE_TIME * HZ);
queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, PHY_STATE_TIME * HZ);
}
12 changes: 6 additions & 6 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static void led_work (struct work_struct *work)
changed++;
}
if (changed)
schedule_delayed_work(&hub->leds, LED_CYCLE_PERIOD);
queue_delayed_work(system_power_efficient_wq, &hub->leds, LED_CYCLE_PERIOD);
}

/* use a short timeout for hub/port status fetches */
Expand Down Expand Up @@ -725,7 +725,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
if (type == HUB_INIT) {
delay = hub_power_on(hub, false);
PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func2);
schedule_delayed_work(&hub->init_work,
queue_delayed_work(system_power_efficient_wq, &hub->init_work,
msecs_to_jiffies(delay));

/* Suppress autosuspend until init is done */
Expand Down Expand Up @@ -869,7 +869,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
/* Don't do a long sleep inside a workqueue routine */
if (type == HUB_INIT2) {
PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func3);
schedule_delayed_work(&hub->init_work,
queue_delayed_work(system_power_efficient_wq, &hub->init_work,
msecs_to_jiffies(delay));
return; /* Continues at init3: below */
} else {
Expand All @@ -883,7 +883,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
if (status < 0)
dev_err(hub->intfdev, "activate --> %d\n", status);
if (hub->has_indicators && blinkenlights)
schedule_delayed_work(&hub->leds, LED_CYCLE_PERIOD);
queue_delayed_work(system_power_efficient_wq, &hub->leds, LED_CYCLE_PERIOD);

/* Scan all ports that need attention */
kick_khubd(hub);
Expand Down Expand Up @@ -3084,7 +3084,7 @@ check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
/* hub LEDs are probably harder to miss than syslog */
if (hub->has_indicators) {
hub->indicator[port1-1] = INDICATOR_GREEN_BLINK;
schedule_delayed_work (&hub->leds, 0);
queue_delayed_work(system_power_efficient_wq, &hub->leds, 0);
}
}
kfree(qual);
Expand Down Expand Up @@ -3297,7 +3297,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
if (hub->has_indicators) {
hub->indicator[port1-1] =
INDICATOR_AMBER_BLINK;
schedule_delayed_work (&hub->leds, 0);
queue_delayed_work(system_power_efficient_wq, &hub->leds, 0);
}
status = -ENOTCONN; /* Don't retry */
goto loop_disable;
Expand Down

0 comments on commit e1443f1

Please sign in to comment.