diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
commit | 6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch) | |
tree | 0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /drivers/isdn/avmb1 | |
parent | ecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff) |
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine
status unknown.
Diffstat (limited to 'drivers/isdn/avmb1')
-rw-r--r-- | drivers/isdn/avmb1/b1pci.c | 11 | ||||
-rw-r--r-- | drivers/isdn/avmb1/c4.c | 7 | ||||
-rw-r--r-- | drivers/isdn/avmb1/capi.c | 25 | ||||
-rw-r--r-- | drivers/isdn/avmb1/capifs.c | 6 | ||||
-rw-r--r-- | drivers/isdn/avmb1/kcapi.c | 10 | ||||
-rw-r--r-- | drivers/isdn/avmb1/t1pci.c | 5 |
6 files changed, 33 insertions, 31 deletions
diff --git a/drivers/isdn/avmb1/b1pci.c b/drivers/isdn/avmb1/b1pci.c index c82de8717..e98066806 100644 --- a/drivers/isdn/avmb1/b1pci.c +++ b/drivers/isdn/avmb1/b1pci.c @@ -466,12 +466,15 @@ static int add_card(struct pci_dev *dev) struct capicardparams param; int retval; - if (dev->resource[ 2].start & PCI_BASE_ADDRESS_IO_MASK) { /* B1 PCI V4 */ + if (pci_enable_device(dev)) + return 0; /* return failure */ + + if (pci_resource_flags(dev, 2) & IORESOURCE_IO) { /* B1 PCI V4 */ #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 driver = &b1pciv4_driver; #endif - param.membase = dev->resource[ 0].start & PCI_BASE_ADDRESS_MEM_MASK; - param.port = dev->resource[ 2].start & PCI_BASE_ADDRESS_IO_MASK; + param.membase = pci_resource_start (dev, 0); + param.port = pci_resource_start (dev, 2); param.irq = dev->irq; printk(KERN_INFO "%s: PCI BIOS reports AVM-B1 V4 at i/o %#x, irq %d, mem %#x\n", @@ -488,7 +491,7 @@ static int add_card(struct pci_dev *dev) } } else { param.membase = 0; - param.port = dev->resource[ 1].start & PCI_BASE_ADDRESS_IO_MASK; + param.port = pci_resource_start (dev, 1); param.irq = dev->irq; printk(KERN_INFO "%s: PCI BIOS reports AVM-B1 at i/o %#x, irq %d\n", diff --git a/drivers/isdn/avmb1/c4.c b/drivers/isdn/avmb1/c4.c index e3fcabf9b..104c0f5cc 100644 --- a/drivers/isdn/avmb1/c4.c +++ b/drivers/isdn/avmb1/c4.c @@ -1333,9 +1333,12 @@ int c4_init(void) PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C4, dev))) { struct capicardparams param; - param.port = dev->resource[ 1].start & PCI_BASE_ADDRESS_IO_MASK; + if (pci_enable_device(dev)) + continue; + + param.port = pci_resource_start (dev, 1); param.irq = dev->irq; - param.membase = dev->resource[ 0].start & PCI_BASE_ADDRESS_MEM_MASK; + param.membase = pci_resource_start (dev, 0); printk(KERN_INFO "%s: PCI BIOS reports AVM-C4 at i/o %#x, irq %d, mem %#x\n", diff --git a/drivers/isdn/avmb1/capi.c b/drivers/isdn/avmb1/capi.c index 06c0686af..b20ed8831 100644 --- a/drivers/isdn/avmb1/capi.c +++ b/drivers/isdn/avmb1/capi.c @@ -1197,7 +1197,6 @@ static int capi_open(struct inode *inode, struct file *file) if ((file->private_data = capidev_alloc(file)) == 0) return -ENOMEM; - MOD_INC_USE_COUNT; #ifdef _DEBUG_REFCOUNT printk(KERN_DEBUG "capi_open %d\n", GET_USE_COUNT(THIS_MODULE)); #endif @@ -1211,7 +1210,6 @@ static int capi_release(struct inode *inode, struct file *file) capincci_free(cdev, 0xffffffff); capidev_free(cdev); - MOD_DEC_USE_COUNT; #ifdef _DEBUG_REFCOUNT printk(KERN_DEBUG "capi_release %d\n", GET_USE_COUNT(THIS_MODULE)); #endif @@ -1220,6 +1218,7 @@ static int capi_release(struct inode *inode, struct file *file) static struct file_operations capi_fops = { + owner: THIS_MODULE, llseek: capi_llseek, read: capi_read, write: capi_write, @@ -1407,18 +1406,14 @@ capinc_raw_release(struct inode *inode, struct file *file) struct file_operations capinc_raw_fops = { - capinc_raw_llseek, - capinc_raw_read, - capinc_raw_write, - NULL, /* capi_readdir */ - capinc_raw_poll, - capinc_raw_ioctl, - NULL, /* capi_mmap */ - capinc_raw_open, - NULL, /* capi_flush */ - capinc_raw_release, - NULL, /* capi_fsync */ - NULL, /* capi_fasync */ + owner: THIS_MODULE, + llseek: capinc_raw_llseek, + read: capinc_raw_read, + write: capinc_raw_write, + poll: capinc_raw_poll, + ioctl: capinc_raw_ioctl, + open: capinc_raw_open, + release: capinc_raw_release, }; /* -------- tty_operations for capincci ----------------------------- */ @@ -1879,7 +1874,7 @@ endloop: *eof = 1; if (off >= len+begin) return 0; - *start = page + (begin-off); + *start = page + (off-begin); return ((count < begin+len-off) ? count : begin+len-off); } diff --git a/drivers/isdn/avmb1/capifs.c b/drivers/isdn/avmb1/capifs.c index fcefa3d68..ec4f9c559 100644 --- a/drivers/isdn/avmb1/capifs.c +++ b/drivers/isdn/avmb1/capifs.c @@ -209,7 +209,7 @@ static struct dentry *capifs_root_lookup(struct inode * dir, struct dentry * den dentry->d_inode = np->inode; if ( dentry->d_inode ) - dentry->d_inode->i_count++; + atomic_inc(&dentry->d_inode->i_count); d_add(dentry, dentry->d_inode); @@ -228,9 +228,9 @@ static void capifs_put_super(struct super_block *sb) for ( i = 0 ; i < sbi->max_ncci ; i++ ) { if ( (inode = sbi->nccis[i].inode) ) { - if ( inode->i_count != 1 ) + if ( atomic_read(&inode->i_count) != 1 ) printk("capifs_put_super: badness: entry %d count %d\n", - i, inode->i_count); + i, atomic_read(&inode->i_count)); inode->i_nlink--; iput(inode); } diff --git a/drivers/isdn/avmb1/kcapi.c b/drivers/isdn/avmb1/kcapi.c index 6da2d24c1..848f4af97 100644 --- a/drivers/isdn/avmb1/kcapi.c +++ b/drivers/isdn/avmb1/kcapi.c @@ -354,7 +354,7 @@ endloop: *eof = 1; if (off >= len+begin) return 0; - *start = page + (begin-off); + *start = page + (off-begin); return ((count < begin+len-off) ? count : begin+len-off); } @@ -385,7 +385,7 @@ endloop: *eof = 1; if (off >= len+begin) return 0; - *start = page + (begin-off); + *start = page + (off-begin); return ((count < begin+len-off) ? count : begin+len-off); } @@ -422,7 +422,7 @@ endloop: *eof = 1; if (off >= len+begin) return 0; - *start = page + (begin-off); + *start = page + (off-begin); return ((count < begin+len-off) ? count : begin+len-off); } @@ -459,7 +459,7 @@ endloop: *eof = 1; if (off >= len+begin) return 0; - *start = page + (begin-off); + *start = page + (off-begin); return ((count < begin+len-off) ? count : begin+len-off); } @@ -496,7 +496,7 @@ endloop: *eof = 1; if (off >= len+begin) return 0; - *start = page + (begin-off); + *start = page + (off-begin); return ((count < begin+len-off) ? count : begin+len-off); } diff --git a/drivers/isdn/avmb1/t1pci.c b/drivers/isdn/avmb1/t1pci.c index 70355abca..37ed305c2 100644 --- a/drivers/isdn/avmb1/t1pci.c +++ b/drivers/isdn/avmb1/t1pci.c @@ -305,12 +305,13 @@ int t1pci_init(void) while ((dev = pci_find_device(PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_T1, dev))) { struct capicardparams param; + if (pci_enable_device(dev)) + continue; + param.port = pci_resource_start (dev, 1); param.irq = dev->irq; param.membase = pci_resource_start (dev, 0); - pci_enable_device (dev); /* XXX check return */ - printk(KERN_INFO "%s: PCI BIOS reports AVM-T1-PCI at i/o %#x, irq %d, mem %#x\n", driver->name, param.port, param.irq, param.membase); |