Skip to content

Commit

Permalink
hwmon: (asus_atk0110) Do not fail if MBIF is missing
Browse files Browse the repository at this point in the history
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: Luca Tettamanti <kronos.it@gmail.com>
Acked-by: Juan RP <xtraeme@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
tettamanti authored and Jean Delvare committed Jan 25, 2010
1 parent 316e266 commit 5542482
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions drivers/hwmon/asus_atk0110.c
Original file line number Diff line number Diff line change
Expand Up @@ -1329,17 +1329,16 @@ static int atk_add(struct acpi_device *device)
&buf, ACPI_TYPE_PACKAGE);
if (ret != AE_OK) {
dev_dbg(&device->dev, "atk: method MBIF not found\n");
err = -ENODEV;
goto out;
}

obj = buf.pointer;
if (obj->package.count >= 2 &&
obj->package.elements[1].type == ACPI_TYPE_STRING) {
dev_dbg(&device->dev, "board ID = %s\n",
obj->package.elements[1].string.pointer);
} else {
obj = buf.pointer;
if (obj->package.count >= 2) {
union acpi_object *id = &obj->package.elements[1];
if (id->type == ACPI_TYPE_STRING)
dev_dbg(&device->dev, "board ID = %s\n",
id->string.pointer);
}
ACPI_FREE(buf.pointer);
}
ACPI_FREE(buf.pointer);

err = atk_probe_if(data);
if (err) {
Expand Down

0 comments on commit 5542482

Please sign in to comment.