diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-11-21 06:36:49 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-11-24 00:49:42 +0300 |
commit | f344dae0fe9f88d3c7ec45f2d7bba84d6ce1ac00 (patch) | |
tree | c2dac58bfd7504fcbf141dc62fb92d9bae04a6ec /drivers/cpufreq/spear-cpufreq.c | |
parent | 3bf7f56e70c9f0edb4f91cbb73a393c3b1d24801 (diff) | |
download | linux-f344dae0fe9f88d3c7ec45f2d7bba84d6ce1ac00.tar.xz |
cpufreq: Always remove sysfs cpuX/cpufreq link on ->remove_dev()
Subsys interface's ->remove_dev() is called when the cpufreq driver is
unregistering or the CPU is getting physically removed. We keep removing
the cpuX/cpufreq link for all CPUs except the last one, which is a
mistake as all CPUs contain a link now.
Because of this, one CPU from each policy will still contain a link (to
an already removed policyX directory), after the cpufreq driver is
unregistered.
Fix that by removing the link first and then only see if the policy is
required to be freed. That will make sure that no links are left out.
Fixes: 96bdda61f58b ("cpufreq: create cpu/cpufreq/policyX directories")
Reported-and-tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/spear-cpufreq.c')
0 files changed, 0 insertions, 0 deletions