move compatibility stuff to isdn_compat.h
This commit is contained in:
parent
464a93efad
commit
b5accabbd3
|
@ -6,6 +6,12 @@
|
|||
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.24 2000/12/05 19:15:44 kai
|
||||
* o call pci_enable_device() first of all, because this may change/assign
|
||||
* resources we use afterwards.
|
||||
* o #ifndef COMPAT_HAS_2_2_PCI is not necessary, because for 2.2
|
||||
* pci_enable_device is defined to (0)
|
||||
*
|
||||
* Revision 1.23 2000/11/28 14:26:46 calle
|
||||
* But the #ifndef PCI_DEVICE_ID_AVM* back, and let it compile again.
|
||||
* Please always check if 2.2.14-2.2.18 compile after a "std2kern -u"
|
||||
|
@ -103,9 +109,6 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/capi.h>
|
||||
#include <linux/init.h>
|
||||
#ifdef COMPAT_HAS_2_2_PCI
|
||||
#include <linux/isdn.h>
|
||||
#endif
|
||||
#include <asm/io.h>
|
||||
#include <asm/uaccess.h>
|
||||
#ifndef COMPAT_NO_SOFTNET
|
||||
|
@ -1356,29 +1359,6 @@ static struct capi_driver c4_driver = {
|
|||
add_card: 0, /* no add_card function */
|
||||
};
|
||||
|
||||
#ifndef COMPAT_HAS_pci_find_subsys
|
||||
#ifndef PCI_ANY_ID
|
||||
#define PCI_ANY_ID (~0)
|
||||
#endif
|
||||
|
||||
static struct pci_dev *
|
||||
pci_find_subsys(unsigned int vendor, unsigned int device,
|
||||
unsigned int ss_vendor, unsigned int ss_device,
|
||||
struct pci_dev *from)
|
||||
{
|
||||
unsigned short subsystem_vendor, subsystem_device;
|
||||
|
||||
while ((from = pci_find_device(vendor, device, from))) {
|
||||
pci_read_config_word(from, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor);
|
||||
pci_read_config_word(from, PCI_SUBSYSTEM_ID, &subsystem_device);
|
||||
if ((ss_vendor == PCI_ANY_ID || subsystem_vendor == ss_vendor) &&
|
||||
(ss_device == PCI_ANY_ID || subsystem_device == ss_device))
|
||||
return from;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ncards = 0;
|
||||
|
||||
static int __init c4_init(void)
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
#define COMPAT_has_fileops_in_inode
|
||||
#define COMPAT_HAS_init_special_inode
|
||||
#define COMPAT_d_alloc_root_one_parameter
|
||||
#define COMPAT_HAS_pci_find_subsys
|
||||
#define HAVE_DEVFS_FS
|
||||
|
||||
#endif
|
||||
|
@ -96,7 +95,25 @@ static inline int pci_enable_device(struct pci_dev *dev)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* __powerpc__ */
|
||||
|
||||
#define PCI_ANY_ID (~0)
|
||||
|
||||
static struct pci_dev * pci_find_subsys(unsigned int vendor, unsigned int device,
|
||||
unsigned int ss_vendor, unsigned int ss_device,
|
||||
struct pci_dev *from)
|
||||
{
|
||||
unsigned short subsystem_vendor, subsystem_device;
|
||||
|
||||
while ((from = pci_find_device(vendor, device, from))) {
|
||||
pci_read_config_word(from, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor);
|
||||
pci_read_config_word(from, PCI_SUBSYSTEM_ID, &subsystem_device);
|
||||
if ((ss_vendor == PCI_ANY_ID || subsystem_vendor == ss_vendor) &&
|
||||
(ss_device == PCI_ANY_ID || subsystem_device == ss_device))
|
||||
return from;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef COMPAT_NO_SOFTNET
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#undef COMPAT_HAS_ISA_IOREMAP
|
||||
#define net_device device
|
||||
#define set_current_state(sta) current->state = sta
|
||||
#undef COMPAT_HAS_pci_find_subsys
|
||||
#undef COMPAT_HAS_kmem_cache
|
||||
#undef COMPAT_d_alloc_root_one_parameter
|
||||
#undef COMPAT_HAS_init_special_inode
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#undef COMPAT_HAS_ISA_IOREMAP
|
||||
#define net_device device
|
||||
#define set_current_state(sta) current->state = sta
|
||||
#undef COMPAT_HAS_pci_find_subsys
|
||||
#undef COMPAT_HAS_kmem_cache
|
||||
#undef COMPAT_d_alloc_root_one_parameter
|
||||
#undef COMPAT_HAS_init_special_inode
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#undef COMPAT_HAS_ISA_IOREMAP
|
||||
#define net_device device
|
||||
#define set_current_state(sta) current->state = sta
|
||||
#undef COMPAT_HAS_pci_find_subsys
|
||||
#undef COMPAT_HAS_kmem_cache
|
||||
#undef COMPAT_d_alloc_root_one_parameter
|
||||
#undef COMPAT_HAS_init_special_inode
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#undef COMPAT_HAS_ISA_IOREMAP
|
||||
#define net_device device
|
||||
#define set_current_state(sta) current->state = sta
|
||||
#undef COMPAT_HAS_pci_find_subsys
|
||||
#undef COMPAT_HAS_kmem_cache
|
||||
#undef COMPAT_d_alloc_root_one_parameter
|
||||
#undef COMPAT_HAS_init_special_inode
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#undef COMPAT_HAS_ISA_IOREMAP
|
||||
#define net_device device
|
||||
#define set_current_state(sta) current->state = sta
|
||||
#undef COMPAT_HAS_pci_find_subsys
|
||||
#undef COMPAT_HAS_kmem_cache
|
||||
#undef COMPAT_d_alloc_root_one_parameter
|
||||
#undef COMPAT_HAS_init_special_inode
|
||||
|
|
Loading…
Reference in New Issue