hwmon: End of I/O region off-by-one
Subsystems (2)
PATCH 1/1 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 <[email protected]>
---
Mark, can you please apply this fix quickly? It should probably go to 2.6.22-stable as well, as in theory it could prevent drivers from loading.
Personal note: having different conventions for declaring resources and requesting them really sucks :(
drivers/hwmon/lm78.c | 2 +- drivers/hwmon/w83781d.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/lm78.c +1 -1
@@ -882,7 +882,7 @@ static int __init lm78_isa_device_add(un {struct resource res = { .start = address, - .end = address +LM78_EXTENT , + .end = address +LM78_EXTENT -1 , .name ="lm78" , .flags =IORESOURCE_IO , };
drivers/hwmon/w83781d.c +1 -1
@@ -1748,7 +1748,7 @@ w83781d_isa_device_add(unsigned short ad {struct resource res = { .start = address, - .end = address +W83781D_EXTENT , + .end = address +W83781D_EXTENT -1 , .name ="w83781d" , .flags =IORESOURCE_IO , };
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors