diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-24 01:54:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-24 01:54:03 -0400 |
commit | 06802a819a0a2d31c952c0624cea6cd00e4e50da (patch) | |
tree | 8ccd7c668c7fbd8f08cb89426006040217caf3f1 /net/atm | |
parent | 9bd512f619cc116b7830134d7c9f6e404a38c7bf (diff) | |
parent | 8f3ea33a5078a09eba12bfe57424507809367756 (diff) |
Merge branch 'master' of ../net-2.6/
Conflicts:
net/ipv6/ndisc.c
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/clip.c | 19 | ||||
-rw-r--r-- | net/atm/lec.c | 4 |
2 files changed, 20 insertions, 3 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c index d45971bd286c..e82da6746723 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -943,6 +943,8 @@ static const struct file_operations arp_seq_fops = { | |||
943 | }; | 943 | }; |
944 | #endif | 944 | #endif |
945 | 945 | ||
946 | static void atm_clip_exit_noproc(void); | ||
947 | |||
946 | static int __init atm_clip_init(void) | 948 | static int __init atm_clip_init(void) |
947 | { | 949 | { |
948 | neigh_table_init_no_netlink(&clip_tbl); | 950 | neigh_table_init_no_netlink(&clip_tbl); |
@@ -959,18 +961,22 @@ static int __init atm_clip_init(void) | |||
959 | struct proc_dir_entry *p; | 961 | struct proc_dir_entry *p; |
960 | 962 | ||
961 | p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); | 963 | p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); |
964 | if (!p) { | ||
965 | printk(KERN_ERR "Unable to initialize " | ||
966 | "/proc/net/atm/arp\n"); | ||
967 | atm_clip_exit_noproc(); | ||
968 | return -ENOMEM; | ||
969 | } | ||
962 | } | 970 | } |
963 | #endif | 971 | #endif |
964 | 972 | ||
965 | return 0; | 973 | return 0; |
966 | } | 974 | } |
967 | 975 | ||
968 | static void __exit atm_clip_exit(void) | 976 | static void atm_clip_exit_noproc(void) |
969 | { | 977 | { |
970 | struct net_device *dev, *next; | 978 | struct net_device *dev, *next; |
971 | 979 | ||
972 | remove_proc_entry("arp", atm_proc_root); | ||
973 | |||
974 | unregister_inetaddr_notifier(&clip_inet_notifier); | 980 | unregister_inetaddr_notifier(&clip_inet_notifier); |
975 | unregister_netdevice_notifier(&clip_dev_notifier); | 981 | unregister_netdevice_notifier(&clip_dev_notifier); |
976 | 982 | ||
@@ -1001,6 +1007,13 @@ static void __exit atm_clip_exit(void) | |||
1001 | clip_tbl_hook = NULL; | 1007 | clip_tbl_hook = NULL; |
1002 | } | 1008 | } |
1003 | 1009 | ||
1010 | static void __exit atm_clip_exit(void) | ||
1011 | { | ||
1012 | remove_proc_entry("arp", atm_proc_root); | ||
1013 | |||
1014 | atm_clip_exit_noproc(); | ||
1015 | } | ||
1016 | |||
1004 | module_init(atm_clip_init); | 1017 | module_init(atm_clip_init); |
1005 | module_exit(atm_clip_exit); | 1018 | module_exit(atm_clip_exit); |
1006 | MODULE_AUTHOR("Werner Almesberger"); | 1019 | MODULE_AUTHOR("Werner Almesberger"); |
diff --git a/net/atm/lec.c b/net/atm/lec.c index e2d800d818e3..aa3785ebf6d1 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -1225,6 +1225,10 @@ static int __init lane_module_init(void) | |||
1225 | struct proc_dir_entry *p; | 1225 | struct proc_dir_entry *p; |
1226 | 1226 | ||
1227 | p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops); | 1227 | p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops); |
1228 | if (!p) { | ||
1229 | printk(KERN_ERR "Unable to initialize /proc/net/atm/lec\n"); | ||
1230 | return -ENOMEM; | ||
1231 | } | ||
1228 | #endif | 1232 | #endif |
1229 | 1233 | ||
1230 | register_atm_ioctl(&lane_ioctl_ops); | 1234 | register_atm_ioctl(&lane_ioctl_ops); |