Skip to contentSkip to conversation

Fix bogus ioctl definitions

PATCH Andreas Schwab 1 participant 1 message May 1, 2003

lore
Share & tools
lore
#0 lore raw

This patch fixes the definitions of a few ioctl numbers: the third argument of _IOR/_IOW/_IOWR is supposed to be a type, not a number. Fortunately the actual values will not change (on a 32 bit system), except that PMU_IOC_GRAB_BACKLIGHT should have been _IO('B', 6) in the first place.

Andreas.

include/linux/pmu.h +11 -11
@@ -121,18 +121,18 @@
 
 /* no param */
 #define PMU_IOC_SLEEP		_IO('B', 0)
-/* out param: u32*	backlight value: 0 to 15 */
-#define PMU_IOC_GET_BACKLIGHT	_IOR('B', 1, sizeof(__u32*))
+/* out param: u32	backlight value: 0 to 15 */
+#define PMU_IOC_GET_BACKLIGHT	_IOR('B', 1, __u32)
 /* in param: u32	backlight value: 0 to 15 */
-#define PMU_IOC_SET_BACKLIGHT	_IOW('B', 2, sizeof(__u32))
-/* out param: u32*	PMU model */
-#define PMU_IOC_GET_MODEL	_IOR('B', 3, sizeof(__u32*))
-/* out param: u32*	has_adb: 0 or 1 */
-#define PMU_IOC_HAS_ADB		_IOR('B', 4, sizeof(__u32*))
-/* out param: u32*	can_sleep: 0 or 1 */
-#define PMU_IOC_CAN_SLEEP	_IOR('B', 5, sizeof(__u32*))
-/* no param */
-#define PMU_IOC_GRAB_BACKLIGHT	_IOR('B', 6, 0)
+#define PMU_IOC_SET_BACKLIGHT	_IOW('B', 2, __u32)
+/* out param: u32	PMU model */
+#define PMU_IOC_GET_MODEL	_IOR('B', 3, __u32)
+/* out param: u32	has_adb: 0 or 1 */
+#define PMU_IOC_HAS_ADB		_IOR('B', 4, __u32)
+/* out param: u32	can_sleep: 0 or 1 */
+#define PMU_IOC_CAN_SLEEP	_IOR('B', 5, __u32)
+/* in param: u32	ignored for compatibility */
+#define PMU_IOC_GRAB_BACKLIGHT	_IOR('B', 6, __u32)
 
 #ifdef __KERNEL__
 

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/