[package] ppp: use service_kill()
[openwrt.git] / package / ar7-atm / patches-D7.04.03.00 / 190-2.6.32_proc_fixes.patch
1 Index: sangam_atm-D7.04.03.00/tn7dsl.c
2 ===================================================================
3 --- sangam_atm-D7.04.03.00.orig/tn7dsl.c 2010-08-26 09:36:54.000000000 +0200
4 +++ sangam_atm-D7.04.03.00/tn7dsl.c 2010-08-26 10:18:47.000000000 +0200
5 @@ -203,7 +203,11 @@
6 static struct led_funcs ledreg[2];
7 #endif
8
9 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
10 #define DEV_DSLMOD CTL_UNNUMBERED
11 +#else
12 +#define DEV_DSLMOD 0
13 +#endif
14 #define MAX_STR_SIZE 256
15 #define DSL_MOD_SIZE 256
16
17 @@ -3431,9 +3435,16 @@
18 */
19 if(write)
20 {
21 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
22 ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
23 -
24 +#else
25 + ret = proc_dostring(ctl, write, buffer, lenp, 0);
26 +#endif
27 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
28 switch (ctl->ctl_name)
29 +#else
30 + switch ((long)ctl->extra2)
31 +#endif
32 {
33 case DEV_DSLMOD:
34 ptr = strpbrk(info, " \t");
35 @@ -3517,14 +3528,22 @@
36 else
37 {
38 len += sprintf(info+len, mod_req);
39 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
40 ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
41 +#else
42 + ret = proc_dostring(ctl, write, buffer, lenp, 0);
43 +#endif
44 }
45 return ret;
46 }
47
48
49 ctl_table dslmod_table[] = {
50 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
51 {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
52 +#else
53 + {"dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, NULL, (void *)DEV_DSLMOD}
54 +#endif
55 ,
56 {0}
57 };
This page took 0.041079 seconds and 5 git commands to generate.