diff options
Diffstat (limited to 'arch/cris/arch-v10/drivers/i2c.c')
-rw-r--r-- | arch/cris/arch-v10/drivers/i2c.c | 22 |
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 | ||
582 | static int | 582 | static int |
583 | i2c_ioctl(struct inode *inode, struct file *file, | 583 | i2c_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 | ||
619 | static 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 | |||
620 | static const struct file_operations i2c_fops = { | 630 | static 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 | ||
627 | int __init | 637 | int __init |