From: Jean Delvare Date: Wed, 29 Aug 2007 08:39:57 +0000 (+0200) Subject: hwmon: End of I/O region off-by-one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15bde2f1a8e819213f54314505a5a0509673109b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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. Signed-off-by: Jean Delvare Signed-off-by: Mark M. Hoffman --- diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c index 565c4e679b8d..6eea3476b90c 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, };