Skip to content
Commit 2e433a94 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

ACPI: OSL: Fix and clean up acpi_os_read/write_port()



First, remove type casts that make acpi_os_read_port() only work on
little endian and are generally not needed.

Second, avoid clearing the memory pointed to by the value return
pointer in acpi_os_read_port() if it is the dummy on the stack (in
which case clearing it is not necessary).

Finally, prevent both acpi_os_read_port() and acpi_os_write_port()
from crashing the kernel when they receive an unsupported width
value and make them print a debug message and return an error instead.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e783362e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment