summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scull/main.c8
-rw-r--r--scull/scull.h3
2 files changed, 5 insertions, 6 deletions
diff --git a/scull/main.c b/scull/main.c
index ab3feb3..1bf14a7 100644
--- a/scull/main.c
+++ b/scull/main.c
@@ -389,8 +389,8 @@ ssize_t scull_write(struct file *filp, const char __user *buf, size_t count,
* The ioctl() implementation
*/
-int scull_ioctl(struct inode *inode, struct file *filp,
- unsigned int cmd, unsigned long arg)
+int scull_ioctl(struct file *filp, unsigned int cmd,
+ unsigned long arg)
{
int err = 0, tmp;
@@ -552,7 +552,7 @@ struct file_operations scull_fops = {
.llseek = scull_llseek,
.read = scull_read,
.write = scull_write,
- .ioctl = scull_ioctl,
+ .unlocked_ioctl = scull_ioctl,
.open = scull_open,
.release = scull_release,
};
@@ -648,7 +648,7 @@ int scull_init_module(void)
for (i = 0; i < scull_nr_devs; i++) {
scull_devices[i].quantum = scull_quantum;
scull_devices[i].qset = scull_qset;
- init_MUTEX(&scull_devices[i].sem);
+ sema_init(&scull_devices[i].sem, 1);
scull_setup_cdev(&scull_devices[i], i);
}
diff --git a/scull/scull.h b/scull/scull.h
index ac7362a..5b513e4 100644
--- a/scull/scull.h
+++ b/scull/scull.h
@@ -128,8 +128,7 @@ ssize_t scull_read(struct file *filp, char __user *buf, size_t count,
ssize_t scull_write(struct file *filp, const char __user *buf, size_t count,
loff_t *f_pos);
loff_t scull_llseek(struct file *filp, loff_t off, int whence);
-int scull_ioctl(struct inode *inode, struct file *filp,
- unsigned int cmd, unsigned long arg);
+int scull_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
/*