summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-09-20 14:13:14 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2007-09-26 10:54:39 -0700
commite98ca97405f73dbe50548c31ec46f1158e3af89e (patch)
treee0847787a3a68c6592b011e75b6ada4ab6ec42c7 /drivers
parent5f9ce2fc33a51fb6ff9e6e484d4673329c935aba (diff)
downloadlinux-stable-e98ca97405f73dbe50548c31ec46f1158e3af89e.tar.gz
linux-stable-e98ca97405f73dbe50548c31ec46f1158e3af89e.tar.bz2
linux-stable-e98ca97405f73dbe50548c31ec46f1158e3af89e.zip
hwmon: End of I/O region off-by-one
Fix an off-by-one error in the I/O region declaration of two hardware monitoring drivers (lm78 and w83781d.) We were requesting one extra port at the end of the region. This is a regression in 2.6.22 and could prevent other drivers from loading properly. Already applied to Linus' tree for 2.6.23: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=15bde2f1a8e819213f54314505a5a0509673109b Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/lm78.c2
-rw-r--r--drivers/hwmon/w83781d.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c
index 9fb572f03ba5..3507113759e4 100644
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -882,7 +882,7 @@ static int __init lm78_isa_device_add(unsigned short address)
{
struct resource res = {
.start = address,
- .end = address + LM78_EXTENT,
+ .end = address + LM78_EXTENT - 1,
.name = "lm78",
.flags = IORESOURCE_IO,
};
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index c95909cc1d21..dcc941a5aaff 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -1746,7 +1746,7 @@ w83781d_isa_device_add(unsigned short address)
{
struct resource res = {
.start = address,
- .end = address + W83781D_EXTENT,
+ .end = address + W83781D_EXTENT - 1,
.name = "w83781d",
.flags = IORESOURCE_IO,
};