[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1302566002-23962-1-git-send-email-natg@google.com>
Date: Mon, 11 Apr 2011 16:53:22 -0700
From: Nat Gurumoorthy <natg@...gle.com>
To: Jean Delvare <khali@...ux-fr.org>,
Guenter Roeck <guenter.roeck@...csson.com>,
Wim Van Sebroeck <wim@...ana.be>
Cc: Mike Waychison <mikew@...gle.com>, lm-sensors@...sensors.org,
linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
Nat Gurumoorthy <natg@...gle.com>
Subject: [PATCH v4 2/2] Use "request_muxed_region" in it87 hwmon drivers
02 - Chages to hwmon it87 driver to use "request_muxed_region"
Serialize access to the hardware by using "request_muxed_region" macro defined
by Alan Cox. Call to this macro will hold off the requestor if the resource is
currently busy.
Signed-off-by: Nat Gurumoorthy <natg@...gle.com>
---
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 316b648..1dc04d4 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -111,6 +111,9 @@ superio_select(int ldn)
static inline void
superio_enter(void)
{
+ while (!request_muxed_region(REG, 2, DRVNAME))
+ continue;
+
outb(0x87, REG);
outb(0x01, REG);
outb(0x55, REG);
@@ -122,6 +125,7 @@ superio_exit(void)
{
outb(0x02, REG);
outb(0x02, VAL);
+ release_region(REG, 2);
}
/* Logical device 4 registers */
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists