summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose A. Deniz <odicha@hotmail.com>2009-09-08 00:49:24 +0000
committerTzafrir Cohen <tzafrir@cohens.org.il>2010-01-05 20:46:30 +0200
commit02d6741ebd63896a622d8b048638da65a95754ff (patch)
tree796a2ab5a493abaab9b59bde619543205182c25c
parente370c33c882d52375334a654465e922f9e3860fe (diff)
Added support for kernel 2.6.30
git-svn-id: http://zaphfc.googlecode.com/svn/branches/2.2@4 6b77f504-82de-11de-a8c8-95b3e4aa02d0
-rw-r--r--drivers/dahdi/zaphfc/base.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/dahdi/zaphfc/base.c b/drivers/dahdi/zaphfc/base.c
index 64e7d22..cc23e54 100644
--- a/drivers/dahdi/zaphfc/base.c
+++ b/drivers/dahdi/zaphfc/base.c
@@ -70,6 +70,12 @@ int debug_level;
#define TRUE (!FALSE)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+#define SET_PROC_DIRENTRY_OWNER(p) do { (p)->owner = THIS_MODULE; }
+#else
+#define SET_PROC_DIRENTRY_OWNER(p) do { } while(0);
+#endif
+
static struct pci_device_id hfc_pci_ids[] = {
{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_2BD0,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
@@ -1556,7 +1562,7 @@ static int __devinit hfc_probe(struct pci_dev *pci_dev,
sizeof(card->proc_dir_name),
"%d", card->cardnum);
card->proc_dir = proc_mkdir(card->proc_dir_name, hfc_proc_zaphfc_dir);
- card->proc_dir->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(card->proc_dir);
hfc_resetCard(card);