summaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/base.c4
-rw-r--r--driver/ioctl.c4
-rw-r--r--driver/ioctl.h4
-rw-r--r--driver/sysfs.c3
4 files changed, 15 insertions, 0 deletions
diff --git a/driver/base.c b/driver/base.c
index 7f4ccad..2b998e3 100644
--- a/driver/base.c
+++ b/driver/base.c
@@ -489,7 +489,11 @@ static void __devexit pcidriver_remove(struct pci_dev *pdev)
*/
static struct file_operations pcidriver_fops = {
.owner = THIS_MODULE,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
.ioctl = pcidriver_ioctl,
+#else
+ .unlocked_ioctl = pcidriver_ioctl,
+#endif
.mmap = pcidriver_mmap,
.open = pcidriver_open,
.release = pcidriver_release,
diff --git a/driver/ioctl.c b/driver/ioctl.c
index 0059833..43a3cf7 100644
--- a/driver/ioctl.c
+++ b/driver/ioctl.c
@@ -414,7 +414,11 @@ static int ioctl_clear_ioq(pcidriver_privdata_t *privdata, unsigned long arg)
* @returns -EFAULT when an invalid memory pointer is passed
*
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
int pcidriver_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg)
+#else
+long pcidriver_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+#endif
{
pcidriver_privdata_t *privdata = filp->private_data;
diff --git a/driver/ioctl.h b/driver/ioctl.h
index a0e9300..696fb8b 100644
--- a/driver/ioctl.h
+++ b/driver/ioctl.h
@@ -1 +1,5 @@
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
int pcidriver_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);
+#else
+long pcidriver_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
+#endif
diff --git a/driver/sysfs.c b/driver/sysfs.c
index 59536ab..47e4395 100644
--- a/driver/sysfs.c
+++ b/driver/sysfs.c
@@ -52,7 +52,10 @@ static int _pcidriver_sysfs_initialize(pcidriver_privdata_t *privdata,
return -ENOMEM;
sysfs_attr->attr.mode = S_IRUGO;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ // DS: Shall we lock now while accessing driver data structures???
sysfs_attr->attr.owner = THIS_MODULE;
+#endif
sysfs_attr->show = callback;
sysfs_attr->store = NULL;