Power management fix for 5.3-rc3
Fix recent regression affecting ACPI device power management. -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl1EBK0SHHJqd0Byand5 c29ja2kubmV0AAoJEILEb/54YlRxNAQP/i1Bw8w+146ycZ/8A1vwXnXLmz+Dmdk/ G6ctEbcLqueaJYT2G8yPAC/735jOxkQGr93bHxkok9h8TOlvz79kk9gFbFzBQ7dI AJhiBxVxphoH1SPedqERh/se87oesXiCknR97zYgPVjf8bXWgc4mrkrtYAEZ/et4 6jxNflzNcUMMY7WusTIJLJHeGCApBXsmVu8jA2jhpiYpOPRdp8OPvZo9uHfScIOO jQ2Cjpl99hlGduQ0tE6l+RUzIVHsr2leZGLul2wxsZrXGJzF3CSIkyLuqvVGSg59 xWRBZtoJ4oJ5uooifn71A8lqhJGG1xZnFSSuzFQkLvug0G1Jj0YvIlX50CnaRdJd xODACM6KZlaRM9qYV/D09s0kpBsNK/dwWDmRdPNkHlM45ar+1Sy+4E/b0XmoueKj 9qaNxXJaN6v8tPhimbOX6LohFIXY0QnjyYC7P2LGhk8ZGTk88SOd/eORR2XAEPvg LEC9tpnFqj98ZqssaBzfm6hvbRF1lVq7k41lv9/zdKOz8BnCRy0BF2s49yqwCq+M IbbNaFAJOuFuV0+/jpjQtAy5NK0OW1URoEGk8h6ww7vpozrSwql+djSQGucy4Aii 9Edy38el7zAu83Ald0QGJkrrJLeQl4G6G/Gut4hg2bCbD1ega0q3bnuYVhqGINtY 6mKoSDMRPBca =nORL -----END PGP SIGNATURE----- Merge tag 'pm-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix recent regression affecting ACPI device power management" * tag 'pm-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: Fix regression in acpi_device_set_power()
This commit is contained in:
commit
755f1fed27
|
@ -232,13 +232,15 @@ int acpi_device_set_power(struct acpi_device *device, int state)
|
|||
if (device->power.flags.power_resources)
|
||||
result = acpi_power_transition(device, target_state);
|
||||
} else {
|
||||
int cur_state = device->power.state;
|
||||
|
||||
if (device->power.flags.power_resources) {
|
||||
result = acpi_power_transition(device, ACPI_STATE_D0);
|
||||
if (result)
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (device->power.state == ACPI_STATE_D0) {
|
||||
if (cur_state == ACPI_STATE_D0) {
|
||||
int psc;
|
||||
|
||||
/* Nothing to do here if _PSC is not present. */
|
||||
|
|
Loading…
Reference in New Issue