aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:38:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:38:50 -0500
commit1557d33007f63dd96e5d15f33af389378e5f2e54 (patch)
tree06d05722b2ba5d2a67532f779fa8a88efe3c88f1 /drivers
parent6ec22f9b037fc0c2e00ddb7023fad279c365324d (diff)
parentc656ae95d1c5c8ed5763356263ace2d03087efec (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6: (43 commits) security/tomoyo: Remove now unnecessary handling of security_sysctl. security/tomoyo: Add a special case to handle accesses through the internal proc mount. sysctl: Drop & in front of every proc_handler. sysctl: Remove CTL_NONE and CTL_UNNUMBERED sysctl: kill dead ctl_handler definitions. sysctl: Remove the last of the generic binary sysctl support sysctl net: Remove unused binary sysctl code sysctl security/tomoyo: Don't look at ctl_name sysctl arm: Remove binary sysctl support sysctl x86: Remove dead binary sysctl support sysctl sh: Remove dead binary sysctl support sysctl powerpc: Remove dead binary sysctl support sysctl ia64: Remove dead binary sysctl support sysctl s390: Remove dead sysctl binary support sysctl frv: Remove dead binary sysctl support sysctl mips/lasat: Remove dead binary sysctl support sysctl drivers: Remove dead binary sysctl support sysctl crypto: Remove dead binary sysctl support sysctl security/keys: Remove dead binary sysctl support sysctl kernel: Remove binary sysctl logic ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cdrom/cdrom.c20
-rw-r--r--drivers/char/hpet.c11
-rw-r--r--drivers/char/ipmi/ipmi_poweroff.c11
-rw-r--r--drivers/char/pty.c14
-rw-r--r--drivers/char/random.c54
-rw-r--r--drivers/char/rtc.c11
-rw-r--r--drivers/macintosh/mac_hid.c17
-rw-r--r--drivers/md/md.c14
-rw-r--r--drivers/misc/sgi-xp/xpc_main.c14
-rw-r--r--drivers/net/wireless/arlan-proc.c245
-rw-r--r--drivers/parport/procfs.c39
-rw-r--r--drivers/s390/char/sclp_async.c5
-rw-r--r--drivers/scsi/scsi_sysctl.c11
13 files changed, 170 insertions, 296 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 614da5b8613a..e3749d0ba68b 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3557,67 +3557,65 @@ static ctl_table cdrom_table[] = {
3557 .data = &cdrom_sysctl_settings.info, 3557 .data = &cdrom_sysctl_settings.info,
3558 .maxlen = CDROM_STR_SIZE, 3558 .maxlen = CDROM_STR_SIZE,
3559 .mode = 0444, 3559 .mode = 0444,
3560 .proc_handler = &cdrom_sysctl_info, 3560 .proc_handler = cdrom_sysctl_info,
3561 }, 3561 },
3562 { 3562 {
3563 .procname = "autoclose", 3563 .procname = "autoclose",
3564 .data = &cdrom_sysctl_settings.autoclose, 3564 .data = &cdrom_sysctl_settings.autoclose,
3565 .maxlen = sizeof(int), 3565 .maxlen = sizeof(int),
3566 .mode = 0644, 3566 .mode = 0644,
3567 .proc_handler = &cdrom_sysctl_handler, 3567 .proc_handler = cdrom_sysctl_handler,
3568 }, 3568 },
3569 { 3569 {
3570 .procname = "autoeject", 3570 .procname = "autoeject",
3571 .data = &cdrom_sysctl_settings.autoeject, 3571 .data = &cdrom_sysctl_settings.autoeject,
3572 .maxlen = sizeof(int), 3572 .maxlen = sizeof(int),
3573 .mode = 0644, 3573 .mode = 0644,
3574 .proc_handler = &cdrom_sysctl_handler, 3574 .proc_handler = cdrom_sysctl_handler,
3575 }, 3575 },
3576 { 3576 {
3577 .procname = "debug", 3577 .procname = "debug",
3578 .data = &cdrom_sysctl_settings.debug, 3578 .data = &cdrom_sysctl_settings.debug,
3579 .maxlen = sizeof(int), 3579 .maxlen = sizeof(int),
3580 .mode = 0644, 3580 .mode = 0644,
3581 .proc_handler = &cdrom_sysctl_handler, 3581 .proc_handler = cdrom_sysctl_handler,
3582 }, 3582 },
3583 { 3583 {
3584 .procname = "lock", 3584 .procname = "lock",
3585 .data = &cdrom_sysctl_settings.lock, 3585 .data = &cdrom_sysctl_settings.lock,
3586 .maxlen = sizeof(int), 3586 .maxlen = sizeof(int),
3587 .mode = 0644, 3587 .mode = 0644,
3588 .proc_handler = &cdrom_sysctl_handler, 3588 .proc_handler = cdrom_sysctl_handler,
3589 }, 3589 },
3590 { 3590 {
3591 .procname = "check_media", 3591 .procname = "check_media",
3592 .data = &cdrom_sysctl_settings.check, 3592 .data = &cdrom_sysctl_settings.check,
3593 .maxlen = sizeof(int), 3593 .maxlen = sizeof(int),
3594 .mode = 0644, 3594 .mode = 0644,
3595 .proc_handler = &cdrom_sysctl_handler 3595 .proc_handler = cdrom_sysctl_handler
3596 }, 3596 },
3597 { .ctl_name = 0 } 3597 { }
3598}; 3598};
3599 3599
3600static ctl_table cdrom_cdrom_table[] = { 3600static ctl_table cdrom_cdrom_table[] = {
3601 { 3601 {
3602 .ctl_name = DEV_CDROM,
3603 .procname = "cdrom", 3602 .procname = "cdrom",
3604 .maxlen = 0, 3603 .maxlen = 0,
3605 .mode = 0555, 3604 .mode = 0555,
3606 .child = cdrom_table, 3605 .child = cdrom_table,
3607 }, 3606 },
3608 { .ctl_name = 0 } 3607 { }
3609}; 3608};
3610 3609
3611/* Make sure that /proc/sys/dev is there */ 3610/* Make sure that /proc/sys/dev is there */
3612static ctl_table cdrom_root_table[] = { 3611static ctl_table cdrom_root_table[] = {
3613 { 3612 {
3614 .ctl_name = CTL_DEV,
3615 .procname = "dev", 3613 .procname = "dev",
3616 .maxlen = 0, 3614 .maxlen = 0,
3617 .mode = 0555, 3615 .mode = 0555,
3618 .child = cdrom_cdrom_table, 3616 .child = cdrom_cdrom_table,
3619 }, 3617 },
3620 { .ctl_name = 0 } 3618 { }
3621}; 3619};
3622static struct ctl_table_header *cdrom_sysctl_header; 3620static struct ctl_table_header *cdrom_sysctl_header;
3623 3621
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 70a770ac0138..e481c5938bad 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -675,36 +675,33 @@ static int hpet_is_known(struct hpet_data *hdp)
675 675
676static ctl_table hpet_table[] = { 676static ctl_table hpet_table[] = {
677 { 677 {
678 .ctl_name = CTL_UNNUMBERED,
679 .procname = "max-user-freq", 678 .procname = "max-user-freq",
680 .data = &hpet_max_freq, 679 .data = &hpet_max_freq,
681 .maxlen = sizeof(int), 680 .maxlen = sizeof(int),
682 .mode = 0644, 681 .mode = 0644,
683 .proc_handler = &proc_dointvec, 682 .proc_handler = proc_dointvec,
684 }, 683 },
685 {.ctl_name = 0} 684 {}
686}; 685};
687 686
688static ctl_table hpet_root[] = { 687static ctl_table hpet_root[] = {
689 { 688 {
690 .ctl_name = CTL_UNNUMBERED,
691 .procname = "hpet", 689 .procname = "hpet",
692 .maxlen = 0, 690 .maxlen = 0,
693 .mode = 0555, 691 .mode = 0555,
694 .child = hpet_table, 692 .child = hpet_table,
695 }, 693 },
696 {.ctl_name = 0} 694 {}
697}; 695};
698 696
699static ctl_table dev_root[] = { 697static ctl_table dev_root[] = {
700 { 698 {
701 .ctl_name = CTL_DEV,
702 .procname = "dev", 699 .procname = "dev",
703 .maxlen = 0, 700 .maxlen = 0,
704 .mode = 0555, 701 .mode = 0555,
705 .child = hpet_root, 702 .child = hpet_root,
706 }, 703 },
707 {.ctl_name = 0} 704 {}
708}; 705};
709 706
710static struct ctl_table_header *sysctl_header; 707static struct ctl_table_header *sysctl_header;
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
index 2e66b5f773dd..0dec5da000ef 100644
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -660,26 +660,23 @@ static struct ipmi_smi_watcher smi_watcher = {
660#include <linux/sysctl.h> 660#include <linux/sysctl.h>
661 661
662static ctl_table ipmi_table[] = { 662static ctl_table ipmi_table[] = {
663 { .ctl_name = DEV_IPMI_POWEROFF_POWERCYCLE, 663 { .procname = "poweroff_powercycle",
664 .procname = "poweroff_powercycle",
665 .data = &poweroff_powercycle, 664 .data = &poweroff_powercycle,
666 .maxlen = sizeof(poweroff_powercycle), 665 .maxlen = sizeof(poweroff_powercycle),
667 .mode = 0644, 666 .mode = 0644,
668 .proc_handler = &proc_dointvec }, 667 .proc_handler = proc_dointvec },
669 { } 668 { }
670}; 669};
671 670
672static ctl_table ipmi_dir_table[] = { 671static ctl_table ipmi_dir_table[] = {
673 { .ctl_name = DEV_IPMI, 672 { .procname = "ipmi",
674 .procname = "ipmi",
675 .mode = 0555, 673 .mode = 0555,
676 .child = ipmi_table }, 674 .child = ipmi_table },
677 { } 675 { }
678}; 676};
679 677
680static ctl_table ipmi_root_table[] = { 678static ctl_table ipmi_root_table[] = {
681 { .ctl_name = CTL_DEV, 679 { .procname = "dev",
682 .procname = "dev",
683 .mode = 0555, 680 .mode = 0555,
684 .child = ipmi_dir_table }, 681 .child = ipmi_dir_table },
685 { } 682 { }
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 62f282e67638..d86c0bc05c1c 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -431,30 +431,25 @@ static struct cdev ptmx_cdev;
431 431
432static struct ctl_table pty_table[] = { 432static struct ctl_table pty_table[] = {
433 { 433 {
434 .ctl_name = PTY_MAX,
435 .procname = "max", 434 .procname = "max",
436 .maxlen = sizeof(int), 435 .maxlen = sizeof(int),
437 .mode = 0644, 436 .mode = 0644,
438 .data = &pty_limit, 437 .data = &pty_limit,
439 .proc_handler = &proc_dointvec_minmax, 438 .proc_handler = proc_dointvec_minmax,
440 .strategy = &sysctl_intvec,
441 .extra1 = &pty_limit_min, 439 .extra1 = &pty_limit_min,
442 .extra2 = &pty_limit_max, 440 .extra2 = &pty_limit_max,
443 }, { 441 }, {
444 .ctl_name = PTY_NR,
445 .procname = "nr", 442 .procname = "nr",
446 .maxlen = sizeof(int), 443 .maxlen = sizeof(int),
447 .mode = 0444, 444 .mode = 0444,
448 .data = &pty_count, 445 .data = &pty_count,
449 .proc_handler = &proc_dointvec, 446 .proc_handler = proc_dointvec,
450 }, { 447 },
451 .ctl_name = 0 448 {}
452 }
453}; 449};
454 450
455static struct ctl_table pty_kern_table[] = { 451static struct ctl_table pty_kern_table[] = {
456 { 452 {
457 .ctl_name = KERN_PTY,
458 .procname = "pty", 453 .procname = "pty",
459 .mode = 0555, 454 .mode = 0555,
460 .child = pty_table, 455 .child = pty_table,
@@ -464,7 +459,6 @@ static struct ctl_table pty_kern_table[] = {
464 459
465static struct ctl_table pty_root_table[] = { 460static struct ctl_table pty_root_table[] = {
466 { 461 {
467 .ctl_name = CTL_KERN,
468 .procname = "kernel", 462 .procname = "kernel",
469 .mode = 0555, 463 .mode = 0555,
470 .child = pty_kern_table, 464 .child = pty_kern_table,
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 04b505e5a5e2..dcd08635cf1b 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1257,94 +1257,54 @@ static int proc_do_uuid(ctl_table *table, int write,
1257 return proc_dostring(&fake_table, write, buffer, lenp, ppos); 1257 return proc_dostring(&fake_table, write, buffer, lenp, ppos);
1258} 1258}
1259 1259
1260static int uuid_strategy(ctl_table *table,
1261 void __user *oldval, size_t __user *oldlenp,
1262 void __user *newval, size_t newlen)
1263{
1264 unsigned char tmp_uuid[16], *uuid;
1265 unsigned int len;
1266
1267 if (!oldval || !oldlenp)
1268 return 1;
1269
1270 uuid = table->data;
1271 if (!uuid) {
1272 uuid = tmp_uuid;
1273 uuid[8] = 0;
1274 }
1275 if (uuid[8] == 0)
1276 generate_random_uuid(uuid);
1277
1278 if (get_user(len, oldlenp))
1279 return -EFAULT;
1280 if (len) {
1281 if (len > 16)
1282 len = 16;
1283 if (copy_to_user(oldval, uuid, len) ||
1284 put_user(len, oldlenp))
1285 return -EFAULT;
1286 }
1287 return 1;
1288}
1289
1290static int sysctl_poolsize = INPUT_POOL_WORDS * 32; 1260static int sysctl_poolsize = INPUT_POOL_WORDS * 32;
1291ctl_table random_table[] = { 1261ctl_table random_table[] = {
1292 { 1262 {
1293 .ctl_name = RANDOM_POOLSIZE,
1294 .procname = "poolsize", 1263 .procname = "poolsize",
1295 .data = &sysctl_poolsize, 1264 .data = &sysctl_poolsize,
1296 .maxlen = sizeof(int), 1265 .maxlen = sizeof(int),
1297 .mode = 0444, 1266 .mode = 0444,
1298 .proc_handler = &proc_dointvec, 1267 .proc_handler = proc_dointvec,
1299 }, 1268 },
1300 { 1269 {
1301 .ctl_name = RANDOM_ENTROPY_COUNT,
1302 .procname = "entropy_avail", 1270 .procname = "entropy_avail",
1303 .maxlen = sizeof(int), 1271 .maxlen = sizeof(int),
1304 .mode = 0444, 1272 .mode = 0444,
1305 .proc_handler = &proc_dointvec, 1273 .proc_handler = proc_dointvec,
1306 .data = &input_pool.entropy_count, 1274 .data = &input_pool.entropy_count,
1307 }, 1275 },
1308 { 1276 {
1309 .ctl_name = RANDOM_READ_THRESH,
1310 .procname = "read_wakeup_threshold", 1277 .procname = "read_wakeup_threshold",
1311 .data = &random_read_wakeup_thresh, 1278 .data = &random_read_wakeup_thresh,
1312 .maxlen = sizeof(int), 1279 .maxlen = sizeof(int),
1313 .mode = 0644, 1280 .mode = 0644,
1314 .proc_handler = &proc_dointvec_minmax, 1281 .proc_handler = proc_dointvec_minmax,
1315 .strategy = &sysctl_intvec,
1316 .extra1 = &min_read_thresh, 1282 .extra1 = &min_read_thresh,
1317 .extra2 = &max_read_thresh, 1283 .extra2 = &max_read_thresh,
1318 }, 1284 },
1319 { 1285 {
1320 .ctl_name = RANDOM_WRITE_THRESH,
1321 .procname = "write_wakeup_threshold", 1286 .procname = "write_wakeup_threshold",
1322 .data = &random_write_wakeup_thresh, 1287 .data = &random_write_wakeup_thresh,
1323 .maxlen = sizeof(int), 1288 .maxlen = sizeof(int),
1324 .mode = 0644, 1289 .mode = 0644,
1325 .proc_handler = &proc_dointvec_minmax, 1290 .proc_handler = proc_dointvec_minmax,
1326 .strategy = &sysctl_intvec,
1327 .extra1 = &min_write_thresh, 1291 .extra1 = &min_write_thresh,
1328 .extra2 = &max_write_thresh, 1292 .extra2 = &max_write_thresh,
1329 }, 1293 },
1330 { 1294 {
1331 .ctl_name = RANDOM_BOOT_ID,
1332 .procname = "boot_id", 1295 .procname = "boot_id",
1333 .data = &sysctl_bootid, 1296 .data = &sysctl_bootid,
1334 .maxlen = 16, 1297 .maxlen = 16,
1335 .mode = 0444, 1298 .mode = 0444,
1336 .proc_handler = &proc_do_uuid, 1299 .proc_handler = proc_do_uuid,
1337 .strategy = &uuid_strategy,
1338 }, 1300 },
1339 { 1301 {
1340 .ctl_name = RANDOM_UUID,
1341 .procname = "uuid", 1302 .procname = "uuid",
1342 .maxlen = 16, 1303 .maxlen = 16,
1343 .mode = 0444, 1304 .mode = 0444,
1344 .proc_handler = &proc_do_uuid, 1305 .proc_handler = proc_do_uuid,
1345 .strategy = &uuid_strategy,
1346 }, 1306 },
1347 { .ctl_name = 0 } 1307 { }
1348}; 1308};
1349#endif /* CONFIG_SYSCTL */ 1309#endif /* CONFIG_SYSCTL */
1350 1310
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index bc4ab3e54550..95acb8c880f4 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -282,34 +282,31 @@ static irqreturn_t rtc_interrupt(int irq, void *dev_id)
282 */ 282 */
283static ctl_table rtc_table[] = { 283static ctl_table rtc_table[] = {
284 { 284 {
285 .ctl_name = CTL_UNNUMBERED,
286 .procname = "max-user-freq", 285 .procname = "max-user-freq",
287 .data = &rtc_max_user_freq, 286 .data = &rtc_max_user_freq,
288 .maxlen = sizeof(int), 287 .maxlen = sizeof(int),
289 .mode = 0644, 288 .mode = 0644,
290 .proc_handler = &proc_dointvec, 289 .proc_handler = proc_dointvec,
291 }, 290 },
292 { .ctl_name = 0 } 291 { }
293}; 292};
294 293
295static ctl_table rtc_root[] = { 294static ctl_table rtc_root[] = {
296 { 295 {
297 .ctl_name = CTL_UNNUMBERED,
298 .procname = "rtc", 296 .procname = "rtc",
299 .mode = 0555, 297 .mode = 0555,
300 .child = rtc_table, 298 .child = rtc_table,
301 }, 299 },
302 { .ctl_name = 0 } 300 { }
303}; 301};
304 302
305static ctl_table dev_root[] = { 303static ctl_table dev_root[] = {
306 { 304 {
307 .ctl_name = CTL_DEV,
308 .procname = "dev", 305 .procname = "dev",
309 .mode = 0555, 306 .mode = 0555,
310 .child = rtc_root, 307 .child = rtc_root,
311 }, 308 },
312 { .ctl_name = 0 } 309 { }
313}; 310};
314 311
315static struct ctl_table_header *sysctl_header; 312static struct ctl_table_header *sysctl_header;
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c
index cc9f27514aef..7b4ef5bb556b 100644
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -27,54 +27,49 @@ static int mouse_last_keycode;
27/* file(s) in /proc/sys/dev/mac_hid */ 27/* file(s) in /proc/sys/dev/mac_hid */
28static ctl_table mac_hid_files[] = { 28static ctl_table mac_hid_files[] = {
29 { 29 {
30 .ctl_name = DEV_MAC_HID_MOUSE_BUTTON_EMULATION,
31 .procname = "mouse_button_emulation", 30 .procname = "mouse_button_emulation",
32 .data = &mouse_emulate_buttons, 31 .data = &mouse_emulate_buttons,
33 .maxlen = sizeof(int), 32 .maxlen = sizeof(int),
34 .mode = 0644, 33 .mode = 0644,
35 .proc_handler = &proc_dointvec, 34 .proc_handler = proc_dointvec,
36 }, 35 },
37 { 36 {
38 .ctl_name = DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE,
39 .procname = "mouse_button2_keycode", 37 .procname = "mouse_button2_keycode",
40 .data = &mouse_button2_keycode, 38 .data = &mouse_button2_keycode,
41 .maxlen = sizeof(int), 39 .maxlen = sizeof(int),
42 .mode = 0644, 40 .mode = 0644,
43 .proc_handler = &proc_dointvec, 41 .proc_handler = proc_dointvec,
44 }, 42 },
45 { 43 {
46 .ctl_name = DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE,
47 .procname = "mouse_button3_keycode", 44 .procname = "mouse_button3_keycode",
48 .data = &mouse_button3_keycode, 45 .data = &mouse_button3_keycode,
49 .maxlen = sizeof(int), 46 .maxlen = sizeof(int),
50 .mode = 0644, 47 .mode = 0644,
51 .proc_handler = &proc_dointvec, 48 .proc_handler = proc_dointvec,
52 }, 49 },
53 { .ctl_name = 0 } 50 { }
54}; 51};
55 52
56/* dir in /proc/sys/dev */ 53/* dir in /proc/sys/dev */
57static ctl_table mac_hid_dir[] = { 54static ctl_table mac_hid_dir[] = {
58 { 55 {
59 .ctl_name = DEV_MAC_HID,
60 .procname = "mac_hid", 56 .procname = "mac_hid",
61 .maxlen = 0, 57 .maxlen = 0,
62 .mode = 0555, 58 .mode = 0555,
63 .child = mac_hid_files, 59 .child = mac_hid_files,
64 }, 60 },
65 { .ctl_name = 0 } 61 { }
66}; 62};
67 63
68/* /proc/sys/dev itself, in case that is not there yet */ 64/* /proc/sys/dev itself, in case that is not there yet */
69static ctl_table mac_hid_root_dir[] = { 65static ctl_table mac_hid_root_dir[] = {
70 { 66 {
71 .ctl_name = CTL_DEV,
72 .procname = "dev", 67 .procname = "dev",
73 .maxlen = 0, 68 .maxlen = 0,
74 .mode = 0555, 69 .mode = 0555,
75 .child = mac_hid_dir, 70 .child = mac_hid_dir,
76 }, 71 },
77 { .ctl_name = 0 } 72 { }
78}; 73};
79 74
80static struct ctl_table_header *mac_hid_sysctl_header; 75static struct ctl_table_header *mac_hid_sysctl_header;
diff --git a/drivers/md/md.c b/drivers/md/md.c
index b182f86a19dd..5f154ef1e4be 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -98,44 +98,40 @@ static struct ctl_table_header *raid_table_header;
98 98
99static ctl_table raid_table[] = { 99static ctl_table raid_table[] = {
100 { 100 {
101 .ctl_name = DEV_RAID_SPEED_LIMIT_MIN,
102 .procname = "speed_limit_min", 101 .procname = "speed_limit_min",
103 .data = &sysctl_speed_limit_min, 102 .data = &sysctl_speed_limit_min,
104 .maxlen = sizeof(int), 103 .maxlen = sizeof(int),
105 .mode = S_IRUGO|S_IWUSR, 104 .mode = S_IRUGO|S_IWUSR,
106 .proc_handler = &proc_dointvec, 105 .proc_handler = proc_dointvec,
107 }, 106 },
108 { 107 {
109 .ctl_name = DEV_RAID_SPEED_LIMIT_MAX,
110 .procname = "speed_limit_max", 108 .procname = "speed_limit_max",
111 .data = &sysctl_speed_limit_max, 109 .data = &sysctl_speed_limit_max,
112 .maxlen = sizeof(int), 110 .maxlen = sizeof(int),
113 .mode = S_IRUGO|S_IWUSR, 111 .mode = S_IRUGO|S_IWUSR,
114 .proc_handler = &proc_dointvec, 112 .proc_handler = proc_dointvec,
115 }, 113 },
116 { .ctl_name = 0 } 114 { }
117}; 115};
118 116
119static ctl_table raid_dir_table[] = { 117static ctl_table raid_dir_table[] = {
120 { 118 {
121 .ctl_name = DEV_RAID,
122 .procname = "raid", 119 .procname = "raid",
123 .maxlen = 0, 120 .maxlen = 0,
124 .mode = S_IRUGO|S_IXUGO, 121 .mode = S_IRUGO|S_IXUGO,
125 .child = raid_table, 122 .child = raid_table,
126 }, 123 },
127 { .ctl_name = 0 } 124 { }
128}; 125};
129 126
130static ctl_table raid_root_table[] = { 127static ctl_table raid_root_table[] = {
131 { 128 {
132 .ctl_name = CTL_DEV,
133 .procname = "dev", 129 .procname = "dev",
134 .maxlen = 0, 130 .maxlen = 0,
135 .mode = 0555, 131 .mode = 0555,
136 .child = raid_dir_table, 132 .child = raid_dir_table,
137 }, 133 },
138 { .ctl_name = 0 } 134 { }
139}; 135};
140 136
141static const struct block_device_operations md_fops; 137static const struct block_device_operations md_fops;
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
index fd3688a3e23f..832ed4c88cf7 100644
--- a/drivers/misc/sgi-xp/xpc_main.c
+++ b/drivers/misc/sgi-xp/xpc_main.c
@@ -89,48 +89,40 @@ static int xpc_disengage_max_timelimit = 120;
89 89
90static ctl_table xpc_sys_xpc_hb_dir[] = { 90static ctl_table xpc_sys_xpc_hb_dir[] = {
91 { 91 {
92 .ctl_name = CTL_UNNUMBERED,
93 .procname = "hb_interval", 92 .procname = "hb_interval",
94 .data = &xpc_hb_interval, 93 .data = &xpc_hb_interval,
95 .maxlen = sizeof(int), 94 .maxlen = sizeof(int),
96 .mode = 0644, 95 .mode = 0644,
97 .proc_handler = &proc_dointvec_minmax, 96 .proc_handler = proc_dointvec_minmax,
98 .strategy = &sysctl_intvec,
99 .extra1 = &xpc_hb_min_interval, 97 .extra1 = &xpc_hb_min_interval,
100 .extra2 = &xpc_hb_max_interval}, 98 .extra2 = &xpc_hb_max_interval},
101 { 99 {
102 .ctl_name = CTL_UNNUMBERED,
103 .procname = "hb_check_interval", 100 .procname = "hb_check_interval",
104 .data = &xpc_hb_check_interval, 101 .data = &xpc_hb_check_interval,
105 .maxlen = sizeof(int), 102 .maxlen = sizeof(int),
106 .mode = 0644, 103 .mode = 0644,
107 .proc_handler = &proc_dointvec_minmax, 104 .proc_handler = proc_dointvec_minmax,
108 .strategy = &sysctl_intvec,
109 .extra1 = &xpc_hb_check_min_interval, 105 .extra1 = &xpc_hb_check_min_interval,
110 .extra2 = &xpc_hb_check_max_interval}, 106 .extra2 = &xpc_hb_check_max_interval},
111 {} 107 {}
112}; 108};
113static ctl_table xpc_sys_xpc_dir[] = { 109static ctl_table xpc_sys_xpc_dir[] = {
114 { 110 {
115 .ctl_name = CTL_UNNUMBERED,
116 .procname = "hb", 111 .procname = "hb",
117 .mode = 0555, 112 .mode = 0555,
118 .child = xpc_sys_xpc_hb_dir}, 113 .child = xpc_sys_xpc_hb_dir},
119 { 114 {
120 .ctl_name = CTL_UNNUMBERED,
121 .procname = "disengage_timelimit", 115 .procname = "disengage_timelimit",
122 .data = &xpc_disengage_timelimit, 116 .data = &xpc_disengage_timelimit,
123 .maxlen = sizeof(int), 117 .maxlen = sizeof(int),
124 .mode = 0644, 118 .mode = 0644,
125 .proc_handler = &proc_dointvec_minmax, 119 .proc_handler = proc_dointvec_minmax,
126 .strategy = &sysctl_intvec,
127 .extra1 = &xpc_disengage_min_timelimit, 120 .extra1 = &xpc_disengage_min_timelimit,
128 .extra2 = &xpc_disengage_max_timelimit}, 121 .extra2 = &xpc_disengage_max_timelimit},
129 {} 122 {}
130}; 123};
131static ctl_table xpc_sys_dir[] = { 124static ctl_table xpc_sys_dir[] = {
132 { 125 {
133 .ctl_name = CTL_UNNUMBERED,
134 .procname = "xpc", 126 .procname = "xpc",
135 .mode = 0555, 127 .mode = 0555,
136 .child = xpc_sys_xpc_dir}, 128 .child = xpc_sys_xpc_dir},
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
index a8b689635a3b..b22983e6c0cf 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -816,84 +816,83 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write,
816 816
817 817
818/* Place files in /proc/sys/dev/arlan */ 818/* Place files in /proc/sys/dev/arlan */
819#define CTBLN(num,card,nam) \ 819#define CTBLN(card,nam) \
820 { .ctl_name = num,\ 820 { .procname = #nam,\
821 .procname = #nam,\
822 .data = &(arlan_conf[card].nam),\ 821 .data = &(arlan_conf[card].nam),\
823 .maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec} 822 .maxlen = sizeof(int), .mode = 0600, .proc_handler = proc_dointvec}
824#ifdef ARLAN_DEBUGGING 823#ifdef ARLAN_DEBUGGING
825 824
826#define ARLAN_PROC_DEBUG_ENTRIES \ 825#define ARLAN_PROC_DEBUG_ENTRIES \
827 { .ctl_name = 48, .procname = "entry_exit_debug",\ 826 { .procname = "entry_exit_debug",\
828 .data = &arlan_entry_and_exit_debug,\ 827 .data = &arlan_entry_and_exit_debug,\
829 .maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec},\ 828 .maxlen = sizeof(int), .mode = 0600, .proc_handler = proc_dointvec},\
830 { .ctl_name = 49, .procname = "debug", .data = &arlan_debug,\ 829 { .procname = "debug", .data = &arlan_debug,\
831 .maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec}, 830 .maxlen = sizeof(int), .mode = 0600, .proc_handler = proc_dointvec},
832#else 831#else
833#define ARLAN_PROC_DEBUG_ENTRIES 832#define ARLAN_PROC_DEBUG_ENTRIES
834#endif 833#endif
835 834
836#define ARLAN_SYSCTL_TABLE_TOTAL(cardNo)\ 835#define ARLAN_SYSCTL_TABLE_TOTAL(cardNo)\
837 CTBLN(1,cardNo,spreadingCode),\ 836 CTBLN(cardNo,spreadingCode),\
838 CTBLN(2,cardNo, channelNumber),\ 837 CTBLN(cardNo, channelNumber),\
839 CTBLN(3,cardNo, scramblingDisable),\ 838 CTBLN(cardNo, scramblingDisable),\
840 CTBLN(4,cardNo, txAttenuation),\ 839 CTBLN(cardNo, txAttenuation),\
841 CTBLN(5,cardNo, systemId), \ 840 CTBLN(cardNo, systemId), \
842 CTBLN(6,cardNo, maxDatagramSize),\ 841 CTBLN(cardNo, maxDatagramSize),\
843 CTBLN(7,cardNo, maxFrameSize),\ 842 CTBLN(cardNo, maxFrameSize),\
844 CTBLN(8,cardNo, maxRetries),\ 843 CTBLN(cardNo, maxRetries),\
845 CTBLN(9,cardNo, receiveMode),\ 844 CTBLN(cardNo, receiveMode),\
846 CTBLN(10,cardNo, priority),\ 845 CTBLN(cardNo, priority),\
847 CTBLN(11,cardNo, rootOrRepeater),\ 846 CTBLN(cardNo, rootOrRepeater),\
848 CTBLN(12,cardNo, SID),\ 847 CTBLN(cardNo, SID),\
849 CTBLN(13,cardNo, registrationMode),\ 848 CTBLN(cardNo, registrationMode),\
850 CTBLN(14,cardNo, registrationFill),\ 849 CTBLN(cardNo, registrationFill),\
851 CTBLN(15,cardNo, localTalkAddress),\ 850 CTBLN(cardNo, localTalkAddress),\
852 CTBLN(16,cardNo, codeFormat),\ 851 CTBLN(cardNo, codeFormat),\
853 CTBLN(17,cardNo, numChannels),\ 852 CTBLN(cardNo, numChannels),\
854 CTBLN(18,cardNo, channel1),\ 853 CTBLN(cardNo, channel1),\
855 CTBLN(19,cardNo, channel2),\ 854 CTBLN(cardNo, channel2),\
856 CTBLN(20,cardNo, channel3),\ 855 CTBLN(cardNo, channel3),\
857 CTBLN(21,cardNo, channel4),\ 856 CTBLN(cardNo, channel4),\
858 CTBLN(22,cardNo, txClear),\ 857 CTBLN(cardNo, txClear),\
859 CTBLN(23,cardNo, txRetries),\ 858 CTBLN(cardNo, txRetries),\
860 CTBLN(24,cardNo, txRouting),\ 859 CTBLN(cardNo, txRouting),\
861 CTBLN(25,cardNo, txScrambled),\ 860 CTBLN(cardNo, txScrambled),\
862 CTBLN(26,cardNo, rxParameter),\ 861 CTBLN(cardNo, rxParameter),\
863 CTBLN(27,cardNo, txTimeoutMs),\ 862 CTBLN(cardNo, txTimeoutMs),\
864 CTBLN(28,cardNo, waitCardTimeout),\ 863 CTBLN(cardNo, waitCardTimeout),\
865 CTBLN(29,cardNo, channelSet), \ 864 CTBLN(cardNo, channelSet), \
866 {.ctl_name = 30, .procname = "name",\ 865 { .procname = "name",\
867 .data = arlan_conf[cardNo].siteName,\ 866 .data = arlan_conf[cardNo].siteName,\
868 .maxlen = 16, .mode = 0600, .proc_handler = &proc_dostring},\ 867 .maxlen = 16, .mode = 0600, .proc_handler = proc_dostring},\
869 CTBLN(31,cardNo,waitTime),\ 868 CTBLN(cardNo,waitTime),\
870 CTBLN(32,cardNo,lParameter),\ 869 CTBLN(cardNo,lParameter),\
871 CTBLN(33,cardNo,_15),\ 870 CTBLN(cardNo,_15),\
872 CTBLN(34,cardNo,headerSize),\ 871 CTBLN(cardNo,headerSize),\
873 CTBLN(36,cardNo,tx_delay_ms),\ 872 CTBLN(cardNo,tx_delay_ms),\
874 CTBLN(37,cardNo,retries),\ 873 CTBLN(cardNo,retries),\
875 CTBLN(38,cardNo,ReTransmitPacketMaxSize),\ 874 CTBLN(cardNo,ReTransmitPacketMaxSize),\
876 CTBLN(39,cardNo,waitReTransmitPacketMaxSize),\ 875 CTBLN(cardNo,waitReTransmitPacketMaxSize),\
877 CTBLN(40,cardNo,fastReTransCount),\ 876 CTBLN(cardNo,fastReTransCount),\
878 CTBLN(41,cardNo,driverRetransmissions),\ 877 CTBLN(cardNo,driverRetransmissions),\
879 CTBLN(42,cardNo,txAckTimeoutMs),\ 878 CTBLN(cardNo,txAckTimeoutMs),\
880 CTBLN(43,cardNo,registrationInterrupts),\ 879 CTBLN(cardNo,registrationInterrupts),\
881 CTBLN(44,cardNo,hardwareType),\ 880 CTBLN(cardNo,hardwareType),\
882 CTBLN(45,cardNo,radioType),\ 881 CTBLN(cardNo,radioType),\
883 CTBLN(46,cardNo,writeEEPROM),\ 882 CTBLN(cardNo,writeEEPROM),\
884 CTBLN(47,cardNo,writeRadioType),\ 883 CTBLN(cardNo,writeRadioType),\
885 ARLAN_PROC_DEBUG_ENTRIES\ 884 ARLAN_PROC_DEBUG_ENTRIES\
886 CTBLN(50,cardNo,in_speed),\ 885 CTBLN(cardNo,in_speed),\
887 CTBLN(51,cardNo,out_speed),\ 886 CTBLN(cardNo,out_speed),\
888 CTBLN(52,cardNo,in_speed10),\ 887 CTBLN(cardNo,in_speed10),\
889 CTBLN(53,cardNo,out_speed10),\ 888 CTBLN(cardNo,out_speed10),\
890 CTBLN(54,cardNo,in_speed_max),\ 889 CTBLN(cardNo,in_speed_max),\
891 CTBLN(55,cardNo,out_speed_max),\ 890 CTBLN(cardNo,out_speed_max),\
892 CTBLN(56,cardNo,measure_rate),\ 891 CTBLN(cardNo,measure_rate),\
893 CTBLN(57,cardNo,pre_Command_Wait),\ 892 CTBLN(cardNo,pre_Command_Wait),\
894 CTBLN(58,cardNo,rx_tweak1),\ 893 CTBLN(cardNo,rx_tweak1),\
895 CTBLN(59,cardNo,rx_tweak2),\ 894 CTBLN(cardNo,rx_tweak2),\
896 CTBLN(60,cardNo,tx_queue_len),\ 895 CTBLN(cardNo,tx_queue_len),\
897 896
898 897
899 898
@@ -903,63 +902,56 @@ static ctl_table arlan_conf_table0[] =
903 902
904#ifdef ARLAN_PROC_SHM_DUMP 903#ifdef ARLAN_PROC_SHM_DUMP
905 { 904 {
906 .ctl_name = 150,
907 .procname = "arlan0-txRing", 905 .procname = "arlan0-txRing",
908 .data = &arlan_drive_info, 906 .data = &arlan_drive_info,
909 .maxlen = ARLAN_STR_SIZE, 907 .maxlen = ARLAN_STR_SIZE,
910 .mode = 0400, 908 .mode = 0400,
911 .proc_handler = &arlan_sysctl_infotxRing, 909 .proc_handler = arlan_sysctl_infotxRing,
912 }, 910 },
913 { 911 {
914 .ctl_name = 151,
915 .procname = "arlan0-rxRing", 912 .procname = "arlan0-rxRing",
916 .data = &arlan_drive_info, 913 .data = &arlan_drive_info,
917 .maxlen = ARLAN_STR_SIZE, 914 .maxlen = ARLAN_STR_SIZE,
918 .mode = 0400, 915 .mode = 0400,
919 .proc_handler = &arlan_sysctl_inforxRing, 916 .proc_handler = arlan_sysctl_inforxRing,
920 }, 917 },
921 { 918 {
922 .ctl_name = 152,
923 .procname = "arlan0-18", 919 .procname = "arlan0-18",
924 .data = &arlan_drive_info, 920 .data = &arlan_drive_info,
925 .maxlen = ARLAN_STR_SIZE, 921 .maxlen = ARLAN_STR_SIZE,
926 .mode = 0400, 922 .mode = 0400,
927 .proc_handler = &arlan_sysctl_info18, 923 .proc_handler = arlan_sysctl_info18,
928 }, 924 },
929 { 925 {
930 .ctl_name = 153,
931 .procname = "arlan0-ring", 926 .procname = "arlan0-ring",
932 .data = &arlan_drive_info, 927 .data = &arlan_drive_info,
933 .maxlen = ARLAN_STR_SIZE, 928 .maxlen = ARLAN_STR_SIZE,
934 .mode = 0400, 929 .mode = 0400,
935 .proc_handler = &arlan_sysctl_info161719, 930 .proc_handler = arlan_sysctl_info161719,
936 }, 931 },
937 { 932 {
938 .ctl_name = 154,
939 .procname = "arlan0-shm-cpy", 933 .procname = "arlan0-shm-cpy",
940 .data = &arlan_drive_info, 934 .data = &arlan_drive_info,
941 .maxlen = ARLAN_STR_SIZE, 935 .maxlen = ARLAN_STR_SIZE,
942 .mode = 0400, 936 .mode = 0400,
943 .proc_handler = &arlan_sysctl_info, 937 .proc_handler = arlan_sysctl_info,
944 }, 938 },
945#endif 939#endif
946 { 940 {
947 .ctl_name = 155,
948 .procname = "config0", 941 .procname = "config0",
949 .data = &conf_reset_result, 942 .data = &conf_reset_result,
950 .maxlen = 100, 943 .maxlen = 100,
951 .mode = 0400, 944 .mode = 0400,
952 .proc_handler = &arlan_configure 945 .proc_handler = arlan_configure
953 }, 946 },
954 { 947 {
955 .ctl_name = 156,
956 .procname = "reset0", 948 .procname = "reset0",
957 .data = &conf_reset_result, 949 .data = &conf_reset_result,
958 .maxlen = 100, 950 .maxlen = 100,
959 .mode = 0400, 951 .mode = 0400,
960 .proc_handler = &arlan_sysctl_reset, 952 .proc_handler = arlan_sysctl_reset,
961 }, 953 },
962 { .ctl_name = 0 } 954 { }
963}; 955};
964 956
965static ctl_table arlan_conf_table1[] = 957static ctl_table arlan_conf_table1[] =
@@ -969,63 +961,56 @@ static ctl_table arlan_conf_table1[] =
969 961
970#ifdef ARLAN_PROC_SHM_DUMP 962#ifdef ARLAN_PROC_SHM_DUMP
971 { 963 {
972 .ctl_name = 150,
973 .procname = "arlan1-txRing", 964 .procname = "arlan1-txRing",
974 .data = &arlan_drive_info, 965 .data = &arlan_drive_info,
975 .maxlen = ARLAN_STR_SIZE, 966 .maxlen = ARLAN_STR_SIZE,
976 .mode = 0400, 967 .mode = 0400,
977 .proc_handler = &arlan_sysctl_infotxRing, 968 .proc_handler = arlan_sysctl_infotxRing,
978 }, 969 },
979 { 970 {
980 .ctl_name = 151,
981 .procname = "arlan1-rxRing", 971 .procname = "arlan1-rxRing",
982 .data = &arlan_drive_info, 972 .data = &arlan_drive_info,
983 .maxlen = ARLAN_STR_SIZE, 973 .maxlen = ARLAN_STR_SIZE,
984 .mode = 0400, 974 .mode = 0400,
985 .proc_handler = &arlan_sysctl_inforxRing, 975 .proc_handler = arlan_sysctl_inforxRing,
986 }, 976 },
987 { 977 {
988 .ctl_name = 152,
989 .procname = "arlan1-18", 978 .procname = "arlan1-18",
990 .data = &arlan_drive_info, 979 .data = &arlan_drive_info,
991 .maxlen = ARLAN_STR_SIZE, 980 .maxlen = ARLAN_STR_SIZE,
992 .mode = 0400, 981 .mode = 0400,
993 .proc_handler = &arlan_sysctl_info18, 982 .proc_handler = arlan_sysctl_info18,
994 }, 983 },
995 { 984 {
996 .ctl_name = 153,
997 .procname = "arlan1-ring", 985 .procname = "arlan1-ring",
998 .data = &arlan_drive_info, 986 .data = &arlan_drive_info,
999 .maxlen = ARLAN_STR_SIZE, 987 .maxlen = ARLAN_STR_SIZE,
1000 .mode = 0400, 988 .mode = 0400,
1001 .proc_handler = &arlan_sysctl_info161719, 989 .proc_handler = arlan_sysctl_info161719,
1002 }, 990 },
1003 { 991 {
1004 .ctl_name = 154,
1005 .procname = "arlan1-shm-cpy", 992 .procname = "arlan1-shm-cpy",
1006 .data = &arlan_drive_info, 993 .data = &arlan_drive_info,
1007 .maxlen = ARLAN_STR_SIZE, 994 .maxlen = ARLAN_STR_SIZE,
1008 .mode = 0400, 995 .mode = 0400,
1009 .proc_handler = &arlan_sysctl_info, 996 .proc_handler = arlan_sysctl_info,
1010 }, 997 },
1011#endif 998#endif
1012 { 999 {
1013 .ctl_name = 155,
1014 .procname = "config1", 1000 .procname = "config1",
1015 .data = &conf_reset_result, 1001 .data = &conf_reset_result,
1016 .maxlen = 100, 1002 .maxlen = 100,
1017 .mode = 0400, 1003 .mode = 0400,
1018 .proc_handler = &arlan_configure, 1004 .proc_handler = arlan_configure,
1019 }, 1005 },
1020 { 1006 {
1021 .ctl_name = 156,
1022 .procname = "reset1", 1007 .procname = "reset1",
1023 .data = &conf_reset_result, 1008 .data = &conf_reset_result,
1024 .maxlen = 100, 1009 .maxlen = 100,
1025 .mode = 0400, 1010 .mode = 0400,
1026 .proc_handler = &arlan_sysctl_reset, 1011 .proc_handler = arlan_sysctl_reset,
1027 }, 1012 },
1028 { .ctl_name = 0 } 1013 { }
1029}; 1014};
1030 1015
1031static ctl_table arlan_conf_table2[] = 1016static ctl_table arlan_conf_table2[] =
@@ -1035,63 +1020,56 @@ static ctl_table arlan_conf_table2[] =
1035 1020
1036#ifdef ARLAN_PROC_SHM_DUMP 1021#ifdef ARLAN_PROC_SHM_DUMP
1037 { 1022 {
1038 .ctl_name = 150,
1039 .procname = "arlan2-txRing", 1023 .procname = "arlan2-txRing",
1040 .data = &arlan_drive_info, 1024 .data = &arlan_drive_info,
1041 .maxlen = ARLAN_STR_SIZE, 1025 .maxlen = ARLAN_STR_SIZE,
1042 .mode = 0400, 1026 .mode = 0400,
1043 .proc_handler = &arlan_sysctl_infotxRing, 1027 .proc_handler = arlan_sysctl_infotxRing,
1044 }, 1028 },
1045 { 1029 {
1046 .ctl_name = 151,
1047 .procname = "arlan2-rxRing", 1030 .procname = "arlan2-rxRing",
1048 .data = &arlan_drive_info, 1031 .data = &arlan_drive_info,
1049 .maxlen = ARLAN_STR_SIZE, 1032 .maxlen = ARLAN_STR_SIZE,
1050 .mode = 0400, 1033 .mode = 0400,
1051 .proc_handler = &arlan_sysctl_inforxRing, 1034 .proc_handler = arlan_sysctl_inforxRing,
1052 }, 1035 },
1053 { 1036 {
1054 .ctl_name = 152,
1055 .procname = "arlan2-18", 1037 .procname = "arlan2-18",
1056 .data = &arlan_drive_info, 1038 .data = &arlan_drive_info,
1057 .maxlen = ARLAN_STR_SIZE, 1039 .maxlen = ARLAN_STR_SIZE,
1058 .mode = 0400, 1040 .mode = 0400,
1059 .proc_handler = &arlan_sysctl_info18, 1041 .proc_handler = arlan_sysctl_info18,
1060 }, 1042 },
1061 { 1043 {
1062 .ctl_name = 153,
1063 .procname = "arlan2-ring", 1044 .procname = "arlan2-ring",
1064 .data = &arlan_drive_info, 1045 .data = &arlan_drive_info,
1065 .maxlen = ARLAN_STR_SIZE, 1046 .maxlen = ARLAN_STR_SIZE,
1066 .mode = 0400, 1047 .mode = 0400,
1067 .proc_handler = &arlan_sysctl_info161719, 1048 .proc_handler = arlan_sysctl_info161719,
1068 }, 1049 },
1069 { 1050 {
1070 .ctl_name = 154,
1071 .procname = "arlan2-shm-cpy", 1051 .procname = "arlan2-shm-cpy",
1072 .data = &arlan_drive_info, 1052 .data = &arlan_drive_info,
1073 .maxlen = ARLAN_STR_SIZE, 1053 .maxlen = ARLAN_STR_SIZE,
1074 .mode = 0400, 1054 .mode = 0400,
1075 .proc_handler = &arlan_sysctl_info, 1055 .proc_handler = arlan_sysctl_info,
1076 }, 1056 },
1077#endif 1057#endif
1078 { 1058 {
1079 .ctl_name = 155,
1080 .procname = "config2", 1059 .procname = "config2",
1081 .data = &conf_reset_result, 1060 .data = &conf_reset_result,
1082 .maxlen = 100, 1061 .maxlen = 100,
1083 .mode = 0400, 1062 .mode = 0400,
1084 .proc_handler = &arlan_configure, 1063 .proc_handler = arlan_configure,
1085 }, 1064 },
1086 { 1065 {
1087 .ctl_name = 156,
1088 .procname = "reset2", 1066 .procname = "reset2",
1089 .data = &conf_reset_result, 1067 .data = &conf_reset_result,
1090 .maxlen = 100, 1068 .maxlen = 100,
1091 .mode = 0400, 1069 .mode = 0400,
1092 .proc_handler = &arlan_sysctl_reset, 1070 .proc_handler = arlan_sysctl_reset,
1093 }, 1071 },
1094 { .ctl_name = 0 } 1072 { }
1095}; 1073};
1096 1074
1097static ctl_table arlan_conf_table3[] = 1075static ctl_table arlan_conf_table3[] =
@@ -1101,63 +1079,56 @@ static ctl_table arlan_conf_table3[] =
1101 1079
1102#ifdef ARLAN_PROC_SHM_DUMP 1080#ifdef ARLAN_PROC_SHM_DUMP
1103 { 1081 {
1104 .ctl_name = 150,
1105 .procname = "arlan3-txRing", 1082 .procname = "arlan3-txRing",
1106 .data = &arlan_drive_info, 1083 .data = &arlan_drive_info,
1107 .maxlen = ARLAN_STR_SIZE, 1084 .maxlen = ARLAN_STR_SIZE,
1108 .mode = 0400, 1085 .mode = 0400,
1109 .proc_handler = &arlan_sysctl_infotxRing, 1086 .proc_handler = arlan_sysctl_infotxRing,
1110 }, 1087 },
1111 { 1088 {
1112 .ctl_name = 151,
1113 .procname = "arlan3-rxRing", 1089 .procname = "arlan3-rxRing",
1114 .data = &arlan_drive_info, 1090 .data = &arlan_drive_info,
1115 .maxlen = ARLAN_STR_SIZE, 1091 .maxlen = ARLAN_STR_SIZE,
1116 .mode = 0400, 1092 .mode = 0400,
1117 .proc_handler = &arlan_sysctl_inforxRing, 1093 .proc_handler = arlan_sysctl_inforxRing,
1118 }, 1094 },
1119 { 1095 {
1120 .ctl_name = 152,
1121 .procname = "arlan3-18", 1096 .procname = "arlan3-18",
1122 .data = &arlan_drive_info, 1097 .data = &arlan_drive_info,
1123 .maxlen = ARLAN_STR_SIZE, 1098 .maxlen = ARLAN_STR_SIZE,
1124 .mode = 0400, 1099 .mode = 0400,
1125 .proc_handler = &arlan_sysctl_info18, 1100 .proc_handler = arlan_sysctl_info18,
1126 }, 1101 },
1127 { 1102 {
1128 .ctl_name = 153,
1129 .procname = "arlan3-ring", 1103 .procname = "arlan3-ring",
1130 .data = &arlan_drive_info, 1104 .data = &arlan_drive_info,
1131 .maxlen = ARLAN_STR_SIZE, 1105 .maxlen = ARLAN_STR_SIZE,
1132 .mode = 0400, 1106 .mode = 0400,
1133 .proc_handler = &arlan_sysctl_info161719, 1107 .proc_handler = arlan_sysctl_info161719,
1134 }, 1108 },
1135 { 1109 {
1136 .ctl_name = 154,
1137 .procname = "arlan3-shm-cpy", 1110 .procname = "arlan3-shm-cpy",
1138 .data = &arlan_drive_info, 1111 .data = &arlan_drive_info,
1139 .maxlen = ARLAN_STR_SIZE, 1112 .maxlen = ARLAN_STR_SIZE,
1140 .mode = 0400, 1113 .mode = 0400,
1141 .proc_handler = &arlan_sysctl_info, 1114 .proc_handler = arlan_sysctl_info,
1142 }, 1115 },
1143#endif 1116#endif
1144 { 1117 {
1145 .ctl_name = 155,
1146 .procname = "config3", 1118 .procname = "config3",
1147 .data = &conf_reset_result, 1119 .data = &conf_reset_result,
1148 .maxlen = 100, 1120 .maxlen = 100,
1149 .mode = 0400, 1121 .mode = 0400,
1150 .proc_handler = &arlan_configure, 1122 .proc_handler = arlan_configure,
1151 }, 1123 },
1152 { 1124 {
1153 .ctl_name = 156,
1154 .procname = "reset3", 1125 .procname = "reset3",
1155 .data = &conf_reset_result, 1126 .data = &conf_reset_result,
1156 .maxlen = 100, 1127 .maxlen = 100,
1157 .mode = 0400, 1128 .mode = 0400,
1158 .proc_handler = &arlan_sysctl_reset, 1129 .proc_handler = arlan_sysctl_reset,
1159 }, 1130 },
1160 { .ctl_name = 0 } 1131 { }
1161}; 1132};
1162 1133
1163 1134
@@ -1165,41 +1136,37 @@ static ctl_table arlan_conf_table3[] =
1165static ctl_table arlan_table[] = 1136static ctl_table arlan_table[] =
1166{ 1137{
1167 { 1138 {
1168 .ctl_name = 0,
1169 .procname = "arlan0", 1139 .procname = "arlan0",
1170 .maxlen = 0, 1140 .maxlen = 0,
1171 .mode = 0600, 1141 .mode = 0600,
1172 .child = arlan_conf_table0, 1142 .child = arlan_conf_table0,
1173 }, 1143 },
1174 { 1144 {
1175 .ctl_name = 0,
1176 .procname = "arlan1", 1145 .procname = "arlan1",
1177 .maxlen = 0, 1146 .maxlen = 0,
1178 .mode = 0600, 1147 .mode = 0600,
1179 .child = arlan_conf_table1, 1148 .child = arlan_conf_table1,
1180 }, 1149 },
1181 { 1150 {
1182 .ctl_name = 0,
1183 .procname = "arlan2", 1151 .procname = "arlan2",
1184 .maxlen = 0, 1152 .maxlen = 0,
1185 .mode = 0600, 1153 .mode = 0600,
1186 .child = arlan_conf_table2, 1154 .child = arlan_conf_table2,
1187 }, 1155 },
1188 { 1156 {
1189 .ctl_name = 0,
1190 .procname = "arlan3", 1157 .procname = "arlan3",
1191 .maxlen = 0, 1158 .maxlen = 0,
1192 .mode = 0600, 1159 .mode = 0600,
1193 .child = arlan_conf_table3, 1160 .child = arlan_conf_table3,
1194 }, 1161 },
1195 { .ctl_name = 0 } 1162 { }
1196}; 1163};
1197 1164
1198#else 1165#else
1199 1166
1200static ctl_table arlan_table[MAX_ARLANS + 1] = 1167static ctl_table arlan_table[] =
1201{ 1168{
1202 { .ctl_name = 0 } 1169 { }
1203}; 1170};
1204#endif 1171#endif
1205 1172
@@ -1209,22 +1176,14 @@ static ctl_table arlan_table[MAX_ARLANS + 1] =
1209static ctl_table arlan_root_table[] = 1176static ctl_table arlan_root_table[] =
1210{ 1177{
1211 { 1178 {
1212 .ctl_name = CTL_ARLAN,
1213 .procname = "arlan", 1179 .procname = "arlan",
1214 .maxlen = 0, 1180 .maxlen = 0,
1215 .mode = 0555, 1181 .mode = 0555,
1216 .child = arlan_table, 1182 .child = arlan_table,
1217 }, 1183 },
1218 { .ctl_name = 0 } 1184 { }
1219}; 1185};
1220 1186
1221/* Make sure that /proc/sys/dev is there */
1222//static ctl_table arlan_device_root_table[] =
1223//{
1224// {CTL_DEV, "dev", NULL, 0, 0555, arlan_root_table},
1225// {0}
1226//};
1227
1228 1187
1229static struct ctl_table_header *arlan_device_sysctl_header; 1188static struct ctl_table_header *arlan_device_sysctl_header;
1230 1189
@@ -1234,8 +1193,6 @@ int __init init_arlan_proc(void)
1234 int i = 0; 1193 int i = 0;
1235 if (arlan_device_sysctl_header) 1194 if (arlan_device_sysctl_header)
1236 return 0; 1195 return 0;
1237 for (i = 0; i < MAX_ARLANS && arlan_device[i]; i++)
1238 arlan_table[i].ctl_name = i + 1;
1239 arlan_device_sysctl_header = register_sysctl_table(arlan_root_table); 1196 arlan_device_sysctl_header = register_sysctl_table(arlan_root_table);
1240 if (!arlan_device_sysctl_header) 1197 if (!arlan_device_sysctl_header)
1241 return -1; 1198 return -1;
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index 8eefe56f1cbe..3f56bc086cb5 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -233,10 +233,10 @@ static int do_hardware_modes (ctl_table *table, int write,
233 return copy_to_user(result, buffer, len) ? -EFAULT : 0; 233 return copy_to_user(result, buffer, len) ? -EFAULT : 0;
234} 234}
235 235
236#define PARPORT_PORT_DIR(CHILD) { .ctl_name = 0, .procname = NULL, .mode = 0555, .child = CHILD } 236#define PARPORT_PORT_DIR(CHILD) { .procname = NULL, .mode = 0555, .child = CHILD }
237#define PARPORT_PARPORT_DIR(CHILD) { .ctl_name = DEV_PARPORT, .procname = "parport", \ 237#define PARPORT_PARPORT_DIR(CHILD) { .procname = "parport", \
238 .mode = 0555, .child = CHILD } 238 .mode = 0555, .child = CHILD }
239#define PARPORT_DEV_DIR(CHILD) { .ctl_name = CTL_DEV, .procname = "dev", .mode = 0555, .child = CHILD } 239#define PARPORT_DEV_DIR(CHILD) { .procname = "dev", .mode = 0555, .child = CHILD }
240#define PARPORT_DEVICES_ROOT_DIR { .procname = "devices", \ 240#define PARPORT_DEVICES_ROOT_DIR { .procname = "devices", \
241 .mode = 0555, .child = NULL } 241 .mode = 0555, .child = NULL }
242 242
@@ -270,7 +270,7 @@ static const struct parport_sysctl_table parport_sysctl_template = {
270 .data = NULL, 270 .data = NULL,
271 .maxlen = sizeof(int), 271 .maxlen = sizeof(int),
272 .mode = 0644, 272 .mode = 0644,
273 .proc_handler = &proc_dointvec_minmax, 273 .proc_handler = proc_dointvec_minmax,
274 .extra1 = (void*) &parport_min_spintime_value, 274 .extra1 = (void*) &parport_min_spintime_value,
275 .extra2 = (void*) &parport_max_spintime_value 275 .extra2 = (void*) &parport_max_spintime_value
276 }, 276 },
@@ -279,28 +279,28 @@ static const struct parport_sysctl_table parport_sysctl_template = {
279 .data = NULL, 279 .data = NULL,
280 .maxlen = 0, 280 .maxlen = 0,
281 .mode = 0444, 281 .mode = 0444,
282 .proc_handler = &do_hardware_base_addr 282 .proc_handler = do_hardware_base_addr
283 }, 283 },
284 { 284 {
285 .procname = "irq", 285 .procname = "irq",
286 .data = NULL, 286 .data = NULL,
287 .maxlen = 0, 287 .maxlen = 0,
288 .mode = 0444, 288 .mode = 0444,
289 .proc_handler = &do_hardware_irq 289 .proc_handler = do_hardware_irq
290 }, 290 },
291 { 291 {
292 .procname = "dma", 292 .procname = "dma",
293 .data = NULL, 293 .data = NULL,
294 .maxlen = 0, 294 .maxlen = 0,
295 .mode = 0444, 295 .mode = 0444,
296 .proc_handler = &do_hardware_dma 296 .proc_handler = do_hardware_dma
297 }, 297 },
298 { 298 {
299 .procname = "modes", 299 .procname = "modes",
300 .data = NULL, 300 .data = NULL,
301 .maxlen = 0, 301 .maxlen = 0,
302 .mode = 0444, 302 .mode = 0444,
303 .proc_handler = &do_hardware_modes 303 .proc_handler = do_hardware_modes
304 }, 304 },
305 PARPORT_DEVICES_ROOT_DIR, 305 PARPORT_DEVICES_ROOT_DIR,
306#ifdef CONFIG_PARPORT_1284 306#ifdef CONFIG_PARPORT_1284
@@ -309,35 +309,35 @@ static const struct parport_sysctl_table parport_sysctl_template = {
309 .data = NULL, 309 .data = NULL,
310 .maxlen = 0, 310 .maxlen = 0,
311 .mode = 0444, 311 .mode = 0444,
312 .proc_handler = &do_autoprobe 312 .proc_handler = do_autoprobe
313 }, 313 },
314 { 314 {
315 .procname = "autoprobe0", 315 .procname = "autoprobe0",
316 .data = NULL, 316 .data = NULL,
317 .maxlen = 0, 317 .maxlen = 0,
318 .mode = 0444, 318 .mode = 0444,
319 .proc_handler = &do_autoprobe 319 .proc_handler = do_autoprobe
320 }, 320 },
321 { 321 {
322 .procname = "autoprobe1", 322 .procname = "autoprobe1",
323 .data = NULL, 323 .data = NULL,
324 .maxlen = 0, 324 .maxlen = 0,
325 .mode = 0444, 325 .mode = 0444,
326 .proc_handler = &do_autoprobe 326 .proc_handler = do_autoprobe
327 }, 327 },
328 { 328 {
329 .procname = "autoprobe2", 329 .procname = "autoprobe2",
330 .data = NULL, 330 .data = NULL,
331 .maxlen = 0, 331 .maxlen = 0,
332 .mode = 0444, 332 .mode = 0444,
333 .proc_handler = &do_autoprobe 333 .proc_handler = do_autoprobe
334 }, 334 },
335 { 335 {
336 .procname = "autoprobe3", 336 .procname = "autoprobe3",
337 .data = NULL, 337 .data = NULL,
338 .maxlen = 0, 338 .maxlen = 0,
339 .mode = 0444, 339 .mode = 0444,
340 .proc_handler = &do_autoprobe 340 .proc_handler = do_autoprobe
341 }, 341 },
342#endif /* IEEE 1284 support */ 342#endif /* IEEE 1284 support */
343 {} 343 {}
@@ -348,7 +348,7 @@ static const struct parport_sysctl_table parport_sysctl_template = {
348 .data = NULL, 348 .data = NULL,
349 .maxlen = 0, 349 .maxlen = 0,
350 .mode = 0444, 350 .mode = 0444,
351 .proc_handler = &do_active_device 351 .proc_handler = do_active_device
352 }, 352 },
353 {} 353 {}
354 }, 354 },
@@ -386,14 +386,13 @@ parport_device_sysctl_template = {
386 .data = NULL, 386 .data = NULL,
387 .maxlen = sizeof(unsigned long), 387 .maxlen = sizeof(unsigned long),
388 .mode = 0644, 388 .mode = 0644,
389 .proc_handler = &proc_doulongvec_ms_jiffies_minmax, 389 .proc_handler = proc_doulongvec_ms_jiffies_minmax,
390 .extra1 = (void*) &parport_min_timeslice_value, 390 .extra1 = (void*) &parport_min_timeslice_value,
391 .extra2 = (void*) &parport_max_timeslice_value 391 .extra2 = (void*) &parport_max_timeslice_value
392 }, 392 },
393 }, 393 },
394 { 394 {
395 { 395 {
396 .ctl_name = 0,
397 .procname = NULL, 396 .procname = NULL,
398 .data = NULL, 397 .data = NULL,
399 .maxlen = 0, 398 .maxlen = 0,
@@ -438,7 +437,7 @@ parport_default_sysctl_table = {
438 .data = &parport_default_timeslice, 437 .data = &parport_default_timeslice,
439 .maxlen = sizeof(parport_default_timeslice), 438 .maxlen = sizeof(parport_default_timeslice),
440 .mode = 0644, 439 .mode = 0644,
441 .proc_handler = &proc_doulongvec_ms_jiffies_minmax, 440 .proc_handler = proc_doulongvec_ms_jiffies_minmax,
442 .extra1 = (void*) &parport_min_timeslice_value, 441 .extra1 = (void*) &parport_min_timeslice_value,
443 .extra2 = (void*) &parport_max_timeslice_value 442 .extra2 = (void*) &parport_max_timeslice_value
444 }, 443 },
@@ -447,7 +446,7 @@ parport_default_sysctl_table = {
447 .data = &parport_default_spintime, 446 .data = &parport_default_spintime,
448 .maxlen = sizeof(parport_default_spintime), 447 .maxlen = sizeof(parport_default_spintime),
449 .mode = 0644, 448 .mode = 0644,
450 .proc_handler = &proc_dointvec_minmax, 449 .proc_handler = proc_dointvec_minmax,
451 .extra1 = (void*) &parport_min_spintime_value, 450 .extra1 = (void*) &parport_min_spintime_value,
452 .extra2 = (void*) &parport_max_spintime_value 451 .extra2 = (void*) &parport_max_spintime_value
453 }, 452 },
@@ -455,7 +454,6 @@ parport_default_sysctl_table = {
455 }, 454 },
456 { 455 {
457 { 456 {
458 .ctl_name = DEV_PARPORT_DEFAULT,
459 .procname = "default", 457 .procname = "default",
460 .mode = 0555, 458 .mode = 0555,
461 .child = parport_default_sysctl_table.vars 459 .child = parport_default_sysctl_table.vars
@@ -495,7 +493,6 @@ int parport_proc_register(struct parport *port)
495 t->vars[6 + i].extra2 = &port->probe_info[i]; 493 t->vars[6 + i].extra2 = &port->probe_info[i];
496 494
497 t->port_dir[0].procname = port->name; 495 t->port_dir[0].procname = port->name;
498 t->port_dir[0].ctl_name = 0;
499 496
500 t->port_dir[0].child = t->vars; 497 t->port_dir[0].child = t->vars;
501 t->parport_dir[0].child = t->port_dir; 498 t->parport_dir[0].child = t->port_dir;
@@ -534,11 +531,9 @@ int parport_device_proc_register(struct pardevice *device)
534 t->dev_dir[0].child = t->parport_dir; 531 t->dev_dir[0].child = t->parport_dir;
535 t->parport_dir[0].child = t->port_dir; 532 t->parport_dir[0].child = t->port_dir;
536 t->port_dir[0].procname = port->name; 533 t->port_dir[0].procname = port->name;
537 t->port_dir[0].ctl_name = 0;
538 t->port_dir[0].child = t->devices_root_dir; 534 t->port_dir[0].child = t->devices_root_dir;
539 t->devices_root_dir[0].child = t->device_dir; 535 t->devices_root_dir[0].child = t->device_dir;
540 536
541 t->device_dir[0].ctl_name = 0;
542 t->device_dir[0].procname = device->name; 537 t->device_dir[0].procname = device->name;
543 t->device_dir[0].child = t->vars; 538 t->device_dir[0].child = t->vars;
544 t->vars[0].data = &device->timeslice; 539 t->vars[0].data = &device->timeslice;
diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c
index b44462a6c6d3..740fe405c395 100644
--- a/drivers/s390/char/sclp_async.c
+++ b/drivers/s390/char/sclp_async.c
@@ -101,18 +101,17 @@ static struct ctl_table callhome_table[] = {
101 .mode = 0644, 101 .mode = 0644,
102 .proc_handler = proc_handler_callhome, 102 .proc_handler = proc_handler_callhome,
103 }, 103 },
104 { .ctl_name = 0 } 104 {}
105}; 105};
106 106
107static struct ctl_table kern_dir_table[] = { 107static struct ctl_table kern_dir_table[] = {
108 { 108 {
109 .ctl_name = CTL_KERN,
110 .procname = "kernel", 109 .procname = "kernel",
111 .maxlen = 0, 110 .maxlen = 0,
112 .mode = 0555, 111 .mode = 0555,
113 .child = callhome_table, 112 .child = callhome_table,
114 }, 113 },
115 { .ctl_name = 0 } 114 {}
116}; 115};
117 116
118/* 117/*
diff --git a/drivers/scsi/scsi_sysctl.c b/drivers/scsi/scsi_sysctl.c
index 63a30f566f3a..2b6b93f7d8ef 100644
--- a/drivers/scsi/scsi_sysctl.c
+++ b/drivers/scsi/scsi_sysctl.c
@@ -13,26 +13,23 @@
13 13
14 14
15static ctl_table scsi_table[] = { 15static ctl_table scsi_table[] = {
16 { .ctl_name = DEV_SCSI_LOGGING_LEVEL, 16 { .procname = "logging_level",
17 .procname = "logging_level",
18 .data = &scsi_logging_level, 17 .data = &scsi_logging_level,
19 .maxlen = sizeof(scsi_logging_level), 18 .maxlen = sizeof(scsi_logging_level),
20 .mode = 0644, 19 .mode = 0644,
21 .proc_handler = &proc_dointvec }, 20 .proc_handler = proc_dointvec },
22 { } 21 { }
23}; 22};
24 23
25static ctl_table scsi_dir_table[] = { 24static ctl_table scsi_dir_table[] = {
26 { .ctl_name = DEV_SCSI, 25 { .procname = "scsi",
27 .procname = "scsi",
28 .mode = 0555, 26 .mode = 0555,
29 .child = scsi_table }, 27 .child = scsi_table },
30 { } 28 { }
31}; 29};
32 30
33static ctl_table scsi_root_table[] = { 31static ctl_table scsi_root_table[] = {
34 { .ctl_name = CTL_DEV, 32 { .procname = "dev",
35 .procname = "dev",
36 .mode = 0555, 33 .mode = 0555,
37 .child = scsi_dir_table }, 34 .child = scsi_dir_table },
38 { } 35 { }