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
c3019156
Commit
c3019156
authored
Jan 10, 2004
by
Alexander Viro
Committed by
Stephen Hemminger
Jan 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr hydra] use alloc_etherdev
parent
ed947ded
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
drivers/net/hydra.c
drivers/net/hydra.c
+16
-3
No files found.
drivers/net/hydra.c
View file @
c3019156
...
...
@@ -89,15 +89,17 @@ static int __init hydra_init(unsigned long board)
const
char
name
[]
=
"NE2000"
;
int
start_page
,
stop_page
;
int
j
;
int
err
;
static
u32
hydra_offsets
[
16
]
=
{
0x00
,
0x02
,
0x04
,
0x06
,
0x08
,
0x0a
,
0x0c
,
0x0e
,
0x10
,
0x12
,
0x14
,
0x16
,
0x18
,
0x1a
,
0x1c
,
0x1e
,
};
dev
=
init_etherdev
(
NULL
,
0
);
dev
=
alloc_etherdev
(
0
);
if
(
!
dev
)
return
-
ENOMEM
;
dev
->
priv
=
NULL
;
SET_MODULE_OWNER
(
dev
);
for
(
j
=
0
;
j
<
ETHER_ADDR_LEN
;
j
++
)
...
...
@@ -113,12 +115,16 @@ static int __init hydra_init(unsigned long board)
/* Install the Interrupt handler */
if
(
request_irq
(
IRQ_AMIGA_PORTS
,
ei_interrupt
,
SA_SHIRQ
,
"Hydra Ethernet"
,
dev
))
dev
))
{
free_netdev
(
dev
);
return
-
EAGAIN
;
}
/* Allocate dev->priv and fill in 8390 specific dev fields. */
if
(
ethdev_init
(
dev
))
{
printk
(
"Unable to get memory for dev->priv.
\n
"
);
free_irq
(
IRQ_AMIGA_PORTS
,
dev
);
free_netdev
(
dev
);
return
-
ENOMEM
;
}
...
...
@@ -146,7 +152,14 @@ static int __init hydra_init(unsigned long board)
root_hydra_dev
=
dev
;
#endif
NS8390_init
(
dev
,
0
);
err
=
register_netdev
(
dev
);
if
(
!
err
)
return
0
;
free_irq
(
IRQ_AMIGA_PORTS
,
dev
);
kfree
(
dev
->
priv
);
free_netdev
(
dev
);
return
err
;
}
static
int
hydra_open
(
struct
net_device
*
dev
)
...
...
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