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
nexedi
linux
Commits
4ad50851
Commit
4ad50851
authored
May 21, 2003
by
Christoph Hellwig
Committed by
David S. Miller
May 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Switch arcnet over to initcalls.
parent
73baeace
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
132 deletions
+42
-132
drivers/net/arcnet/arc-rawmode.c
drivers/net/arcnet/arc-rawmode.c
+7
-13
drivers/net/arcnet/arcnet.c
drivers/net/arcnet/arcnet.c
+9
-39
drivers/net/arcnet/com20020-isa.c
drivers/net/arcnet/com20020-isa.c
+0
-4
drivers/net/arcnet/com20020-pci.c
drivers/net/arcnet/com20020-pci.c
+0
-3
drivers/net/arcnet/com90io.c
drivers/net/arcnet/com90io.c
+0
-4
drivers/net/arcnet/com90xx.c
drivers/net/arcnet/com90xx.c
+13
-28
drivers/net/arcnet/rfc1051.c
drivers/net/arcnet/rfc1051.c
+7
-14
drivers/net/arcnet/rfc1201.c
drivers/net/arcnet/rfc1201.c
+6
-14
drivers/net/setup.c
drivers/net/setup.c
+0
-4
include/linux/arcdevice.h
include/linux/arcdevice.h
+0
-9
No files found.
drivers/net/arcnet/arc-rawmode.c
View file @
4ad50851
...
...
@@ -53,10 +53,12 @@ struct ArcProto rawmode_proto =
};
void
arcnet_raw_init
(
void
)
static
int
__init
arcnet_raw_init
(
void
)
{
int
count
;
printk
(
VERSION
);
for
(
count
=
0
;
count
<
256
;
count
++
)
if
(
arc_proto_map
[
count
]
==
arc_proto_default
)
arc_proto_map
[
count
]
=
&
rawmode_proto
;
...
...
@@ -66,26 +68,18 @@ void arcnet_raw_init(void)
arc_bcast_proto
=
&
rawmode_proto
;
arc_proto_default
=
&
rawmode_proto
;
}
#ifdef MODULE
int
__init
init_module
(
void
)
{
printk
(
VERSION
);
arcnet_raw_init
();
return
0
;
}
void
cleanup_module
(
void
)
static
void
__exit
arcnet_raw_exit
(
void
)
{
arcnet_unregister_proto
(
&
rawmode_proto
);
}
MODULE_LICENSE
(
"GPL"
);
#endif
/* MODULE */
module_init
(
arcnet_raw_init
);
module_exit
(
arcnet_raw_exit
);
MODULE_LICENSE
(
"GPL"
);
/* packet receiver */
...
...
drivers/net/arcnet/arcnet.c
View file @
4ad50851
...
...
@@ -106,13 +106,15 @@ static int arcnet_rebuild_header(struct sk_buff *skb);
static
struct
net_device_stats
*
arcnet_get_stats
(
struct
net_device
*
dev
);
static
int
go_tx
(
struct
net_device
*
dev
);
void
__init
arcnet_init
(
void
)
static
int
debug
=
ARCNET_DEBUG
;
MODULE_PARM
(
debug
,
"i"
);
MODULE_LICENSE
(
"GPL"
);
static
int
__init
arcnet_init
(
void
)
{
static
int
arcnet_inited
;
int
count
;
if
(
arcnet_inited
++
)
return
;
arcnet_debug
=
debug
;
printk
(
VERSION
);
...
...
@@ -138,47 +140,15 @@ void __init arcnet_init(void)
sizeof
(
struct
arc_rfc1051
),
sizeof
(
struct
arc_eth_encap
),
sizeof
(
struct
archdr
));
#ifdef CONFIG_ARCNET
/* We're not built as a module */
printk
(
"arcnet: Available protocols:"
);
#ifdef CONFIG_ARCNET_1201
printk
(
" RFC1201"
);
arcnet_rfc1201_init
();
#endif
#ifdef CONFIG_ARCNET_1051
printk
(
" RFC1051"
);
arcnet_rfc1051_init
();
#endif
#ifdef CONFIG_ARCNET_RAW
printk
(
" RAW"
);
arcnet_raw_init
();
#endif
printk
(
"
\n
"
);
#ifdef CONFIG_ARCNET_COM90xx
com90xx_probe
(
NULL
);
#endif
#endif
}
#ifdef MODULE
static
int
debug
=
ARCNET_DEBUG
;
MODULE_PARM
(
debug
,
"i"
);
MODULE_LICENSE
(
"GPL"
);
int
__init
init_module
(
void
)
{
arcnet_debug
=
debug
;
arcnet_init
();
return
0
;
}
void
cleanup_module
(
void
)
static
void
__exit
arcnet_exit
(
void
)
{
}
#endif
module_init
(
arcnet_init
);
module_exit
(
arcnet_exit
);
/*
* Dump the contents of an sk_buff
...
...
drivers/net/arcnet/com20020-isa.c
View file @
4ad50851
...
...
@@ -54,10 +54,6 @@ static int __init com20020isa_probe(struct net_device *dev)
unsigned
long
airqmask
;
struct
arcnet_local
*
lp
=
dev
->
priv
;
#ifndef MODULE
arcnet_init
();
#endif
BUGLVL
(
D_NORMAL
)
printk
(
VERSION
);
ioaddr
=
dev
->
base_addr
;
...
...
drivers/net/arcnet/com20020-pci.c
View file @
4ad50851
...
...
@@ -183,9 +183,6 @@ static struct pci_driver com20020pci_driver = {
static
int
__init
com20020pci_init
(
void
)
{
BUGLVL
(
D_NORMAL
)
printk
(
VERSION
);
#ifndef MODULE
arcnet_init
();
#endif
return
pci_module_init
(
&
com20020pci_driver
);
}
...
...
drivers/net/arcnet/com90io.c
View file @
4ad50851
...
...
@@ -151,10 +151,6 @@ static int __init com90io_probe(struct net_device *dev)
int
ioaddr
=
dev
->
base_addr
,
status
;
unsigned
long
airqmask
;
#ifndef MODULE
arcnet_init
();
#endif
BUGLVL
(
D_NORMAL
)
printk
(
VERSION
);
BUGLVL
(
D_NORMAL
)
printk
(
"E-mail me if you actually test this driver, please!
\n
"
);
...
...
drivers/net/arcnet/com90xx.c
View file @
4ad50851
...
...
@@ -29,7 +29,6 @@
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/bootmem.h>
#include <asm/io.h>
#include <linux/arcdevice.h>
...
...
@@ -100,7 +99,7 @@ static int numcards;
static
int
com90xx_skip_probe
__initdata
=
0
;
int
__init
com90xx_probe
(
struct
net_device
*
dev
)
static
int
__init
com90xx_probe
(
struct
net_device
*
dev
)
{
int
count
,
status
,
ioaddr
,
numprint
,
airq
,
retval
=
-
ENODEV
,
openparen
=
0
;
...
...
@@ -115,10 +114,6 @@ int __init com90xx_probe(struct net_device *dev)
if
(
!
dev
&&
com90xx_skip_probe
)
return
-
ENODEV
;
#ifndef MODULE
arcnet_init
();
#endif
BUGLVL
(
D_NORMAL
)
printk
(
VERSION
);
/* set up the arrays where we'll store the possible probe addresses */
...
...
@@ -603,9 +598,6 @@ static void com90xx_copy_from_card(struct net_device *dev, int bufnum, int offse
}
#ifdef MODULE
/* Module parameters */
static
int
io
;
/* use the insmod io= irq= shmem= options */
...
...
@@ -619,7 +611,7 @@ MODULE_PARM(shmem, "i");
MODULE_PARM
(
device
,
"s"
);
MODULE_LICENSE
(
"GPL"
);
int
init_module
(
void
)
static
int
__init
com90xx_init
(
void
)
{
struct
net_device
*
dev
;
int
err
;
...
...
@@ -642,8 +634,7 @@ int init_module(void)
return
0
;
}
void
cleanup_module
(
void
)
static
void
__exit
com90xx_exit
(
void
)
{
struct
net_device
*
dev
;
struct
arcnet_local
*
lp
;
...
...
@@ -663,44 +654,38 @@ void cleanup_module(void)
}
}
#else
module_init
(
com90xx_init
);
module_exit
(
com90xx_exit
);
#ifndef MODULE
static
int
__init
com90xx_setup
(
char
*
s
)
{
struct
net_device
*
dev
;
int
ints
[
8
];
com90xx_skip_probe
=
1
;
s
=
get_options
(
s
,
8
,
ints
);
if
(
!
ints
[
0
]
&&
!*
s
)
{
printk
(
"com90xx: Disabled.
\n
"
);
return
1
;
}
dev
=
alloc_bootmem
(
sizeof
(
struct
net_device
));
memset
(
dev
,
0
,
sizeof
(
struct
net_device
));
dev
->
init
=
com90xx_probe
;
switch
(
ints
[
0
])
{
default:
/* ERROR */
printk
(
"com90xx: Too many arguments.
\n
"
);
case
3
:
/* Mem address */
dev
->
mem_start
=
ints
[
3
];
shmem
=
ints
[
3
];
case
2
:
/* IRQ */
dev
->
irq
=
ints
[
2
];
irq
=
ints
[
2
];
case
1
:
/* IO address */
dev
->
base_addr
=
ints
[
1
];
io
=
ints
[
1
];
}
if
(
*
s
)
strncpy
(
dev
->
nam
e
,
s
,
9
);
strncpy
(
dev
ic
e
,
s
,
9
);
else
strcpy
(
dev
->
name
,
"arc%d"
);
if
(
register_netdev
(
dev
))
printk
(
KERN_ERR
"com90xx: Cannot register arcnet device
\n
"
);
strcpy
(
device
,
"arc%d"
);
return
1
;
}
__setup
(
"com90xx="
,
com90xx_setup
);
#endif
/* MODULE */
#endif
drivers/net/arcnet/rfc1051.c
View file @
4ad50851
...
...
@@ -53,8 +53,10 @@ struct ArcProto rfc1051_proto =
};
void
__init
arcnet_rfc1051_init
(
void
)
static
int
__init
arcnet_rfc1051_init
(
void
)
{
printk
(
VERSION
);
arc_proto_map
[
ARC_P_IP_RFC1051
]
=
arc_proto_map
[
ARC_P_ARP_RFC1051
]
=
&
rfc1051_proto
;
...
...
@@ -63,27 +65,18 @@ void __init arcnet_rfc1051_init(void)
if
(
arc_bcast_proto
==
arc_proto_default
)
arc_bcast_proto
=
&
rfc1051_proto
;
}
#ifdef MODULE
MODULE_LICENSE
(
"GPL"
);
int
__init
init_module
(
void
)
{
printk
(
VERSION
);
arcnet_rfc1051_init
();
return
0
;
}
void
cleanup_module
(
void
)
static
void
__exit
arcnet_rfc1051_exit
(
void
)
{
arcnet_unregister_proto
(
&
rfc1051_proto
);
}
#endif
/* MODULE */
module_init
(
arcnet_rfc1051_init
);
module_exit
(
arcnet_rfc1051_exit
);
MODULE_LICENSE
(
"GPL"
);
/*
* Determine a packet's protocol ID.
...
...
drivers/net/arcnet/rfc1201.c
View file @
4ad50851
...
...
@@ -53,8 +53,10 @@ struct ArcProto rfc1201_proto =
};
void
__init
arcnet_rfc1201_init
(
void
)
static
int
__init
arcnet_rfc1201_init
(
void
)
{
printk
(
VERSION
);
arc_proto_map
[
ARC_P_IP
]
=
arc_proto_map
[
ARC_P_IPV6
]
=
arc_proto_map
[
ARC_P_ARP
]
...
...
@@ -66,27 +68,17 @@ void __init arcnet_rfc1201_init(void)
/* if someone else already owns the broadcast, we won't take it */
if
(
arc_bcast_proto
==
arc_proto_default
)
arc_bcast_proto
=
&
rfc1201_proto
;
}
#ifdef MODULE
MODULE_LICENSE
(
"GPL"
);
int
__init
init_module
(
void
)
{
printk
(
VERSION
);
arcnet_rfc1201_init
();
return
0
;
}
void
cleanup_module
(
void
)
static
void
__exit
arcnet_rfc1201_exit
(
void
)
{
arcnet_unregister_proto
(
&
rfc1201_proto
);
}
#endif
/* MODULE */
module_init
(
arcnet_rfc1201_init
);
module_exit
(
arcnet_rfc1201_exit
);
/*
* Determine a packet's protocol ID.
...
...
drivers/net/setup.c
View file @
4ad50851
...
...
@@ -11,7 +11,6 @@
extern
int
dmascc_init
(
void
);
extern
int
arcnet_init
(
void
);
extern
int
scc_enet_init
(
void
);
extern
int
fec_enet_init
(
void
);
extern
int
sdla_setup
(
void
);
...
...
@@ -42,9 +41,6 @@ static struct net_probe pci_probes[] __initdata = {
#if defined(CONFIG_SDLA)
{
sdla_c_setup
,
0
},
#endif
#if defined(CONFIG_ARCNET)
{
arcnet_init
,
0
},
#endif
#if defined(CONFIG_SCC_ENET)
{
scc_enet_init
,
0
},
#endif
...
...
include/linux/arcdevice.h
View file @
4ad50851
...
...
@@ -333,14 +333,5 @@ void arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs);
void
arcdev_setup
(
struct
net_device
*
dev
);
void
arcnet_rx
(
struct
net_device
*
dev
,
int
bufnum
);
void
arcnet_init
(
void
);
void
arcnet_rfc1201_init
(
void
);
void
arcnet_rfc1051_init
(
void
);
void
arcnet_raw_init
(
void
);
int
com90xx_probe
(
struct
net_device
*
dev
);
#endif
/* __KERNEL__ */
#endif
/* _LINUX_ARCDEVICE_H */
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