tangled
alpha
login
or
join now
tjh.dev
/
kernel
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Pull bugzilla-7570 into release branch
Len Brown
19 years ago
cb2ebc59
3dfb7379
+7
-6
1 changed file
expand all
collapse all
unified
split
drivers
acpi
power.c
+7
-6
drivers/acpi/power.c
···
436
436
cl = &device->power.states[device->power.state].resources;
437
437
tl = &device->power.states[state].resources;
438
438
439
439
-
device->power.state = ACPI_STATE_UNKNOWN;
440
440
-
441
439
if (!cl->count && !tl->count) {
442
440
result = -ENODEV;
443
441
goto end;
···
466
468
goto end;
467
469
}
468
470
469
469
-
/* We shouldn't change the state till all above operations succeed */
470
470
-
device->power.state = state;
471
471
-
end:
472
472
-
if (result)
471
471
+
end:
472
472
+
if (result) {
473
473
+
device->power.state = ACPI_STATE_UNKNOWN;
473
474
printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n",
474
475
device->pnp.bus_id, state);
476
476
+
} else {
477
477
+
/* We shouldn't change the state till all above operations succeed */
478
478
+
device->power.state = state;
479
479
+
}
475
480
476
481
return result;
477
482
}