diff --git a/arch/sh/boards/mach-landisk/gio.c b/arch/sh/boards/mach-landisk/gio.c index 25cdf7358000..528013188196 100644 --- a/arch/sh/boards/mach-landisk/gio.c +++ b/arch/sh/boards/mach-landisk/gio.c @@ -14,7 +14,6 @@ */ #include #include -#include #include #include #include @@ -35,7 +34,7 @@ static int gio_open(struct inode *inode, struct file *filp) int minor; int ret = -ENOENT; - lock_kernel(); + preempt_disable(); minor = MINOR(inode->i_rdev); if (minor < DEVCOUNT) { if (openCnt > 0) { @@ -45,7 +44,7 @@ static int gio_open(struct inode *inode, struct file *filp) ret = 0; } } - unlock_kernel(); + preempt_enable(); return ret; } @@ -60,8 +59,7 @@ static int gio_close(struct inode *inode, struct file *filp) return 0; } -static int gio_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg) +static long gio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { unsigned int data; static unsigned int addr = 0; @@ -129,7 +127,7 @@ static const struct file_operations gio_fops = { .owner = THIS_MODULE, .open = gio_open, /* open */ .release = gio_close, /* release */ - .ioctl = gio_ioctl, /* ioctl */ + .unlocked_ioctl = gio_ioctl, }; static int __init gio_init(void)