mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 03:44:27 -04:00
Merge tag 'acpi-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki:
"These fix recent regression in the APEI code and initialization issue
in the ACPI fan driver.
Specifics:
- Make the APEI code avoid attempts to obtain logical addresses for
registers located in the I/O address space to fix initialization
issues (Aili Yao)
- Fix sysfs attribute initialization in the ACPI fan driver (Guenter
Roeck)"
* tag 'acpi-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI, APEI, Fix error return value in apei_map_generic_address()
ACPI: fan: Initialize performance state sysfs attribute
This commit is contained in:
@@ -633,6 +633,10 @@ int apei_map_generic_address(struct acpi_generic_address *reg)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
/* IO space doesn't need mapping */
|
||||
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
|
||||
return 0;
|
||||
|
||||
if (!acpi_os_map_generic_address(reg))
|
||||
return -ENXIO;
|
||||
|
||||
|
||||
@@ -352,6 +352,7 @@ static int acpi_fan_get_fps(struct acpi_device *device)
|
||||
struct acpi_fan_fps *fps = &fan->fps[i];
|
||||
|
||||
snprintf(fps->name, ACPI_FPS_NAME_LEN, "state%d", i);
|
||||
sysfs_attr_init(&fps->dev_attr.attr);
|
||||
fps->dev_attr.show = show_state;
|
||||
fps->dev_attr.store = NULL;
|
||||
fps->dev_attr.attr.name = fps->name;
|
||||
|
||||
Reference in New Issue
Block a user