summaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-01-10 17:17:53 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-01-10 17:17:53 +0000
commitb2ad5f821b1381492d792ca10b1eb7a107b48f14 (patch)
tree954a648692e7da983db1d2470953705f6a729264 /net/netrom
parentc9c06167e7933d93a6e396174c68abf242294abb (diff)
Merge with Linux 2.4.0-prerelease. Big Makefile rewrite, test your
Makefiles.
Diffstat (limited to 'net/netrom')
-rw-r--r--net/netrom/Makefile9
-rw-r--r--net/netrom/af_netrom.c17
-rw-r--r--net/netrom/nr_dev.c3
-rw-r--r--net/netrom/nr_in.c4
-rw-r--r--net/netrom/nr_loopback.c11
-rw-r--r--net/netrom/nr_out.c4
-rw-r--r--net/netrom/nr_route.c15
-rw-r--r--net/netrom/nr_subr.c4
-rw-r--r--net/netrom/nr_timer.c4
9 files changed, 13 insertions, 58 deletions
diff --git a/net/netrom/Makefile b/net/netrom/Makefile
index 1afcfd8e7..e44e36144 100644
--- a/net/netrom/Makefile
+++ b/net/netrom/Makefile
@@ -8,13 +8,12 @@
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := netrom.o
-O_OBJS := af_netrom.o nr_dev.o nr_in.o nr_loopback.o nr_out.o nr_route.o \
+
+obj-y := af_netrom.o nr_dev.o nr_in.o nr_loopback.o nr_out.o nr_route.o \
nr_subr.o nr_timer.o
-M_OBJS := $(O_TARGET)
+obj-m := $(O_TARGET)
-ifeq ($(CONFIG_SYSCTL),y)
-O_OBJS += sysctl_net_netrom.o
-endif
+obj-$(CONFIG_SYSCTL) += sysctl_net_netrom.o
include $(TOPDIR)/Rules.make
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index a0c139b3a..a4b89d294 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -34,7 +34,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/types.h>
@@ -82,7 +81,7 @@ int sysctl_netrom_link_fails_count = NR_DEFAULT_FAILS;
static unsigned short circuit = 0x101;
-static struct sock *volatile nr_list = NULL;
+static struct sock *volatile nr_list;
static struct proto_ops nr_proto_ops;
@@ -1280,7 +1279,7 @@ static int __init nr_proto_init(void)
sock_register(&nr_family_ops);
register_netdevice_notifier(&nr_dev_notifier);
- printk(KERN_INFO "G4KLX NET/ROM for Linux. Version 0.7 for AX25.037 Linux 2.1\n");
+ printk(KERN_INFO "G4KLX NET/ROM for Linux. Version 0.7 for AX25.037 Linux 2.4\n");
ax25_protocol_register(AX25_P_NETROM, nr_route_frame);
ax25_linkfail_register(nr_link_failed);
@@ -1291,18 +1290,15 @@ static int __init nr_proto_init(void)
nr_loopback_init();
-#ifdef CONFIG_PROC_FS
proc_net_create("nr", 0, nr_get_info);
proc_net_create("nr_neigh", 0, nr_neigh_get_info);
proc_net_create("nr_nodes", 0, nr_nodes_get_info);
-#endif
return 0;
}
module_init(nr_proto_init);
-#ifdef MODULE
EXPORT_NO_SYMBOLS;
MODULE_PARM(nr_ndevs, "i");
@@ -1311,15 +1307,13 @@ MODULE_PARM_DESC(nr_ndevs, "number of NET/ROM devices");
MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");
MODULE_DESCRIPTION("The amateur radio NET/ROM network and transport layer protocol");
-static void nr_exit(void)
+static void __exit nr_exit(void)
{
int i;
-#ifdef CONFIG_PROC_FS
proc_net_remove("nr");
proc_net_remove("nr_neigh");
proc_net_remove("nr_nodes");
-#endif
nr_loopback_clear();
nr_rt_free();
@@ -1346,8 +1340,3 @@ static void nr_exit(void)
kfree(dev_nr);
}
module_exit(nr_exit);
-#endif /* MODULE */
-
-
-
-#endif
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c
index 1625d1c90..d5a472703 100644
--- a/net/netrom/nr_dev.c
+++ b/net/netrom/nr_dev.c
@@ -19,7 +19,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/proc_fs.h>
@@ -236,5 +235,3 @@ int nr_init(struct net_device *dev)
return 0;
};
-
-#endif
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c
index fadf69de8..29762e929 100644
--- a/net/netrom/nr_in.c
+++ b/net/netrom/nr_in.c
@@ -24,8 +24,6 @@
* NET/ROM 007 Jonathan(G4KLX) New timer architecture.
*/
-#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -304,5 +302,3 @@ int nr_process_rx_frame(struct sock *sk, struct sk_buff *skb)
return queued;
}
-
-#endif
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c
index fc0665de2..5290ae024 100644
--- a/net/netrom/nr_loopback.c
+++ b/net/netrom/nr_loopback.c
@@ -15,14 +15,13 @@
*
*/
-#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/timer.h>
#include <net/ax25.h>
#include <linux/skbuff.h>
#include <net/netrom.h>
+#include <linux/init.h>
static struct sk_buff_head loopback_queue;
static struct timer_list loopback_timer;
@@ -91,9 +90,7 @@ static void nr_loopback_timer(unsigned long param)
}
}
-#ifdef MODULE
-
-void nr_loopback_clear(void)
+void __exit nr_loopback_clear(void)
{
struct sk_buff *skb;
@@ -102,7 +99,3 @@ void nr_loopback_clear(void)
while ((skb = skb_dequeue(&loopback_queue)) != NULL)
kfree_skb(skb);
}
-
-#endif
-
-#endif
diff --git a/net/netrom/nr_out.c b/net/netrom/nr_out.c
index 93da60adb..090068988 100644
--- a/net/netrom/nr_out.c
+++ b/net/netrom/nr_out.c
@@ -16,8 +16,6 @@
* NET/ROM 007 Jonathan(G4KLX) New timer architecture.
*/
-#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -272,5 +270,3 @@ void nr_check_iframes_acked(struct sock *sk, unsigned short nr)
}
}
}
-
-#endif
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 308e73af2..ec0578b51 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -21,8 +21,6 @@
* Tomi(OH2BNS) Routing quality and link failure changes.
*/
-#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -48,12 +46,13 @@
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/netfilter.h>
+#include <linux/init.h>
#include <net/netrom.h>
static unsigned int nr_neigh_no = 1;
-static struct nr_node *nr_node_list = NULL;
-static struct nr_neigh *nr_neigh_list = NULL;
+static struct nr_node *nr_node_list;
+static struct nr_neigh *nr_neigh_list;
static void nr_remove_neigh(struct nr_neigh *);
@@ -850,12 +849,10 @@ int nr_neigh_get_info(char *buffer, char **start, off_t offset, int length)
return len;
}
-#ifdef MODULE
-
/*
* Free all memory associated with the nodes and routes lists.
*/
-void nr_rt_free(void)
+void __exit nr_rt_free(void)
{
struct nr_neigh *s, *nr_neigh = nr_neigh_list;
struct nr_node *t, *nr_node = nr_node_list;
@@ -874,7 +871,3 @@ void nr_rt_free(void)
nr_remove_neigh(s);
}
}
-
-#endif
-
-#endif
diff --git a/net/netrom/nr_subr.c b/net/netrom/nr_subr.c
index 096ca3a8f..fee0478fa 100644
--- a/net/netrom/nr_subr.c
+++ b/net/netrom/nr_subr.c
@@ -15,8 +15,6 @@
* NET/ROM 007 Jonathan(G4KLX) New timer architecture.
*/
-#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -297,5 +295,3 @@ void nr_disconnect(struct sock *sk, int reason)
sk->dead = 1;
}
-
-#endif
diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c
index ac62ad54a..116770434 100644
--- a/net/netrom/nr_timer.c
+++ b/net/netrom/nr_timer.c
@@ -15,8 +15,6 @@
* Implemented idle timer.
*/
-#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -245,5 +243,3 @@ static void nr_t1timer_expiry(unsigned long param)
nr_start_t1timer(sk);
}
-
-#endif