Skip to content

Commit 0aa0282

Browse files
committed
Merge tag 'acpi-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki: "These fix three assorted issues, including one recent regression: - Add an ACPI IRQ override quirk for Eluktronics MECH-17 to make the internal keyboard work (Gannon Kolding) - Make acpi_data_prop_read() reflect the OF counterpart behavior in error cases (Andy Shevchenko) - Remove recently added strict ACPI PRM handler address checks that prevented PRM from working on some platforms in the field (Aubrey Li)" * tag 'acpi-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PRM: Remove unnecessary strict handler address checks ACPI: resource: IRQ override for Eluktronics MECH-17 ACPI: property: Fix return value for nval == 0 in acpi_data_prop_read()
2 parents 78b2a23 + 3e3e377 commit 0aa0282

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

drivers/acpi/prmt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,7 @@ static acpi_status acpi_platformrt_space_handler(u32 function,
287287
if (!handler || !module)
288288
goto invalid_guid;
289289

290-
if (!handler->handler_addr ||
291-
!handler->static_data_buffer_addr ||
292-
!handler->acpi_param_buffer_addr) {
290+
if (!handler->handler_addr) {
293291
buffer->prm_status = PRM_HANDLER_ERROR;
294292
return AE_OK;
295293
}

drivers/acpi/property.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,8 +1187,6 @@ static int acpi_data_prop_read(const struct acpi_device_data *data,
11871187
}
11881188
break;
11891189
}
1190-
if (nval == 0)
1191-
return -EINVAL;
11921190

11931191
if (obj->type == ACPI_TYPE_BUFFER) {
11941192
if (proptype != DEV_PROP_U8)
@@ -1212,9 +1210,11 @@ static int acpi_data_prop_read(const struct acpi_device_data *data,
12121210
ret = acpi_copy_property_array_uint(items, (u64 *)val, nval);
12131211
break;
12141212
case DEV_PROP_STRING:
1215-
ret = acpi_copy_property_array_string(
1216-
items, (char **)val,
1217-
min_t(u32, nval, obj->package.count));
1213+
nval = min_t(u32, nval, obj->package.count);
1214+
if (nval == 0)
1215+
return -ENODATA;
1216+
1217+
ret = acpi_copy_property_array_string(items, (char **)val, nval);
12181218
break;
12191219
default:
12201220
ret = -EINVAL;

drivers/acpi/resource.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,12 @@ static const struct dmi_system_id irq1_edge_low_force_override[] = {
563563
DMI_MATCH(DMI_BOARD_NAME, "RP-15"),
564564
},
565565
},
566+
{
567+
.matches = {
568+
DMI_MATCH(DMI_SYS_VENDOR, "Eluktronics Inc."),
569+
DMI_MATCH(DMI_BOARD_NAME, "MECH-17"),
570+
},
571+
},
566572
{
567573
/* TongFang GM6XGxX/TUXEDO Stellaris 16 Gen5 AMD */
568574
.matches = {

0 commit comments

Comments
 (0)