ar7-atm: drop LINUX_VERSION tests
[openwrt/staging/rmilecki.git] / package / kernel / ar7-atm / patches-D7.04.03.00 / 190-2.6.32_proc_fixes.patch
1 --- a/tn7dsl.c
2 +++ b/tn7dsl.c
3 @@ -197,7 +197,7 @@ led_reg_t ledreg[2];
4 static struct led_funcs ledreg[2];
5 #endif
6
7 -#define DEV_DSLMOD CTL_UNNUMBERED
8 +#define DEV_DSLMOD 0
9 #define MAX_STR_SIZE 256
10 #define DSL_MOD_SIZE 256
11
12 @@ -3421,9 +3421,9 @@ static int dslmod_sysctl(ctl_table *ctl,
13 */
14 if(write)
15 {
16 - ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
17 + ret = proc_dostring(ctl, write, buffer, lenp, 0);
18
19 - switch (ctl->ctl_name)
20 + switch ((long)ctl->extra2)
21 {
22 case DEV_DSLMOD:
23 ptr = strpbrk(info, " \t");
24 @@ -3507,14 +3507,21 @@ static int dslmod_sysctl(ctl_table *ctl,
25 else
26 {
27 len += sprintf(info+len, mod_req);
28 - ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
29 + ret = proc_dostring(ctl, write, buffer, lenp, 0);
30 }
31 return ret;
32 }
33
34
35 ctl_table dslmod_table[] = {
36 - {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
37 + {
38 + .procname = "dslmod",
39 + .data = info,
40 + .maxlen = DSL_MOD_SIZE,
41 + .mode = 0644,
42 + .proc_handler = &dslmod_sysctl,
43 + .extra2 = (void *)DEV_DSLMOD,
44 + }
45 ,
46 {0}
47 };
48 @@ -3522,7 +3529,12 @@ ctl_table dslmod_table[] = {
49 /* Make sure that /proc/sys/dev is there */
50 ctl_table dslmod_root_table[] = {
51 #ifdef CONFIG_PROC_FS
52 - {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table}
53 + {
54 + .procname = "dev",
55 + .maxlen = 0,
56 + .mode = 0555,
57 + .child = dslmod_table,
58 + }
59 ,
60 #endif /* CONFIG_PROC_FS */
61 {0}