intel_idle: Clean up all registered devices on exit.
authorRichard Cochran <rcochran@linutronix.de>
Wed, 6 Apr 2016 21:00:57 +0000 (17:00 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Apr 2016 20:11:05 +0000 (22:11 +0200)
commit3e66a9ab53641a0f7a440e56f7b35bf5d77494b3
treeee8c1d45d4691c4e45cd60302817c5b8933b3115
parent08820546e4c30c84d0a1f1a49df055e1719c07ea
intel_idle: Clean up all registered devices on exit.

This driver registers cpuidle devices when a CPU comes online, but it
leaves the registrations in place when a CPU goes offline.  The module
exit code only unregisters the currently online CPUs, leaving the
devices for offline CPUs dangling.

This patch changes the driver to clean up all registrations on exit,
even those from CPUs that are offline.

Signed-off-by: Richard Cochran <rcochran@linutronix.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/idle/intel_idle.c