ACPI: power: Use u8 as the power resource state data type
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 24 May 2021 15:24:16 +0000 (17:24 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 31 May 2021 11:59:01 +0000 (13:59 +0200)
commit587024b8210d4eeeab457323141c92e134cd3dbf
treef4ca32205758c9efa8ad7663248d59600b2a88f7
parente4ada4c8de70b3a25fb954bc0d4705b4273778a5
ACPI: power: Use u8 as the power resource state data type

Use u8 as the data type for representing the state of an ACPI
power resource.

It is s not necessary to use int for that and because subsequent
changes are going to use ACPI_POWER_RESOURCE_STATE_UNKNOWN, it is
better to adjust the data type so that the "unknown" state is
represented by the "all ones" value.

While at it, clean up acpi_power_get_state() somewhat.

No intentional functional impact.

Tested-by: Dave Olsthoorn <dave@bewaar.me>
Tested-by: Shujun Wang <wsj20369@163.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/power.c