Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14398
b: refs/heads/master
c: 2203d6e
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 18, 2005
1 parent 234fefc commit 7303fb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2656c076e31a3ce3ab2a987a578e7122dc2af51d
refs/heads/master: 2203d6ed448ff3b777ee6bb614a53e686b483e5b
14 changes: 4 additions & 10 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,6 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr)

static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
{
int i;

ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_fadt");

if (!pr)
Expand All @@ -524,8 +522,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
if (!pr->pblk)
return_VALUE(-ENODEV);

for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++)
memset(pr->power.states, 0, sizeof(struct acpi_processor_cx));
memset(pr->power.states, 0, sizeof(pr->power.states));

/* if info is obtained from pblk/fadt, type equals state */
pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1;
Expand Down Expand Up @@ -555,13 +552,9 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)

static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr)
{
int i;

ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1");

for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++)
memset(&(pr->power.states[i]), 0,
sizeof(struct acpi_processor_cx));
memset(pr->power.states, 0, sizeof(pr->power.states));

/* if info is obtained from pblk/fadt, type equals state */
pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1;
Expand Down Expand Up @@ -873,7 +866,8 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
if (pr->power.states[i].valid) {
pr->power.count = i;
pr->flags.power = 1;
if (pr->power.states[i].type >= ACPI_STATE_C2)
pr->flags.power = 1;
}
}

Expand Down

0 comments on commit 7303fb3

Please sign in to comment.