X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/4fa1656a60ac65eae9c782891d2921b039191220..989218c6c2ba15f150dd815acb978b6ca092c85e:/lincan/include/can_sysdep.h diff --git a/lincan/include/can_sysdep.h b/lincan/include/can_sysdep.h index 7248249..165d4a1 100644 --- a/lincan/include/can_sysdep.h +++ b/lincan/include/can_sysdep.h @@ -133,13 +133,13 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,7)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -#define MINOR_NR \ - (MINOR(file->f_dentry->d_inode->i_rdev)) +#define INODE2MINOR_NR(inode) \ + (MINOR(inode->i_rdev)) #else /* Linux kernel < 2.5.7 or >= 2.6.0 */ -#define MINOR_NR \ - (minor(file->f_dentry->d_inode->i_rdev)) +#define INODE2MINOR_NR(inode) \ + (minor(inode->i_rdev)) #endif /* Linux kernel < 2.5.7 or >= 2.6.0 */ @@ -219,6 +219,18 @@ #endif #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) + #define can_pci_dev_get(_M_pdev) (_M_pdev) + #define can_pci_dev_put(_M_pdev) do {} while(0) + #define can_pci_get_device pci_find_device + #define can_pci_get_subsys pci_find_subsys +#else /* > 2.6.0 */ + #define can_pci_dev_get pci_dev_get + #define can_pci_dev_put pci_dev_put + #define can_pci_get_device pci_get_device + #define can_pci_get_subsys pci_get_subsys +#endif + #ifndef CAN_WITH_RTL /* Standard LINUX kernel */