Commit 6160174a authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] inline reordering in drivers/*

	usual "shift definition of inlines before their uses" in a couple of
places in drivers/*
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c3392187
...@@ -290,6 +290,20 @@ static int ether1394_change_mtu(struct net_device *dev, int new_mtu) ...@@ -290,6 +290,20 @@ static int ether1394_change_mtu(struct net_device *dev, int new_mtu)
return 0; return 0;
} }
static inline void purge_partial_datagram(struct list_head *old)
{
struct partial_datagram *pd = list_entry(old, struct partial_datagram, list);
struct list_head *lh, *n;
list_for_each_safe(lh, n, &pd->frag_info) {
struct fragment_info *fi = list_entry(lh, struct fragment_info, list);
list_del(lh);
kfree(fi);
}
list_del(old);
kfree_skb(pd->skb);
kfree(pd);
}
/****************************************** /******************************************
* 1394 bus activity functions * 1394 bus activity functions
...@@ -1081,21 +1095,6 @@ static inline int update_partial_datagram(struct list_head *pdgl, struct list_he ...@@ -1081,21 +1095,6 @@ static inline int update_partial_datagram(struct list_head *pdgl, struct list_he
return 0; return 0;
} }
static inline void purge_partial_datagram(struct list_head *old)
{
struct partial_datagram *pd = list_entry(old, struct partial_datagram, list);
struct list_head *lh, *n;
list_for_each_safe(lh, n, &pd->frag_info) {
struct fragment_info *fi = list_entry(lh, struct fragment_info, list);
list_del(lh);
kfree(fi);
}
list_del(old);
kfree_skb(pd->skb);
kfree(pd);
}
static inline int is_datagram_complete(struct list_head *lh, int dg_size) static inline int is_datagram_complete(struct list_head *lh, int dg_size)
{ {
struct partial_datagram *pd = list_entry(lh, struct partial_datagram, list); struct partial_datagram *pd = list_entry(lh, struct partial_datagram, list);
......
...@@ -414,6 +414,27 @@ static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev) ...@@ -414,6 +414,27 @@ static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev)
return 0; return 0;
} }
/*
* wait_for_buffer
*
* This routine waits for the SEEQ chip to assert that the FIFO is ready
* by checking for a window interrupt, and then clearing it. This has to
* occur in the interrupt handler!
*/
inline void wait_for_buffer(struct net_device * dev)
{
int ioaddr = dev->base_addr;
unsigned long tmp;
int status;
tmp = jiffies + HZ;
while ( ( ((status=inw(SEEQ_STATUS)) & SEEQSTAT_WINDOW_INT) != SEEQSTAT_WINDOW_INT) && time_before(jiffies, tmp))
cpu_relax();
if ( (status & SEEQSTAT_WINDOW_INT) == SEEQSTAT_WINDOW_INT)
outw( SEEQCMD_WINDOW_INT_ACK | (status & SEEQCMD_INT_MASK), SEEQ_CMD);
}
/* The typical workload of the driver: /* The typical workload of the driver:
Handle the network interface interrupts. */ Handle the network interface interrupts. */
static irqreturn_t seeq8005_interrupt(int irq, void *dev_id, struct pt_regs * regs) static irqreturn_t seeq8005_interrupt(int irq, void *dev_id, struct pt_regs * regs)
...@@ -712,27 +733,6 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length) ...@@ -712,27 +733,6 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length)
} }
/*
* wait_for_buffer
*
* This routine waits for the SEEQ chip to assert that the FIFO is ready
* by checking for a window interrupt, and then clearing it. This has to
* occur in the interrupt handler!
*/
inline void wait_for_buffer(struct net_device * dev)
{
int ioaddr = dev->base_addr;
unsigned long tmp;
int status;
tmp = jiffies + HZ;
while ( ( ((status=inw(SEEQ_STATUS)) & SEEQSTAT_WINDOW_INT) != SEEQSTAT_WINDOW_INT) && time_before(jiffies, tmp))
cpu_relax();
if ( (status & SEEQSTAT_WINDOW_INT) == SEEQSTAT_WINDOW_INT)
outw( SEEQCMD_WINDOW_INT_ACK | (status & SEEQCMD_INT_MASK), SEEQ_CMD);
}
#ifdef MODULE #ifdef MODULE
static struct net_device *dev_seeq; static struct net_device *dev_seeq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment