lkml.org 
[lkml]   [2003]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH: move mac-hid to C99
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.65/drivers/macintosh/mac_hid.c linux-2.5.65-ac2/drivers/macintosh/mac_hid.c
--- linux-2.5.65/drivers/macintosh/mac_hid.c 2003-02-10 18:38:51.000000000 +0000
+++ linux-2.5.65-ac2/drivers/macintosh/mac_hid.c 2003-02-16 23:46:38.000000000 +0000
@@ -25,38 +25,56 @@

#if defined(CONFIG_SYSCTL)
/* file(s) in /proc/sys/dev/mac_hid */
-ctl_table mac_hid_files[] =
-{
- {
- DEV_MAC_HID_MOUSE_BUTTON_EMULATION,
- "mouse_button_emulation", &mouse_emulate_buttons, sizeof(int),
- 0644, NULL, &proc_dointvec
- },
- {
- DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE,
- "mouse_button2_keycode", &mouse_button2_keycode, sizeof(int),
- 0644, NULL, &proc_dointvec
- },
- {
- DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE,
- "mouse_button3_keycode", &mouse_button3_keycode, sizeof(int),
- 0644, NULL, &proc_dointvec
- },
- { 0 }
+ctl_table mac_hid_files[] = {
+ {
+ .ctl_name = DEV_MAC_HID_MOUSE_BUTTON_EMULATION,
+ .procname = "mouse_button_emulation",
+ .data = &mouse_emulate_buttons,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE,
+ .procname = "mouse_button2_keycode",
+ .data = &mouse_button2_keycode,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE,
+ .procname = "mouse_button3_keycode",
+ .data = &mouse_button3_keycode,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ { .ctl_name = 0 }
};

/* dir in /proc/sys/dev */
-ctl_table mac_hid_dir[] =
-{
- { DEV_MAC_HID, "mac_hid", NULL, 0, 0555, mac_hid_files },
- { 0 }
+ctl_table mac_hid_dir[] = {
+ {
+ .ctl_name = DEV_MAC_HID,
+ .procname = "mac_hid",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = mac_hid_files,
+ },
+ { .ctl_name = 0 }
};

/* /proc/sys/dev itself, in case that is not there yet */
-ctl_table mac_hid_root_dir[] =
-{
- { CTL_DEV, "dev", NULL, 0, 0555, mac_hid_dir },
- { 0 }
+ctl_table mac_hid_root_dir[] = {
+ {
+ .ctl_name = CTL_DEV,
+ .procname = "dev",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = mac_hid_dir,
+ },
+ { .ctl_name = 0 }
};

static struct ctl_table_header *mac_hid_sysctl_header;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.963 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site