aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cdrom/cdrom.c8
-rw-r--r--drivers/char/hpet.c9
-rw-r--r--drivers/char/ipmi/ipmi_poweroff.c9
-rw-r--r--drivers/char/pty.c10
-rw-r--r--drivers/char/random.c42
-rw-r--r--drivers/char/rtc.c9
-rw-r--r--drivers/macintosh/mac_hid.c11
-rw-r--r--drivers/md/md.c10
-rw-r--r--drivers/parport/procfs.c11
-rw-r--r--drivers/scsi/scsi_sysctl.c9
10 files changed, 27 insertions, 101 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 614da5b8613a..1872b6dc168a 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3594,30 +3594,28 @@ static ctl_table cdrom_table[] = {
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..a05a6112240b 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..aa39722696dd 100644
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -660,8 +660,7 @@ 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,
@@ -670,16 +669,14 @@ static ctl_table ipmi_table[] = {
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..d516e9ced3c2 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..bcf680f9ff58 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1257,40 +1257,9 @@ 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),
@@ -1298,7 +1267,6 @@ ctl_table random_table[] = {
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,
@@ -1306,45 +1274,37 @@ ctl_table random_table[] = {
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..37bfe23c218e 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..2dd29b42a49e 100644
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -27,7 +27,6 @@ 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),
@@ -35,7 +34,6 @@ static ctl_table mac_hid_files[] = {
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),
@@ -43,38 +41,35 @@ static ctl_table mac_hid_files[] = {
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 10eb1fce975e..e9cad8889cf9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -98,7 +98,6 @@ 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),
@@ -106,36 +105,33 @@ static ctl_table raid_table[] = {
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/parport/procfs.c b/drivers/parport/procfs.c
index 8eefe56f1cbe..f808bdbf1772 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
@@ -393,7 +393,6 @@ parport_device_sysctl_template = {
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,
@@ -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/scsi/scsi_sysctl.c b/drivers/scsi/scsi_sysctl.c
index 63a30f566f3a..42c31bee7113 100644
--- a/drivers/scsi/scsi_sysctl.c
+++ b/drivers/scsi/scsi_sysctl.c
@@ -13,8 +13,7 @@
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,
@@ -23,16 +22,14 @@ static ctl_table scsi_table[] = {
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 { }