# \[PATCH v2 5/9\] ACPI / cpuidle: remove dev-\>state\_count setting

- From: Bartlomiej Zolnierkiewicz \<hidden\>
- Date: 2013-12-20 18:49:47 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2013/12/4171504
- Thread: https://ratatoskr.run/linux-pm/2013/12/4171496/t.md

```text
dev->state_count is now always equal to drv->state_count and
drv->state_count no longer can change during driver's lifetime so
the default dev->state_count initialization in cpuidle_enable_device()
(called from cpuidle_register_device()) can be used instead.

Signed-off-by: Bartlomiej Zolnierkiewicz <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Len Brown <lenb@kernel.org>
---
 drivers/acpi/processor_idle.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index c080c99..da8ce91 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -951,8 +951,6 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr,
 			break;
 	}
 
-	dev->state_count = count;
-
 	if (!count)
 		return -EINVAL;
 
-- 
1.8.2.3
```
