Commit 5542482b authored by Luca Tettamanti's avatar Luca Tettamanti Committed by Jean Delvare

hwmon: (asus_atk0110) Do not fail if MBIF is missing

MBIF (motherboard identification) is only used to print the name of
the board, it's not essential for the driver; do not fail if it's
missing. Based on Juan's patch.
Signed-off-by: default avatarLuca Tettamanti <kronos.it@gmail.com>
Acked-by: default avatarJuan RP <xtraeme@gmail.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 316e2664
...@@ -1329,17 +1329,16 @@ static int atk_add(struct acpi_device *device) ...@@ -1329,17 +1329,16 @@ static int atk_add(struct acpi_device *device)
&buf, ACPI_TYPE_PACKAGE); &buf, ACPI_TYPE_PACKAGE);
if (ret != AE_OK) { if (ret != AE_OK) {
dev_dbg(&device->dev, "atk: method MBIF not found\n"); dev_dbg(&device->dev, "atk: method MBIF not found\n");
err = -ENODEV; } else {
goto out;
}
obj = buf.pointer; obj = buf.pointer;
if (obj->package.count >= 2 && if (obj->package.count >= 2) {
obj->package.elements[1].type == ACPI_TYPE_STRING) { union acpi_object *id = &obj->package.elements[1];
if (id->type == ACPI_TYPE_STRING)
dev_dbg(&device->dev, "board ID = %s\n", dev_dbg(&device->dev, "board ID = %s\n",
obj->package.elements[1].string.pointer); id->string.pointer);
} }
ACPI_FREE(buf.pointer); ACPI_FREE(buf.pointer);
}
err = atk_probe_if(data); err = atk_probe_if(data);
if (err) { if (err) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment