All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF is
@ 2010-01-17 22:05 Luca Tettamanti
  2010-01-17 22:31 ` [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF Juan RP
  2010-01-18  8:45 ` Jean Delvare
  0 siblings, 2 replies; 3+ messages in thread
From: Luca Tettamanti @ 2010-01-17 22:05 UTC (permalink / raw)
  To: lm-sensors

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>
---
Juan, can sign off the patch?

 drivers/hwmon/asus_atk0110.c |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
index fe4fa29..0729022 100644
--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -921,17 +921,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);
 
 	/* Check for hwmon methods: first check "old" style methods; note that
 	 * both may be present: in this case we stick to the old interface;

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF
  2010-01-17 22:05 [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF is Luca Tettamanti
@ 2010-01-17 22:31 ` Juan RP
  2010-01-18  8:45 ` Jean Delvare
  1 sibling, 0 replies; 3+ messages in thread
From: Juan RP @ 2010-01-17 22:31 UTC (permalink / raw)
  To: lm-sensors

On Sun, 17 Jan 2010 23:05:34 +0100
Luca Tettamanti <kronos.it@gmail.com> wrote:

> 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>

Signed-off-by: Juan RP <xtraeme@gmail.com>

Cheers.

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF
  2010-01-17 22:05 [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF is Luca Tettamanti
  2010-01-17 22:31 ` [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF Juan RP
@ 2010-01-18  8:45 ` Jean Delvare
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2010-01-18  8:45 UTC (permalink / raw)
  To: lm-sensors

On Sun, 17 Jan 2010 23:31:31 +0100, Juan RP wrote:
> On Sun, 17 Jan 2010 23:05:34 +0100
> Luca Tettamanti <kronos.it@gmail.com> wrote:
> 
> > 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>
> 
> Signed-off-by: Juan RP <xtraeme@gmail.com>

Applied, thanks!

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-18  8:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-17 22:05 [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF is Luca Tettamanti
2010-01-17 22:31 ` [lm-sensors] [PATCH] hwmon: (asus_atk0110) Do not fail if MBIF Juan RP
2010-01-18  8:45 ` Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.