ltq-vectoring: add driver
[openwrt/staging/chunkeey.git] / package / kernel / lantiq / ltq-vectoring / patches / 100-cleanup.patch
1 --- a/src/vectoring/ifxmips_vectoring.c
2 +++ b/src/vectoring/ifxmips_vectoring.c
3 @@ -325,7 +325,7 @@ static int proc_write_dbg(struct file *f
4 else
5 printk(dbg_enable_mask_str[i] + 1);
6 }
7 - printk("] > /proc/vectoring\n");
8 + printk("] > /proc/driver/vectoring\n");
9 }
10
11 if ( f_enable )
12 @@ -433,11 +433,10 @@ static int __init vectoring_init(void)
13 {
14 struct proc_dir_entry *res;
15
16 - res = proc_create("vectoring",
17 + res = proc_create("driver/vectoring",
18 S_IRUGO|S_IWUSR,
19 0,
20 &g_proc_file_vectoring_dbg_seq_fops);
21 - printk("res = %p\n", res);
22
23 register_netdev_event_handler();
24 g_ptm_net_dev = dev_get_by_name(&init_net, "ptm0");
25 @@ -460,7 +459,7 @@ static void __exit vectoring_exit(void)
26
27 unregister_netdev_event_handler();
28
29 - remove_proc_entry("vectoring", NULL);
30 + remove_proc_entry("driver/vectoring", NULL);
31 }
32
33 module_init(vectoring_init);
34 --- a/src/vectoring/ifxmips_vectoring_test.c
35 +++ b/src/vectoring/ifxmips_vectoring_test.c
36 @@ -79,7 +79,7 @@ static int proc_write_vectoring(struct f
37 }
38 }
39 else
40 - printk("echo send <size> > /proc/eth/vectoring\n");
41 + printk("echo send <size> > /proc/driver/vectoring_test\n");
42
43 return count;
44 }
45 @@ -112,9 +112,7 @@ static __init void proc_file_create(void
46 {
47 struct proc_dir_entry *res;
48
49 -// g_proc_dir = proc_mkdir("eth", NULL);
50 -
51 - res = proc_create("eth/vectoring",
52 + res = proc_create("driver/vectoring_test",
53 S_IRUGO|S_IWUSR,
54 g_proc_dir,
55 &g_proc_file_vectoring_seq_fops);
56 @@ -122,10 +120,7 @@ static __init void proc_file_create(void
57
58 static __exit void proc_file_delete(void)
59 {
60 - remove_proc_entry("vectoring",
61 - g_proc_dir);
62 -
63 - remove_proc_entry("eth", NULL);
64 + remove_proc_entry("driver/vectoring_test", NULL);
65 }
66
67
68 @@ -151,3 +146,5 @@ static void __exit vectoring_test_exit(v
69
70 module_init(vectoring_test_init);
71 module_exit(vectoring_test_exit);
72 +
73 +MODULE_LICENSE("GPL");