]> git.hungrycats.org Git - linux/commitdiff
[PATCH] I2C: remove check_region usage and warning from i2c-sensor
authorGreg Kroah-Hartman <greg@kroah.com>
Mon, 22 Sep 2003 08:11:24 +0000 (01:11 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 22 Sep 2003 08:11:24 +0000 (01:11 -0700)
drivers/i2c/i2c-sensor.c

index 6cf3139e3991672c06c979c9e6d102cc2382bb02..37ef97d470f1657ce0f5692fa304179fdc1870a9 100644 (file)
@@ -50,8 +50,9 @@ int i2c_detect(struct i2c_adapter *adapter,
                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;