summaryrefslogtreecommitdiffstats
path: root/scull/access.c
diff options
context:
space:
mode:
Diffstat (limited to 'scull/access.c')
-rw-r--r--scull/access.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/scull/access.c b/scull/access.c
index b534721..141ff80 100644
--- a/scull/access.c
+++ b/scull/access.c
@@ -82,7 +82,7 @@ struct file_operations scull_sngl_fops = {
.llseek = scull_llseek,
.read = scull_read,
.write = scull_write,
- .ioctl = scull_ioctl,
+ .unlocked_ioctl = scull_ioctl,
.open = scull_s_open,
.release = scull_s_release,
};
@@ -144,7 +144,7 @@ struct file_operations scull_user_fops = {
.llseek = scull_llseek,
.read = scull_read,
.write = scull_write,
- .ioctl = scull_ioctl,
+ .unlocked_ioctl = scull_ioctl,
.open = scull_u_open,
.release = scull_u_release,
};
@@ -217,7 +217,7 @@ struct file_operations scull_wusr_fops = {
.llseek = scull_llseek,
.read = scull_read,
.write = scull_write,
- .ioctl = scull_ioctl,
+ .unlocked_ioctl = scull_ioctl,
.open = scull_w_open,
.release = scull_w_release,
};
@@ -263,7 +263,7 @@ static struct scull_dev *scull_c_lookfor_device(dev_t key)
memset(lptr, 0, sizeof(struct scull_listitem));
lptr->key = key;
scull_trim(&(lptr->device)); /* initialize it */
- init_MUTEX(&(lptr->device.sem));
+ sema_init(&(lptr->device.sem), 1);
/* place it in the list */
list_add(&lptr->list, &scull_c_list);
@@ -316,7 +316,7 @@ struct file_operations scull_priv_fops = {
.llseek = scull_llseek,
.read = scull_read,
.write = scull_write,
- .ioctl = scull_ioctl,
+ .unlocked_ioctl = scull_ioctl,
.open = scull_c_open,
.release = scull_c_release,
};
@@ -349,7 +349,7 @@ static void scull_access_setup (dev_t devno, struct scull_adev_info *devinfo)
/* Initialize the device structure */
dev->quantum = scull_quantum;
dev->qset = scull_qset;
- init_MUTEX(&dev->sem);
+ sema_init(&dev->sem, 1);
/* Do the cdev stuff. */
cdev_init(&dev->cdev, devinfo->fops);