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
530036d3
Commit
530036d3
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 declance] use alloc_etherdev
parent
46069ed2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
drivers/net/declance.c
drivers/net/declance.c
+8
-9
No files found.
drivers/net/declance.c
View file @
530036d3
...
...
@@ -1039,13 +1039,13 @@ static int __init dec_lance_init(const int type, const int slot)
if
(
dec_lance_debug
&&
version_printed
++
==
0
)
printk
(
version
);
dev
=
init_etherdev
(
NULL
,
sizeof
(
struct
lance_private
));
dev
=
alloc_etherdev
(
sizeof
(
struct
lance_private
));
if
(
!
dev
)
return
-
ENOMEM
;
SET_MODULE_OWNER
(
dev
);
/*
*
init
_etherdev ensures the data structures used by the LANCE
*
alloc
_etherdev ensures the data structures used by the LANCE
* are aligned.
*/
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
...
...
@@ -1188,9 +1188,6 @@ static int __init dec_lance_init(const int type, const int slot)
}
}
lp
->
next
=
root_lance_dev
;
root_lance_dev
=
dev
;
/* Copy the ethernet address to the device structure, later to the
* lance initialization block so the lance gets it every time it's
* (re)initialized.
...
...
@@ -1239,11 +1236,14 @@ static int __init dec_lance_init(const int type, const int slot)
init_timer
(
&
lp
->
multicast_timer
);
lp
->
multicast_timer
.
data
=
(
unsigned
long
)
dev
;
lp
->
multicast_timer
.
function
=
&
lance_set_multicast_retry
;
ret
=
register_netdev
(
dev
);
if
(
ret
)
goto
err_out
;
lp
->
next
=
root_lance_dev
;
root_lance_dev
=
dev
;
return
0
;
err_out:
unregister_netdev
(
dev
);
free_netdev
(
dev
);
return
ret
;
}
...
...
@@ -1288,13 +1288,12 @@ static void __exit dec_lance_cleanup(void)
while
(
root_lance_dev
)
{
struct
net_device
*
dev
=
root_lance_dev
;
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
unregister_netdev
(
dev
);
#ifdef CONFIG_TC
if
(
lp
->
slot
>=
0
)
release_tc_card
(
lp
->
slot
);
#endif
root_lance_dev
=
lp
->
next
;
unregister_netdev
(
dev
);
free_netdev
(
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