aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10/drivers/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v10/drivers/i2c.c')
-rw-r--r--arch/cris/arch-v10/drivers/i2c.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c
index a8737a8eb229..399e089bed7a 100644
--- a/arch/cris/arch-v10/drivers/i2c.c
+++ b/arch/cris/arch-v10/drivers/i2c.c
@@ -580,8 +580,7 @@ i2c_release(struct inode *inode, struct file *filp)
580 */ 580 */
581 581
582static int 582static int
583i2c_ioctl(struct inode *inode, struct file *file, 583i2c_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg)
584 unsigned int cmd, unsigned long arg)
585{ 584{
586 if(_IOC_TYPE(cmd) != ETRAXI2C_IOCTYPE) { 585 if(_IOC_TYPE(cmd) != ETRAXI2C_IOCTYPE) {
587 return -EINVAL; 586 return -EINVAL;
@@ -617,11 +616,22 @@ i2c_ioctl(struct inode *inode, struct file *file,
617 return 0; 616 return 0;
618} 617}
619 618
619static long i2c_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
620{
621 long ret;
622
623 lock_kernel();
624 ret = i2c_ioctl_unlocked(file, cmd, arg);
625 unlock_kernel();
626
627 return ret;
628}
629
620static const struct file_operations i2c_fops = { 630static const struct file_operations i2c_fops = {
621 .owner = THIS_MODULE, 631 .owner = THIS_MODULE,
622 .ioctl = i2c_ioctl, 632 .unlocked_ioctl = i2c_ioctl,
623 .open = i2c_open, 633 .open = i2c_open,
624 .release = i2c_release, 634 .release = i2c_release,
625}; 635};
626 636
627int __init 637int __init