hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/arm/mach-omap2/powerdomain.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * OMAP powerdomain control
34 *
....@@ -7,10 +8,6 @@
78 * Written by Paul Walmsley
89 * Added OMAP4 specific support by Abhijit Pagare <abhijitpagare@ti.com>
910 * State counting code by Tero Kristo <tero.kristo@nokia.com>
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License version 2 as
13
- * published by the Free Software Foundation.
1411 */
1512 #undef DEBUG
1613
....@@ -177,7 +174,7 @@
177174 break;
178175 case PWRDM_STATE_PREV:
179176 prev = pwrdm_read_prev_pwrst(pwrdm);
180
- if (pwrdm->state != prev)
177
+ if (prev >= 0 && pwrdm->state != prev)
181178 pwrdm->state_counter[prev]++;
182179 if (prev == PWRDM_POWER_RET)
183180 _update_logic_membank_counters(pwrdm);