3 @@ -203,7 +203,11 @@ led_reg_t ledreg[2];
4 static struct led_funcs ledreg[2];
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
8 #define DEV_DSLMOD CTL_UNNUMBERED
12 #define MAX_STR_SIZE 256
13 #define DSL_MOD_SIZE 256
15 @@ -3431,9 +3435,16 @@ static int dslmod_sysctl(ctl_table *ctl,
19 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
20 ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
23 + ret = proc_dostring(ctl, write, buffer, lenp, 0);
25 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
26 switch (ctl->ctl_name)
28 + switch ((long)ctl->extra2)
32 ptr = strpbrk(info, " \t");
33 @@ -3517,14 +3528,29 @@ static int dslmod_sysctl(ctl_table *ctl,
36 len += sprintf(info+len, mod_req);
37 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
38 ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
40 + ret = proc_dostring(ctl, write, buffer, lenp, 0);
47 ctl_table dslmod_table[] = {
48 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
49 {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
52 + .procname = "dslmod",
54 + .maxlen = DSL_MOD_SIZE,
56 + .proc_handler = &dslmod_sysctl,
57 + .extra2 = (void *)DEV_DSLMOD,
63 @@ -3532,7 +3558,16 @@ ctl_table dslmod_table[] = {
64 /* Make sure that /proc/sys/dev is there */
65 ctl_table dslmod_root_table[] = {
67 + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
68 {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table}
74 + .child = dslmod_table,
78 #endif /* CONFIG_PROC_FS */