Re: [PATCH 1/1] hidraw: Added Compatibility ioctl() for 32-bit applications.

Previous thread: [patch] checkpatch: putting the && or || on the wrong line by Dan Carpenter on Monday, January 3, 2011 - 10:59 pm. (6 messages)

Next thread: [PATCH 0/1] hidraw: compat_ioctl for hidraw by Alan Ott on Monday, January 3, 2011 - 10:37 pm. (1 message)
From: Alan Ott
Date: Monday, January 3, 2011 - 10:37 pm

Added the ioctl function to the compat_ioctl pointer in the file_operations struct. Before this, some ioctls would fail for 32-bit apps on 64-bit systems.

Signed-off-by: Alan Ott <alan@signal11.us>
---
 drivers/hid/hidraw.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 29495e6..57ccc5f 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -428,6 +428,9 @@ static const struct file_operations hidraw_ops = {
 	.open =         hidraw_open,
 	.release =      hidraw_release,
 	.unlocked_ioctl = hidraw_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl	= hidraw_ioctl,
+#endif
 };
 
 void hidraw_report_event(struct hid_device *hid, u8 *data, int len)
-- 
1.7.0.4


--

From: Arnd Bergmann
Date: Tuesday, January 4, 2011 - 3:18 am

Acked-by: Arnd Bergmann <arnd@arndb.de>

I verified that all the ioctls for hidraw are indeed compatible.

	Arnd
--

From: Jiri Kosina
Date: Tuesday, January 4, 2011 - 3:25 am

Applied, thanks guys.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--

Previous thread: [patch] checkpatch: putting the && or || on the wrong line by Dan Carpenter on Monday, January 3, 2011 - 10:59 pm. (6 messages)

Next thread: [PATCH 0/1] hidraw: compat_ioctl for hidraw by Alan Ott on Monday, January 3, 2011 - 10:37 pm. (1 message)