Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e1ef7eb2
Commit
e1ef7eb2
authored
Feb 24, 2004
by
Alexander Viro
Committed by
Patrick McHardy
Feb 24, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WANROUTER]: Kill MODULE ifdefs.
parent
26b4fa1c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
76 deletions
+12
-76
drivers/net/wan/sdladrv.c
drivers/net/wan/sdladrv.c
+2
-4
drivers/net/wan/sdlamain.c
drivers/net/wan/sdlamain.c
+3
-4
net/socket.c
net/socket.c
+0
-12
net/wanrouter/wanmain.c
net/wanrouter/wanmain.c
+7
-56
No files found.
drivers/net/wan/sdladrv.c
View file @
e1ef7eb2
...
@@ -320,7 +320,7 @@ static int pci_slot_ar[MAX_S514_CARDS];
...
@@ -320,7 +320,7 @@ static int pci_slot_ar[MAX_S514_CARDS];
* Context: process
* Context: process
*/
*/
in
t
sdladrv_init
(
void
)
static
int
__ini
t
sdladrv_init
(
void
)
{
{
int
i
=
0
;
int
i
=
0
;
...
@@ -340,18 +340,16 @@ int sdladrv_init(void)
...
@@ -340,18 +340,16 @@ int sdladrv_init(void)
return
0
;
return
0
;
}
}
#ifdef MODULE
/*============================================================================
/*============================================================================
* Module 'remove' entry point.
* Module 'remove' entry point.
* o release all remaining system resources
* o release all remaining system resources
*/
*/
static
void
sdladrv_cleanup
(
void
)
static
void
__exit
sdladrv_cleanup
(
void
)
{
{
}
}
module_init
(
sdladrv_init
);
module_init
(
sdladrv_init
);
module_exit
(
sdladrv_cleanup
);
module_exit
(
sdladrv_cleanup
);
#endif
/******* Kernel APIs ********************************************************/
/******* Kernel APIs ********************************************************/
...
...
drivers/net/wan/sdlamain.c
View file @
e1ef7eb2
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
#include <linux/stddef.h>
/* offsetof(), etc. */
#include <linux/stddef.h>
/* offsetof(), etc. */
#include <linux/errno.h>
/* return codes */
#include <linux/errno.h>
/* return codes */
#include <linux/string.h>
/* inline memset(), etc. */
#include <linux/string.h>
/* inline memset(), etc. */
#include <linux/init.h>
#include <linux/slab.h>
/* kmalloc(), kfree() */
#include <linux/slab.h>
/* kmalloc(), kfree() */
#include <linux/kernel.h>
/* printk(), and other useful stuff */
#include <linux/kernel.h>
/* printk(), and other useful stuff */
#include <linux/module.h>
/* support for loadable modules */
#include <linux/module.h>
/* support for loadable modules */
...
@@ -232,7 +233,7 @@ static int wanpipe_bh_critical;
...
@@ -232,7 +233,7 @@ static int wanpipe_bh_critical;
* Context: process
* Context: process
*/
*/
in
t
wanpipe_init
(
void
)
static
int
__ini
t
wanpipe_init
(
void
)
{
{
int
cnt
,
err
=
0
;
int
cnt
,
err
=
0
;
...
@@ -297,13 +298,12 @@ int wanpipe_init(void)
...
@@ -297,13 +298,12 @@ int wanpipe_init(void)
return
err
;
return
err
;
}
}
#ifdef MODULE
/*============================================================================
/*============================================================================
* Module 'remove' entry point.
* Module 'remove' entry point.
* o unregister all adapters from the WAN router
* o unregister all adapters from the WAN router
* o release all remaining system resources
* o release all remaining system resources
*/
*/
static
void
wanpipe_cleanup
(
void
)
static
void
__exit
wanpipe_cleanup
(
void
)
{
{
int
i
;
int
i
;
...
@@ -322,7 +322,6 @@ static void wanpipe_cleanup(void)
...
@@ -322,7 +322,6 @@ static void wanpipe_cleanup(void)
module_init
(
wanpipe_init
);
module_init
(
wanpipe_init
);
module_exit
(
wanpipe_cleanup
);
module_exit
(
wanpipe_cleanup
);
#endif
/******* WAN Device Driver Entry Points *************************************/
/******* WAN Device Driver Entry Points *************************************/
...
...
net/socket.c
View file @
e1ef7eb2
...
@@ -1927,10 +1927,6 @@ int sock_unregister(int family)
...
@@ -1927,10 +1927,6 @@ int sock_unregister(int family)
extern
void
sk_init
(
void
);
extern
void
sk_init
(
void
);
#ifdef CONFIG_WAN_ROUTER
extern
void
wanrouter_init
(
void
);
#endif
void
__init
sock_init
(
void
)
void
__init
sock_init
(
void
)
{
{
int
i
;
int
i
;
...
@@ -1955,14 +1951,6 @@ void __init sock_init(void)
...
@@ -1955,14 +1951,6 @@ void __init sock_init(void)
skb_init
();
skb_init
();
#endif
#endif
/*
* Wan router layer.
*/
#ifdef CONFIG_WAN_ROUTER
wanrouter_init
();
#endif
/*
/*
* Initialize the protocols module.
* Initialize the protocols module.
*/
*/
...
...
net/wanrouter/wanmain.c
View file @
e1ef7eb2
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
#include <linux/stddef.h>
/* offsetof(), etc. */
#include <linux/stddef.h>
/* offsetof(), etc. */
#include <linux/errno.h>
/* return codes */
#include <linux/errno.h>
/* return codes */
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
/* support for loadable modules */
#include <linux/module.h>
/* support for loadable modules */
#include <linux/slab.h>
/* kmalloc(), kfree() */
#include <linux/slab.h>
/* kmalloc(), kfree() */
#include <linux/mm.h>
/* verify_area(), etc. */
#include <linux/mm.h>
/* verify_area(), etc. */
...
@@ -164,13 +165,9 @@ static unsigned char wanrouter_oui_ether[] = { 0x00, 0x00, 0x00 };
...
@@ -164,13 +165,9 @@ static unsigned char wanrouter_oui_ether[] = { 0x00, 0x00, 0x00 };
static unsigned char wanrouter_oui_802_2[] = { 0x00, 0x80, 0xC2 };
static unsigned char wanrouter_oui_802_2[] = { 0x00, 0x80, 0xC2 };
#endif
#endif
#ifndef MODULE
static
int
__init
wanrouter_init
(
void
)
int
wanrouter_init
(
void
)
{
{
int
err
;
int
err
;
extern
int
wanpipe_init
(
void
);
extern
int
sdladrv_init
(
void
);
printk
(
KERN_INFO
"%s v%u.%u %s
\n
"
,
printk
(
KERN_INFO
"%s v%u.%u %s
\n
"
,
wanrouter_fullname
,
ROUTER_VERSION
,
ROUTER_RELEASE
,
wanrouter_fullname
,
ROUTER_VERSION
,
ROUTER_RELEASE
,
...
@@ -181,15 +178,6 @@ int wanrouter_init(void)
...
@@ -181,15 +178,6 @@ int wanrouter_init(void)
printk
(
KERN_INFO
"%s: can't create entry in proc filesystem!
\n
"
,
printk
(
KERN_INFO
"%s: can't create entry in proc filesystem!
\n
"
,
wanrouter_modname
);
wanrouter_modname
);
/*
* Initialise compiled in boards
*/
#ifdef CONFIG_VENDOR_SANGOMA
sdladrv_init
();
wanpipe_init
();
#endif
return
err
;
return
err
;
}
}
...
@@ -198,50 +186,13 @@ static void __exit wanrouter_cleanup (void)
...
@@ -198,50 +186,13 @@ static void __exit wanrouter_cleanup (void)
wanrouter_proc_cleanup
();
wanrouter_proc_cleanup
();
}
}
#else
/*
* Kernel Loadable Module Entry Points
*/
/*
/*
* Module 'insert' entry point.
* This is just plain dumb. We should move the bugger to drivers/net/wan,
* o print announcement
* slap it first in directory and make it module_init(). The only reason
* o initialize static data
* for subsys_initcall() here is that net goes after drivers (why, BTW?)
* o create /proc/net/router directory and static entries
*
* Return: 0 Ok
* < 0 error.
* Context: process
*/
*/
subsys_initcall
(
wanrouter_init
)
int
init_module
(
void
)
module_exit
(
wanrouter_cleanup
)
{
int
err
;
printk
(
KERN_INFO
"%s v%u.%u %s
\n
"
,
wanrouter_fullname
,
ROUTER_VERSION
,
ROUTER_RELEASE
,
wanrouter_copyright
);
err
=
wanrouter_proc_init
();
if
(
err
)
printk
(
KERN_INFO
"%s: can't create entry in proc filesystem!
\n
"
,
wanrouter_modname
);
return
err
;
}
/*
* Module 'remove' entry point.
* o delete /proc/net/router directory and static entries.
*/
void
cleanup_module
(
void
)
{
wanrouter_proc_cleanup
();
}
#endif
/*
/*
* Kernel APIs
* Kernel APIs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment