diff options
| author | Eduardo Valentin <eduardo.valentin@ti.com> | 2013-04-17 13:12:11 -0400 |
|---|---|---|
| committer | Zhang Rui <rui.zhang@intel.com> | 2013-04-26 21:25:55 -0400 |
| commit | 5fda7f680a44c65ce44fbe37f254b8a82f49d241 (patch) | |
| tree | aee32b736138a59e9d0ed15eb965802488826269 | |
| parent | ef5e2124ec3d54182bd826411d864e0e28fc00d4 (diff) | |
thermal: cpu_cooling: alignment improvements
Improve code readiness by changing alignments so that
they match open parenthesis, like checkpatch.pl --strict
suggests.
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| -rw-r--r-- | drivers/thermal/cpu_cooling.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 04a952079eca..c94bf2e5de62 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c | |||
| @@ -270,7 +270,7 @@ static unsigned int get_cpu_frequency(unsigned int cpu, unsigned long level) | |||
| 270 | * cooling state). | 270 | * cooling state). |
| 271 | */ | 271 | */ |
| 272 | static int cpufreq_apply_cooling(struct cpufreq_cooling_device *cpufreq_device, | 272 | static int cpufreq_apply_cooling(struct cpufreq_cooling_device *cpufreq_device, |
| 273 | unsigned long cooling_state) | 273 | unsigned long cooling_state) |
| 274 | { | 274 | { |
| 275 | unsigned int cpuid, clip_freq; | 275 | unsigned int cpuid, clip_freq; |
| 276 | struct cpumask *mask = &cpufreq_device->allowed_cpus; | 276 | struct cpumask *mask = &cpufreq_device->allowed_cpus; |
| @@ -312,7 +312,7 @@ static int cpufreq_apply_cooling(struct cpufreq_cooling_device *cpufreq_device, | |||
| 312 | * Return: 0 (success) | 312 | * Return: 0 (success) |
| 313 | */ | 313 | */ |
| 314 | static int cpufreq_thermal_notifier(struct notifier_block *nb, | 314 | static int cpufreq_thermal_notifier(struct notifier_block *nb, |
| 315 | unsigned long event, void *data) | 315 | unsigned long event, void *data) |
| 316 | { | 316 | { |
| 317 | struct cpufreq_policy *policy = data; | 317 | struct cpufreq_policy *policy = data; |
| 318 | unsigned long max_freq = 0; | 318 | unsigned long max_freq = 0; |
| @@ -425,8 +425,8 @@ static struct notifier_block thermal_cpufreq_notifier_block = { | |||
| 425 | * Return: a valid struct thermal_cooling_device pointer on success, | 425 | * Return: a valid struct thermal_cooling_device pointer on success, |
| 426 | * on failure, it returns a corresponding ERR_PTR(). | 426 | * on failure, it returns a corresponding ERR_PTR(). |
| 427 | */ | 427 | */ |
| 428 | struct thermal_cooling_device *cpufreq_cooling_register( | 428 | struct thermal_cooling_device * |
| 429 | const struct cpumask *clip_cpus) | 429 | cpufreq_cooling_register(const struct cpumask *clip_cpus) |
| 430 | { | 430 | { |
| 431 | struct thermal_cooling_device *cool_dev; | 431 | struct thermal_cooling_device *cool_dev; |
| 432 | struct cpufreq_cooling_device *cpufreq_dev = NULL; | 432 | struct cpufreq_cooling_device *cpufreq_dev = NULL; |
| @@ -445,12 +445,12 @@ struct thermal_cooling_device *cpufreq_cooling_register( | |||
| 445 | max = policy.cpuinfo.max_freq; | 445 | max = policy.cpuinfo.max_freq; |
| 446 | } else { | 446 | } else { |
| 447 | if (min != policy.cpuinfo.min_freq || | 447 | if (min != policy.cpuinfo.min_freq || |
| 448 | max != policy.cpuinfo.max_freq) | 448 | max != policy.cpuinfo.max_freq) |
| 449 | return ERR_PTR(-EINVAL); | 449 | return ERR_PTR(-EINVAL); |
| 450 | } | 450 | } |
| 451 | } | 451 | } |
| 452 | cpufreq_dev = kzalloc(sizeof(struct cpufreq_cooling_device), | 452 | cpufreq_dev = kzalloc(sizeof(struct cpufreq_cooling_device), |
| 453 | GFP_KERNEL); | 453 | GFP_KERNEL); |
| 454 | if (!cpufreq_dev) | 454 | if (!cpufreq_dev) |
| 455 | return ERR_PTR(-ENOMEM); | 455 | return ERR_PTR(-ENOMEM); |
| 456 | 456 | ||
| @@ -466,7 +466,7 @@ struct thermal_cooling_device *cpufreq_cooling_register( | |||
| 466 | cpufreq_dev->id); | 466 | cpufreq_dev->id); |
| 467 | 467 | ||
| 468 | cool_dev = thermal_cooling_device_register(dev_name, cpufreq_dev, | 468 | cool_dev = thermal_cooling_device_register(dev_name, cpufreq_dev, |
| 469 | &cpufreq_cooling_ops); | 469 | &cpufreq_cooling_ops); |
| 470 | if (!cool_dev) { | 470 | if (!cool_dev) { |
| 471 | release_idr(&cpufreq_idr, cpufreq_dev->id); | 471 | release_idr(&cpufreq_idr, cpufreq_dev->id); |
| 472 | kfree(cpufreq_dev); | 472 | kfree(cpufreq_dev); |
| @@ -479,7 +479,7 @@ struct thermal_cooling_device *cpufreq_cooling_register( | |||
| 479 | /* Register the notifier for first cpufreq cooling device */ | 479 | /* Register the notifier for first cpufreq cooling device */ |
| 480 | if (cpufreq_dev_count == 0) | 480 | if (cpufreq_dev_count == 0) |
| 481 | cpufreq_register_notifier(&thermal_cpufreq_notifier_block, | 481 | cpufreq_register_notifier(&thermal_cpufreq_notifier_block, |
| 482 | CPUFREQ_POLICY_NOTIFIER); | 482 | CPUFREQ_POLICY_NOTIFIER); |
| 483 | cpufreq_dev_count++; | 483 | cpufreq_dev_count++; |
| 484 | 484 | ||
| 485 | mutex_unlock(&cooling_cpufreq_lock); | 485 | mutex_unlock(&cooling_cpufreq_lock); |
| @@ -504,8 +504,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) | |||
| 504 | /* Unregister the notifier for the last cpufreq cooling device */ | 504 | /* Unregister the notifier for the last cpufreq cooling device */ |
| 505 | if (cpufreq_dev_count == 0) | 505 | if (cpufreq_dev_count == 0) |
| 506 | cpufreq_unregister_notifier(&thermal_cpufreq_notifier_block, | 506 | cpufreq_unregister_notifier(&thermal_cpufreq_notifier_block, |
| 507 | CPUFREQ_POLICY_NOTIFIER); | 507 | CPUFREQ_POLICY_NOTIFIER); |
| 508 | |||
| 509 | mutex_unlock(&cooling_cpufreq_lock); | 508 | mutex_unlock(&cooling_cpufreq_lock); |
| 510 | 509 | ||
| 511 | thermal_cooling_device_unregister(cpufreq_dev->cool_dev); | 510 | thermal_cooling_device_unregister(cpufreq_dev->cool_dev); |
