Skip to content

Commit 3e3e377

Browse files
committed
Merge branches 'acpi-property' and 'acpi-resource'
Merge a new ACPI IRQ override quirk for Eluktronics MECH-17 (Gannon Kolding) and an acpi_data_prop_read() fix making it reflect the OF counterpart behavior in error cases (Andy Shevchenko). * acpi-property: ACPI: property: Fix return value for nval == 0 in acpi_data_prop_read() * acpi-resource: ACPI: resource: IRQ override for Eluktronics MECH-17
3 parents 7f5704b + ab93048 + 607ab6f commit 3e3e377

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

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)