===================================================================
@@ -880,8 +880,10 @@ static int acpi_bus_get_power_flags(stru
/* TBD: System wake support and resource requirements. */
- device->power.state = ACPI_STATE_UNKNOWN;
- acpi_bus_get_power(device->handle, &(device->power.state));
+ acpi_bus_get_power(device->handle, &device->power.state);
+ /* Update power resources reference counting. */
+ if (device->power.flags.power_resources)
+ acpi_power_transition(device, device->power.state);
return 0;
}