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
e5b4956d
Commit
e5b4956d
authored
Oct 13, 2003
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Mark dev_alloc as deprecated.
parent
52752ef9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
include/linux/netdevice.h
include/linux/netdevice.h
+5
-1
net/core/dev.c
net/core/dev.c
+4
-3
No files found.
include/linux/netdevice.h
View file @
e5b4956d
...
...
@@ -511,7 +511,11 @@ extern struct net_device *__dev_get_by_flags(unsigned short flags,
unsigned
short
mask
);
extern
struct
net_device
*
dev_get_by_name
(
const
char
*
name
);
extern
struct
net_device
*
__dev_get_by_name
(
const
char
*
name
);
extern
struct
net_device
*
dev_alloc
(
const
char
*
name
,
int
*
err
);
extern
struct
net_device
*
__dev_alloc
(
const
char
*
name
,
int
*
err
);
static
inline
__deprecated
struct
net_device
*
dev_alloc
(
const
char
*
name
,
int
*
err
)
{
return
__dev_alloc
(
name
,
err
);
}
extern
int
dev_alloc_name
(
struct
net_device
*
dev
,
const
char
*
name
);
extern
int
dev_open
(
struct
net_device
*
dev
);
extern
int
dev_close
(
struct
net_device
*
dev
);
...
...
net/core/dev.c
View file @
e5b4956d
...
...
@@ -646,11 +646,12 @@ int dev_alloc_name(struct net_device *dev, const char *name)
* failed. The cause of an error is returned as a negative errno code
* in the variable @err points to.
*
* The caller must hold the @dev_base or RTNL locks when doing this in
* This call is deprecated in favor of alloc_netdev because
* the caller must hold the @dev_base or RTNL locks when doing this in
* order to avoid duplicate name allocations.
*/
struct
net_device
*
dev_alloc
(
const
char
*
name
,
int
*
err
)
struct
net_device
*
__
dev_alloc
(
const
char
*
name
,
int
*
err
)
{
struct
net_device
*
dev
=
kmalloc
(
sizeof
(
*
dev
),
GFP_KERNEL
);
...
...
@@ -2997,7 +2998,7 @@ EXPORT_SYMBOL(__dev_remove_pack);
EXPORT_SYMBOL
(
__skb_linearize
);
EXPORT_SYMBOL
(
call_netdevice_notifiers
);
EXPORT_SYMBOL
(
dev_add_pack
);
EXPORT_SYMBOL
(
dev_alloc
);
EXPORT_SYMBOL
(
__
dev_alloc
);
EXPORT_SYMBOL
(
dev_alloc_name
);
EXPORT_SYMBOL
(
dev_close
);
EXPORT_SYMBOL
(
dev_get_by_flags
);
...
...
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