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
77ab4639
Commit
77ab4639
authored
Mar 12, 2004
by
Randy Dunlap
Committed by
Jeff Garzik
Mar 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] use netdev_priv() in appletalk & fc
parent
c85f7762
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
drivers/net/appletalk/cops.c
drivers/net/appletalk/cops.c
+13
-13
drivers/net/fc/iph5526.c
drivers/net/fc/iph5526.c
+4
-4
No files found.
drivers/net/appletalk/cops.c
View file @
77ab4639
...
@@ -333,7 +333,7 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr)
...
@@ -333,7 +333,7 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr)
dev
->
base_addr
=
ioaddr
;
dev
->
base_addr
=
ioaddr
;
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
memset
(
lp
,
0
,
sizeof
(
struct
cops_local
));
memset
(
lp
,
0
,
sizeof
(
struct
cops_local
));
spin_lock_init
(
&
lp
->
lock
);
spin_lock_init
(
&
lp
->
lock
);
...
@@ -422,7 +422,7 @@ static int __init cops_irq (int ioaddr, int board)
...
@@ -422,7 +422,7 @@ static int __init cops_irq (int ioaddr, int board)
*/
*/
static
int
cops_open
(
struct
net_device
*
dev
)
static
int
cops_open
(
struct
net_device
*
dev
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
if
(
dev
->
irq
==
0
)
if
(
dev
->
irq
==
0
)
{
{
...
@@ -456,7 +456,7 @@ static int cops_open(struct net_device *dev)
...
@@ -456,7 +456,7 @@ static int cops_open(struct net_device *dev)
*/
*/
static
int
cops_jumpstart
(
struct
net_device
*
dev
)
static
int
cops_jumpstart
(
struct
net_device
*
dev
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
/*
/*
* Once the card has the firmware loaded and has acquired
* Once the card has the firmware loaded and has acquired
...
@@ -490,7 +490,7 @@ static void tangent_wait_reset(int ioaddr)
...
@@ -490,7 +490,7 @@ static void tangent_wait_reset(int ioaddr)
*/
*/
static
void
cops_reset
(
struct
net_device
*
dev
,
int
sleep
)
static
void
cops_reset
(
struct
net_device
*
dev
,
int
sleep
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
lp
->
board
==
TANGENT
)
if
(
lp
->
board
==
TANGENT
)
...
@@ -525,7 +525,7 @@ static void cops_load (struct net_device *dev)
...
@@ -525,7 +525,7 @@ static void cops_load (struct net_device *dev)
{
{
struct
ifreq
ifr
;
struct
ifreq
ifr
;
struct
ltfirmware
*
ltf
=
(
struct
ltfirmware
*
)
&
ifr
.
ifr_data
;
struct
ltfirmware
*
ltf
=
(
struct
ltfirmware
*
)
&
ifr
.
ifr_data
;
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
int
length
,
i
=
0
;
int
length
,
i
=
0
;
...
@@ -618,7 +618,7 @@ static void cops_load (struct net_device *dev)
...
@@ -618,7 +618,7 @@ static void cops_load (struct net_device *dev)
*/
*/
static
int
cops_nodeid
(
struct
net_device
*
dev
,
int
nodeid
)
static
int
cops_nodeid
(
struct
net_device
*
dev
,
int
nodeid
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
lp
->
board
==
DAYNA
)
if
(
lp
->
board
==
DAYNA
)
...
@@ -730,7 +730,7 @@ static irqreturn_t cops_interrupt(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -730,7 +730,7 @@ static irqreturn_t cops_interrupt(int irq, void *dev_id, struct pt_regs * regs)
int
boguscount
=
0
;
int
boguscount
=
0
;
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
if
(
lp
->
board
==
DAYNA
)
if
(
lp
->
board
==
DAYNA
)
{
{
...
@@ -765,7 +765,7 @@ static void cops_rx(struct net_device *dev)
...
@@ -765,7 +765,7 @@ static void cops_rx(struct net_device *dev)
int
pkt_len
=
0
;
int
pkt_len
=
0
;
int
rsp_type
=
0
;
int
rsp_type
=
0
;
struct
sk_buff
*
skb
=
NULL
;
struct
sk_buff
*
skb
=
NULL
;
struct
cops_local
*
lp
=
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
int
boguscount
=
0
;
int
boguscount
=
0
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -869,7 +869,7 @@ static void cops_rx(struct net_device *dev)
...
@@ -869,7 +869,7 @@ static void cops_rx(struct net_device *dev)
static
void
cops_timeout
(
struct
net_device
*
dev
)
static
void
cops_timeout
(
struct
net_device
*
dev
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
lp
->
stats
.
tx_errors
++
;
lp
->
stats
.
tx_errors
++
;
...
@@ -891,7 +891,7 @@ static void cops_timeout(struct net_device *dev)
...
@@ -891,7 +891,7 @@ static void cops_timeout(struct net_device *dev)
static
int
cops_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
cops_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -966,7 +966,7 @@ static int cops_hard_header(struct sk_buff *skb, struct net_device *dev,
...
@@ -966,7 +966,7 @@ static int cops_hard_header(struct sk_buff *skb, struct net_device *dev,
static
int
cops_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
)
static
int
cops_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
struct
sockaddr_at
*
sa
=
(
struct
sockaddr_at
*
)
&
ifr
->
ifr_addr
;
struct
sockaddr_at
*
sa
=
(
struct
sockaddr_at
*
)
&
ifr
->
ifr_addr
;
struct
atalk_addr
*
aa
=
(
struct
atalk_addr
*
)
&
lp
->
node_addr
;
struct
atalk_addr
*
aa
=
(
struct
atalk_addr
*
)
&
lp
->
node_addr
;
...
@@ -1002,7 +1002,7 @@ static int cops_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
...
@@ -1002,7 +1002,7 @@ static int cops_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static
int
cops_close
(
struct
net_device
*
dev
)
static
int
cops_close
(
struct
net_device
*
dev
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
/* If we were running polled, yank the timer.
/* If we were running polled, yank the timer.
*/
*/
...
@@ -1019,7 +1019,7 @@ static int cops_close(struct net_device *dev)
...
@@ -1019,7 +1019,7 @@ static int cops_close(struct net_device *dev)
*/
*/
static
struct
net_device_stats
*
cops_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
cops_get_stats
(
struct
net_device
*
dev
)
{
{
struct
cops_local
*
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
struct
cops_local
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
return
&
lp
->
stats
;
}
}
...
...
drivers/net/fc/iph5526.c
View file @
77ab4639
...
@@ -238,7 +238,7 @@ int __init iph5526_probe(struct net_device *dev)
...
@@ -238,7 +238,7 @@ int __init iph5526_probe(struct net_device *dev)
static
int
__init
iph5526_probe_pci
(
struct
net_device
*
dev
)
static
int
__init
iph5526_probe_pci
(
struct
net_device
*
dev
)
{
{
struct
fc_info
*
fi
=
(
struct
fc_info
*
)
dev
->
priv
;
struct
fc_info
*
fi
=
netdev_priv
(
dev
)
;
fi
->
dev
=
dev
;
fi
->
dev
=
dev
;
dev
->
base_addr
=
fi
->
base_addr
;
dev
->
base_addr
=
fi
->
base_addr
;
dev
->
irq
=
fi
->
irq
;
dev
->
irq
=
fi
->
irq
;
...
@@ -2908,7 +2908,7 @@ static int iph5526_close(struct net_device *dev)
...
@@ -2908,7 +2908,7 @@ static int iph5526_close(struct net_device *dev)
static
void
iph5526_timeout
(
struct
net_device
*
dev
)
static
void
iph5526_timeout
(
struct
net_device
*
dev
)
{
{
struct
fc_info
*
fi
=
(
struct
fc_info
*
)
dev
->
priv
;
struct
fc_info
*
fi
=
netdev_priv
(
dev
)
;
printk
(
KERN_WARNING
"%s: timed out on send.
\n
"
,
dev
->
name
);
printk
(
KERN_WARNING
"%s: timed out on send.
\n
"
,
dev
->
name
);
fi
->
fc_stats
.
rx_dropped
++
;
fi
->
fc_stats
.
rx_dropped
++
;
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
...
@@ -2917,7 +2917,7 @@ static void iph5526_timeout(struct net_device *dev)
...
@@ -2917,7 +2917,7 @@ static void iph5526_timeout(struct net_device *dev)
static
int
iph5526_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
iph5526_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
fc_info
*
fi
=
(
struct
fc_info
*
)
dev
->
priv
;
struct
fc_info
*
fi
=
netdev_priv
(
dev
)
;
int
status
=
0
;
int
status
=
0
;
short
type
=
0
;
short
type
=
0
;
u_long
flags
;
u_long
flags
;
...
@@ -3688,7 +3688,7 @@ int count = 0, j;
...
@@ -3688,7 +3688,7 @@ int count = 0, j;
static
struct
net_device_stats
*
iph5526_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
iph5526_get_stats
(
struct
net_device
*
dev
)
{
{
struct
fc_info
*
fi
=
(
struct
fc_info
*
)
dev
->
priv
;
struct
fc_info
*
fi
=
netdev_priv
(
dev
);
return
(
struct
net_device_stats
*
)
&
fi
->
fc_stats
;
return
(
struct
net_device_stats
*
)
&
fi
->
fc_stats
;
}
}
...
...
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