]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ACPI: PMIC: Replace open coded be16_to_cpu()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 6 Jun 2024 20:54:16 +0000 (23:54 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 13 Jun 2024 19:23:05 +0000 (21:23 +0200)
commitf42cfd5ceced62799a7dd82899b03d7b9575fc22
tree646c366f6d9cc2de544d0b01e1ff553f134e5faa
parent1dd804af345a126594a8b8e80510590b5775073b
ACPI: PMIC: Replace open coded be16_to_cpu()

It's easier to understand the nature of a data type when
it's written explicitly. With that, replace open coded
endianess conversion.

As a side effect it fixes the returned value of
intel_crc_pmic_update_aux() since ACPI PMIC core code
expects negative or zero and never uses positive one.

While at it, use macros from bits.h to reduce a room for mistake.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/pmic/intel_pmic_chtdc_ti.c