From 669686ff1c841b75507f290e30615ced94f7ad0c Mon Sep 17 00:00:00 2001 From: Kyosti Malkki Date: Sun, 28 Mar 1999 14:49:54 +0000 Subject: [PATCH] =?UTF-8?q?(Ky=C3=B6sti)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removed unnecessary MOD_INC/DEC_USE_COUNT in host adapter drivers (i2c-via bit-lp bit-velle) You can now rmmod adapters even when they have registered clients. Without this, you would have to detach the clients first. Only way of doing this is to rmmod the client drivers, but the same drivers might be used to access clients behind other hosts. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@347 7894878c-1315-0410-8ee3-d5d059ff63e0 --- TODO | 1 - i2c/MODIFICATIONS | 3 +++ i2c/bit-lp.c | 2 -- i2c/bit-velle.c | 2 -- kernel/busses/i2c-via.c | 2 -- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index b1125dd2..f86a86c5 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,6 @@ Many, many things. Most notably: * Sensors program needs to print a + before lm75 temperatures * Timer chips - block read problems? * LM78 detection: bit 5 reg 0x49 may be one?!? -* bit-lp increases module count stupidly * Segfault if too high /dev/i2c-* file accessed * Library: reload does not work (Bison/Flex problem?) * Create wait-queues for bus locking instead of pure semaphores, to make diff --git a/i2c/MODIFICATIONS b/i2c/MODIFICATIONS index b9ed164d..cec92e8b 100644 --- a/i2c/MODIFICATIONS +++ b/i2c/MODIFICATIONS @@ -15,6 +15,9 @@ Here come the changes: * Algo-bit now scans the bus before registering the adapter. +* Bit-lp and bit-velle don't increase module usage counts + when clients register. + ! Renamed #define HW_B_MB to HW_B_VIA in i2c.h ! Added '#include ' to i2c.h, to make it compile with 2.2 diff --git a/i2c/bit-lp.c b/i2c/bit-lp.c index ad812c16..29fc0e38 100644 --- a/i2c/bit-lp.c +++ b/i2c/bit-lp.c @@ -118,13 +118,11 @@ void bit_lp_exit(void) int bit_lp_reg(struct i2c_client *client) { - MOD_INC_USE_COUNT; return 0; } int bit_lp_unreg(struct i2c_client *client) { - MOD_DEC_USE_COUNT; return 0; } diff --git a/i2c/bit-velle.c b/i2c/bit-velle.c index 6c8a2b47..b3ee24f6 100644 --- a/i2c/bit-velle.c +++ b/i2c/bit-velle.c @@ -130,13 +130,11 @@ void bit_velle_exit(void) int bit_velle_reg(struct i2c_client *client) { - MOD_INC_USE_COUNT; return 0; } int bit_velle_unreg(struct i2c_client *client) { - MOD_DEC_USE_COUNT; return 0; } diff --git a/kernel/busses/i2c-via.c b/kernel/busses/i2c-via.c index 7f30fc02..55dfac0f 100644 --- a/kernel/busses/i2c-via.c +++ b/kernel/busses/i2c-via.c @@ -87,13 +87,11 @@ static int bit_via_getsda(void *data) static int bit_via_reg(struct i2c_client *client) { - MOD_INC_USE_COUNT; return 0; } static int bit_via_unreg(struct i2c_client *client) { - MOD_DEC_USE_COUNT; return 0; }