diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
commit | f1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch) | |
tree | 562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /drivers/i2c | |
parent | 00f11569ac8ca73cbcdef8822de1583e79aee571 (diff) |
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-dev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index e373ce2f3..47a6292d1 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -32,6 +32,7 @@ #include <linux/fs.h> #include <linux/malloc.h> #include <linux/version.h> +#include <linux/smp_lock.h> /* If you want debugging uncomment: */ /* #define DEBUG */ @@ -76,6 +77,7 @@ extern static int i2cdev_cleanup(void); static struct file_operations i2cdev_fops = { + owner: THIS_MODULE, llseek: i2cdev_lseek, read: i2cdev_read, write: i2cdev_write, @@ -374,7 +376,6 @@ int i2cdev_open (struct inode *inode, struct file *file) if (i2cdev_adaps[minor]->inc_use) i2cdev_adaps[minor]->inc_use(i2cdev_adaps[minor]); - MOD_INC_USE_COUNT; #ifdef DEBUG printk("i2c-dev.o: opened i2c-%d\n",minor); @@ -390,9 +391,10 @@ static int i2cdev_release (struct inode *inode, struct file *file) #ifdef DEBUG printk("i2c-dev.o: Closed: i2c-%d\n", minor); #endif - MOD_DEC_USE_COUNT; + lock_kernel(); if (i2cdev_adaps[minor]->dec_use) i2cdev_adaps[minor]->dec_use(i2cdev_adaps[minor]); + unlock_kernel(); return 0; } |