mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify
commite247723314
upstream. Fix boolean expressions by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes:4fa084af28
("ARM: OSIRIS: DVS (Dynamic Voltage Scaling) supoort.") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> [krzk: Fix -Wparentheses warning] Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a8cae6144a
commit
6f419070c8
1 changed files with 4 additions and 4 deletions
|
@ -70,16 +70,16 @@ static int osiris_dvs_notify(struct notifier_block *nb,
|
|||
|
||||
switch (val) {
|
||||
case CPUFREQ_PRECHANGE:
|
||||
if (old_dvs & !new_dvs ||
|
||||
cur_dvs & !new_dvs) {
|
||||
if ((old_dvs && !new_dvs) ||
|
||||
(cur_dvs && !new_dvs)) {
|
||||
pr_debug("%s: exiting dvs\n", __func__);
|
||||
cur_dvs = false;
|
||||
gpio_set_value(OSIRIS_GPIO_DVS, 1);
|
||||
}
|
||||
break;
|
||||
case CPUFREQ_POSTCHANGE:
|
||||
if (!old_dvs & new_dvs ||
|
||||
!cur_dvs & new_dvs) {
|
||||
if ((!old_dvs && new_dvs) ||
|
||||
(!cur_dvs && new_dvs)) {
|
||||
pr_debug("entering dvs\n");
|
||||
cur_dvs = true;
|
||||
gpio_set_value(OSIRIS_GPIO_DVS, 0);
|
||||
|
|
Loading…
Reference in a new issue