From: Viresh Kumar Date: Thu, 28 Aug 2014 05:52:23 +0000 (+0530) Subject: cpufreq: Add support for per-policy driver data X-Git-Tag: v3.18-rc1~109^2~3^2^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=413fffc3a1db7f270afdf1ecb35c1edc013acc68;p=thirdparty%2Fkernel%2Flinux.git cpufreq: Add support for per-policy driver data Drivers supporting multiple clusters or multiple 'struct cpufreq_policy' instances may need to keep per-policy data. If the core doesn't provide support for that, they might do it in the most unoptimized way: 'per-cpu' data. This patch adds another field in struct cpufreq_policy: 'driver_data'. It isn't accessed by core and is for driver's internal use only. Tested-by: Stephen Boyd Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 7d1955afa62c7..138336b6bb043 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -112,6 +112,9 @@ struct cpufreq_policy { spinlock_t transition_lock; wait_queue_head_t transition_wait; struct task_struct *transition_task; /* Task which is doing the transition */ + + /* For cpufreq driver's internal use */ + void *driver_data; }; /* Only for ACPI */