Skip to content

Commit

Permalink
cpuidle: Add other commits left out during CAF's 3.18 stable merge
Browse files Browse the repository at this point in the history
These commits were left out by CAF during the 3.18.31 -> 3.18.71 merge,
when they shouldn't have been because they picked clean. Add them back
to avoid future merge conflicts and be closer to stable.

2506cfa ("cpuidle: Fix cpuidle_state_is_coupled() argument in cpuidle_enter()")
887f64e ("cpuidle: Indicate when a device has been unregistered")

Signed-off-by: ahmedradaideh <ahmed.radaideh@gmail.com>
Signed-off-by: khusika <khusikadhamar@gmail.com>
  • Loading branch information
ahmedradaideh authored and khusika committed Oct 26, 2018
1 parent a7656bb commit df47eac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/cpuidle/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
/* The cpu is no longer idle or about to enter idle. */
sched_idle_set_state(NULL, -1);

if (!cpuidle_state_is_coupled(dev, drv, entered_state))
if (!cpuidle_state_is_coupled(dev, drv, index))
local_irq_enable();

diff = ktime_to_us(ktime_sub(time_end, time_start));
Expand Down Expand Up @@ -364,6 +364,8 @@ static void __cpuidle_unregister_device(struct cpuidle_device *dev)
list_del(&dev->device_list);
per_cpu(cpuidle_devices, dev->cpu) = NULL;
module_put(drv->owner);

dev->registered = 0;
}

static void __cpuidle_device_init(struct cpuidle_device *dev)
Expand Down

0 comments on commit df47eac

Please sign in to comment.