• P
    acpi-cpufreq: replace per_cpu with driver_data of policy · eb0b3e78
    Pan Xinhui 提交于
    Drivers can store their internal per-policy information in
    policy->driver_data, lets use it.
    
    we have benefits after this replacing.
    1) memory saving.
    2) policy is shared by several cpus, per_cpu seems not correct. using
    *driver_data* is more reasonable.
    3) fix a memory leak in acpi_cpufreq_cpu_exit. as policy->cpu might
    change during cpu hotplug. So sometimes we cant't free *data*, use
    *driver_data* to fix it.
    4) fix a zero return value of get_cur_freq_on_cpu. Only per_cpu of
    policy->cpu is set to *data*, if we try to get cpufreq on other cpus, we
    get zero instead of correct values. Use *driver_data* to fix it.
    Signed-off-by: NPan Xinhui <xinhuix.pan@intel.com>
    Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    eb0b3e78
acpi-cpufreq.c 24.3 KB