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
aa5e7682
Commit
aa5e7682
authored
Jun 02, 2003
by
Alexander Viro
Committed by
David S. Miller
Jun 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Eliminate init_hippi_dev and {un,}register_hipdev.
parent
25e4e938
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
54 deletions
+12
-54
drivers/net/net_init.c
drivers/net/net_init.c
+1
-38
drivers/net/rrunner.c
drivers/net/rrunner.c
+11
-12
include/linux/hippidevice.h
include/linux/hippidevice.h
+0
-4
No files found.
drivers/net/net_init.c
View file @
aa5e7682
...
...
@@ -330,29 +330,6 @@ static int hippi_mac_addr(struct net_device *dev, void *p)
return
0
;
}
/**
* init_hippi_dev - Register HIPPI device
* @dev: A HIPPI device structure to be filled in, or %NULL if a new
* struct should be allocated.
* @sizeof_priv: Size of additional driver-private structure to be allocated
* for this ethernet device
*
* Fill in the fields of the device structure with HIPPI-generic values.
*
* If no device structure is passed, a new one is constructed, complete with
* a private data area of size @sizeof_priv. A 32-byte (not bit)
* alignment is enforced for this private data area.
*
* If an empty string area is passed as dev->name, or a new structure is made,
* a new name string is constructed.
*/
struct
net_device
*
init_hippi_dev
(
struct
net_device
*
dev
,
int
sizeof_priv
)
{
return
init_netdev
(
dev
,
sizeof_priv
,
"hip%d"
,
hippi_setup
);
}
/**
* alloc_hippi_dev - Register HIPPI device
* @sizeof_priv: Size of additional driver-private structure to be allocated
...
...
@@ -370,20 +347,7 @@ struct net_device *alloc_hippi_dev(int sizeof_priv)
return
alloc_netdev
(
sizeof_priv
,
"hip%d"
,
hippi_setup
);
}
int
register_hipdev
(
struct
net_device
*
dev
)
{
return
__register_netdev
(
dev
);
}
void
unregister_hipdev
(
struct
net_device
*
dev
)
{
unregister_netdev
(
dev
);
}
EXPORT_SYMBOL
(
init_hippi_dev
);
EXPORT_SYMBOL
(
alloc_hippi_dev
);
EXPORT_SYMBOL
(
register_hipdev
);
EXPORT_SYMBOL
(
unregister_hipdev
);
static
int
hippi_neigh_setup_dev
(
struct
net_device
*
dev
,
struct
neigh_parms
*
p
)
{
...
...
@@ -456,7 +420,7 @@ EXPORT_SYMBOL(fddi_setup);
#endif
/* CONFIG_FDDI */
#ifdef CONFIG_HIPPI
void
hippi_setup
(
struct
net_device
*
dev
)
static
void
hippi_setup
(
struct
net_device
*
dev
)
{
dev
->
set_multicast_list
=
NULL
;
dev
->
change_mtu
=
hippi_change_mtu
;
...
...
@@ -487,7 +451,6 @@ void hippi_setup(struct net_device *dev)
*/
dev
->
flags
=
0
;
}
EXPORT_SYMBOL
(
hippi_setup
);
#endif
/* CONFIG_HIPPI */
#if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE)
...
...
drivers/net/rrunner.c
View file @
aa5e7682
...
...
@@ -97,13 +97,11 @@ static int __devinit rr_init_one(struct pci_dev *pdev,
struct
rr_private
*
rrpriv
;
void
*
tmpptr
;
dma_addr_t
ring_dma
;
int
ret
;
int
ret
=
-
ENOMEM
;
dev
=
init_hippi_dev
(
NULL
,
sizeof
(
struct
rr_private
));
if
(
!
dev
)
{
ret
=
-
ENOMEM
;
goto
out2
;
}
dev
=
alloc_hippi_dev
(
sizeof
(
struct
rr_private
));
if
(
!
dev
)
goto
out3
;
ret
=
pci_enable_device
(
pdev
);
if
(
ret
)
{
...
...
@@ -210,6 +208,10 @@ static int __devinit rr_init_one(struct pci_dev *pdev,
rr_init
(
dev
);
dev
->
base_addr
=
0
;
ret
=
register_netdev
(
dev
);
if
(
ret
)
goto
out
;
return
0
;
out:
...
...
@@ -225,12 +227,9 @@ static int __devinit rr_init_one(struct pci_dev *pdev,
pci_release_regions
(
pdev
);
pci_set_drvdata
(
pdev
,
NULL
);
}
out2:
if
(
dev
)
{
unregister_hipdev
(
dev
);
kfree
(
dev
);
}
kfree
(
dev
);
out3:
return
ret
;
}
...
...
@@ -252,7 +251,7 @@ static void __devexit rr_remove_one (struct pci_dev *pdev)
rr
->
rx_ring_dma
);
pci_free_consistent
(
pdev
,
TX_TOTAL_SIZE
,
rr
->
tx_ring
,
rr
->
tx_ring_dma
);
unregister_
hip
dev
(
dev
);
unregister_
net
dev
(
dev
);
iounmap
(
rr
->
regs
);
kfree
(
dev
);
pci_release_regions
(
pdev
);
...
...
include/linux/hippidevice.h
View file @
aa5e7682
...
...
@@ -49,12 +49,8 @@ extern void hippi_header_cache_update(struct hh_cache *hh,
extern
int
hippi_header_parse
(
struct
sk_buff
*
skb
,
unsigned
char
*
haddr
);
extern
void
hippi_net_init
(
void
);
void
hippi_setup
(
struct
net_device
*
dev
);
extern
struct
net_device
*
init_hippi_dev
(
struct
net_device
*
dev
,
int
sizeof_priv
);
extern
struct
net_device
*
alloc_hippi_dev
(
int
sizeof_priv
);
extern
int
register_hipdev
(
struct
net_device
*
dev
);
extern
void
unregister_hipdev
(
struct
net_device
*
dev
);
#endif
#endif
/* _LINUX_HIPPIDEVICE_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