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
5d572ab0
Commit
5d572ab0
authored
Jan 10, 2004
by
Alexander Viro
Committed by
Stephen Hemminger
Jan 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[arcnet] create and use alloc_arcdev helper
parent
4295b2bc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
18 deletions
+14
-18
drivers/net/arcnet/arc-rimi.c
drivers/net/arcnet/arc-rimi.c
+1
-3
drivers/net/arcnet/arcnet.c
drivers/net/arcnet/arcnet.c
+6
-0
drivers/net/arcnet/com20020-isa.c
drivers/net/arcnet/com20020-isa.c
+1
-3
drivers/net/arcnet/com20020-pci.c
drivers/net/arcnet/com20020-pci.c
+1
-3
drivers/net/arcnet/com90io.c
drivers/net/arcnet/com90io.c
+1
-3
drivers/net/arcnet/com90xx.c
drivers/net/arcnet/com90xx.c
+2
-4
drivers/net/pcmcia/com20020_cs.c
drivers/net/pcmcia/com20020_cs.c
+1
-2
include/linux/arcdevice.h
include/linux/arcdevice.h
+1
-0
No files found.
drivers/net/arcnet/arc-rimi.c
View file @
5d572ab0
...
...
@@ -307,9 +307,7 @@ static int __init arc_rimi_init(void)
{
struct
net_device
*
dev
;
dev
=
alloc_netdev
(
sizeof
(
struct
arcnet_local
),
device
[
0
]
?
device
:
"arc%d"
,
arcdev_setup
);
dev
=
alloc_arcdev
(
device
);
if
(
!
dev
)
return
-
ENOMEM
;
...
...
drivers/net/arcnet/arcnet.c
View file @
5d572ab0
...
...
@@ -92,6 +92,7 @@ EXPORT_SYMBOL(arc_proto_null);
EXPORT_SYMBOL
(
arcnet_unregister_proto
);
EXPORT_SYMBOL
(
arcnet_debug
);
EXPORT_SYMBOL
(
arcdev_setup
);
EXPORT_SYMBOL
(
alloc_arcdev
);
EXPORT_SYMBOL
(
arcnet_interrupt
);
/* Internal function prototypes */
...
...
@@ -331,6 +332,11 @@ void arcdev_setup(struct net_device *dev)
dev
->
rebuild_header
=
arcnet_rebuild_header
;
}
struct
net_device
*
alloc_arcdev
(
char
*
name
)
{
return
alloc_netdev
(
sizeof
(
struct
arcnet_local
),
name
&&
*
name
?
name
:
"arc%d"
,
arcdev_setup
);
}
/*
* Open/initialize the board. This is called sometime after booting when
...
...
drivers/net/arcnet/com20020-isa.c
View file @
5d572ab0
...
...
@@ -145,9 +145,7 @@ static int __init com20020_init(void)
struct
net_device
*
dev
;
struct
arcnet_local
*
lp
;
dev
=
alloc_netdev
(
sizeof
(
struct
arcnet_local
),
device
[
0
]
?
device
:
"arc%d"
,
arcdev_setup
);
dev
=
alloc_arcdev
(
device
);
if
(
!
dev
)
return
-
ENOMEM
;
...
...
drivers/net/arcnet/com20020-pci.c
View file @
5d572ab0
...
...
@@ -69,9 +69,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
if
(
pci_enable_device
(
pdev
))
return
-
EIO
;
dev
=
alloc_netdev
(
sizeof
(
struct
arcnet_local
),
device
[
0
]
?
device
:
"arc%d"
,
arcdev_setup
);
dev
=
alloc_arcdev
(
device
);
if
(
!
dev
)
return
-
ENOMEM
;
lp
=
dev
->
priv
;
...
...
drivers/net/arcnet/com90io.c
View file @
5d572ab0
...
...
@@ -394,9 +394,7 @@ static int __init com90io_init(void)
struct
net_device
*
dev
;
int
err
;
dev
=
alloc_netdev
(
sizeof
(
struct
arcnet_local
),
device
[
0
]
?
device
:
"arc%d"
,
arcdev_setup
);
dev
=
alloc_arcdev
(
device
);
if
(
!
dev
)
return
-
ENOMEM
;
...
...
drivers/net/arcnet/com90xx.c
View file @
5d572ab0
...
...
@@ -408,10 +408,8 @@ static int __init com90xx_found(int ioaddr, int airq, u_long shmem)
u_long
first_mirror
,
last_mirror
;
int
mirror_size
;
/* allocate struct net_device if we don't have one yet */
dev
=
alloc_netdev
(
sizeof
(
struct
arcnet_local
),
device
[
0
]
?
device
:
"arc%d"
,
arcdev_setup
);
/* allocate struct net_device */
dev
=
alloc_arcdev
(
device
);
if
(
!
dev
)
{
BUGMSG2
(
D_NORMAL
,
"com90xx: Can't allocate device!
\n
"
);
release_mem_region
(
shmem
,
BUFFER_SIZE
);
...
...
drivers/net/pcmcia/com20020_cs.c
View file @
5d572ab0
...
...
@@ -173,8 +173,7 @@ static dev_link_t *com20020_attach(void)
if
(
!
info
)
goto
fail_alloc_info
;
dev
=
alloc_netdev
(
sizeof
(
struct
arcnet_local
),
"arc%d"
,
arcdev_setup
);
dev
=
alloc_arcdev
(
""
);
if
(
!
dev
)
goto
fail_alloc_dev
;
...
...
include/linux/arcdevice.h
View file @
5d572ab0
...
...
@@ -331,6 +331,7 @@ void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc);
void
arcnet_unregister_proto
(
struct
ArcProto
*
proto
);
irqreturn_t
arcnet_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
void
arcdev_setup
(
struct
net_device
*
dev
);
struct
net_device
*
alloc_arcdev
(
char
*
name
);
void
arcnet_rx
(
struct
net_device
*
dev
,
int
bufnum
);
#endif
/* __KERNEL__ */
...
...
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