linamh/app-emulation/opencbm/files/0.4.3_rc2/0008-Linux-module-Use-.unlocked_ioctl-instead-of-.ioctl.patch
2017-11-10 12:02:18 +01:00

42 lines
1.4 KiB
Diff

From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= <fbriere@fbriere.net>
Date: Fri, 20 May 2011 12:50:53 -0400
Subject: Linux module: Use .unlocked_ioctl instead of .ioctl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
cbm_ioctl() does not assume it is holding the BKL, so we can move it
as-is from .ioctl to .unlocked_ioctl.
Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
Forwarded: yes
---
sys/linux/cbm_module.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sys/linux/cbm_module.c b/sys/linux/cbm_module.c
index dd41b78..f38e388 100644
--- a/sys/linux/cbm_module.c
+++ b/sys/linux/cbm_module.c
@@ -627,8 +627,7 @@ static int cbm_write(struct inode *inode, struct file *f, const char *buf, int c
return cbm_raw_write(buf, cnt, 0, 0);
}
-static int cbm_ioctl(struct inode *inode, struct file *f,
- unsigned int cmd, unsigned long arg)
+static long cbm_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
{
/*linux parallel burst */
@@ -924,7 +923,7 @@ static struct file_operations cbm_fops =
#endif
.read = cbm_read, /* read */
.write = cbm_write, /* write */
- .ioctl = cbm_ioctl, /* ioctl */
+ .unlocked_ioctl = cbm_ioctl, /* ioctl */
.open = cbm_open, /* open */
.release = cbm_release, /* release */
};
--