lkml.org 
[lkml]   [2003]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] i2c driver fixes for 2.6.0-test5
From
Date
ChangeSet 1.1315.1.25, 2003/09/22 15:11:24-07:00, greg@kroah.com

[PATCH] I2C: remove check_region usage and warning from i2c-sensor


drivers/i2c/i2c-sensor.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)


diff -Nru a/drivers/i2c/i2c-sensor.c b/drivers/i2c/i2c-sensor.c
--- a/drivers/i2c/i2c-sensor.c Mon Sep 22 16:11:52 2003
+++ b/drivers/i2c/i2c-sensor.c Mon Sep 22 16:11:52 2003
@@ -50,8 +50,9 @@
return -1;

for (addr = 0x00; addr <= (is_isa ? 0xffff : 0x7f); addr++) {
- /* XXX: WTF is going on here??? */
- if ((is_isa && check_region(addr, 1)) ||
+ void *region_used = request_region(addr, 1, "foo");
+ release_region(addr, 1);
+ if ((is_isa && (region_used == NULL)) ||
(!is_isa && i2c_check_addr(adapter, addr)))
continue;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.040 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site