diff options
Diffstat (limited to 'arch/cris/arch-v10/drivers/sync_serial.c')
-rw-r--r-- | arch/cris/arch-v10/drivers/sync_serial.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c index 109dcd826d1..ee2dd4323da 100644 --- a/arch/cris/arch-v10/drivers/sync_serial.c +++ b/arch/cris/arch-v10/drivers/sync_serial.c | |||
@@ -157,7 +157,7 @@ static int sync_serial_open(struct inode *inode, struct file *file); | |||
157 | static int sync_serial_release(struct inode *inode, struct file *file); | 157 | static int sync_serial_release(struct inode *inode, struct file *file); |
158 | static unsigned int sync_serial_poll(struct file *filp, poll_table *wait); | 158 | static unsigned int sync_serial_poll(struct file *filp, poll_table *wait); |
159 | 159 | ||
160 | static int sync_serial_ioctl(struct inode *inode, struct file *file, | 160 | static int sync_serial_ioctl(struct file *file, |
161 | unsigned int cmd, unsigned long arg); | 161 | unsigned int cmd, unsigned long arg); |
162 | static ssize_t sync_serial_write(struct file *file, const char *buf, | 162 | static ssize_t sync_serial_write(struct file *file, const char *buf, |
163 | size_t count, loff_t *ppos); | 163 | size_t count, loff_t *ppos); |
@@ -244,13 +244,13 @@ static unsigned sync_serial_prescale_shadow; | |||
244 | #define NUMBER_OF_PORTS 2 | 244 | #define NUMBER_OF_PORTS 2 |
245 | 245 | ||
246 | static const struct file_operations sync_serial_fops = { | 246 | static const struct file_operations sync_serial_fops = { |
247 | .owner = THIS_MODULE, | 247 | .owner = THIS_MODULE, |
248 | .write = sync_serial_write, | 248 | .write = sync_serial_write, |
249 | .read = sync_serial_read, | 249 | .read = sync_serial_read, |
250 | .poll = sync_serial_poll, | 250 | .poll = sync_serial_poll, |
251 | .ioctl = sync_serial_ioctl, | 251 | .unlocked_ioctl = sync_serial_ioctl, |
252 | .open = sync_serial_open, | 252 | .open = sync_serial_open, |
253 | .release = sync_serial_release | 253 | .release = sync_serial_release |
254 | }; | 254 | }; |
255 | 255 | ||
256 | static int __init etrax_sync_serial_init(void) | 256 | static int __init etrax_sync_serial_init(void) |
@@ -678,7 +678,7 @@ static unsigned int sync_serial_poll(struct file *file, poll_table *wait) | |||
678 | return mask; | 678 | return mask; |
679 | } | 679 | } |
680 | 680 | ||
681 | static int sync_serial_ioctl(struct inode *inode, struct file *file, | 681 | static int sync_serial_ioctl_unlocked(struct file *file, |
682 | unsigned int cmd, unsigned long arg) | 682 | unsigned int cmd, unsigned long arg) |
683 | { | 683 | { |
684 | int return_val = 0; | 684 | int return_val = 0; |
@@ -956,6 +956,18 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file, | |||
956 | return return_val; | 956 | return return_val; |
957 | } | 957 | } |
958 | 958 | ||
959 | static long sync_serial_ioctl(struct file *file, | ||
960 | unsigned int cmd, unsigned long arg) | ||
961 | { | ||
962 | long ret; | ||
963 | |||
964 | lock_kernel(); | ||
965 | ret = sync_serial_ioctl_unlocked(file, cmd, arg); | ||
966 | unlock_kernel(); | ||
967 | |||
968 | return ret; | ||
969 | } | ||
970 | |||
959 | 971 | ||
960 | static ssize_t sync_serial_write(struct file *file, const char *buf, | 972 | static ssize_t sync_serial_write(struct file *file, const char *buf, |
961 | size_t count, loff_t *ppos) | 973 | size_t count, loff_t *ppos) |