]> git.hungrycats.org Git - linux/commitdiff
[PATCH] inline reordering in drivers/*
authorAlexander Viro <viro@www.linux.org.uk>
Mon, 26 Jul 2004 14:04:48 +0000 (07:04 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 26 Jul 2004 14:04:48 +0000 (07:04 -0700)
usual "shift definition of inlines before their uses" in a couple of
places in drivers/*

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/ieee1394/eth1394.c
drivers/net/seeq8005.c

index 95ccc698ec82109c79e3221d1f1316af9120df55..a9709b846e3eb8ae2a2ab0fa87dab48f765c9468 100644 (file)
@@ -290,6 +290,20 @@ static int ether1394_change_mtu(struct net_device *dev, int new_mtu)
        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
@@ -1081,21 +1095,6 @@ static inline int update_partial_datagram(struct list_head *pdgl, struct list_he
        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)
 {
        struct partial_datagram *pd = list_entry(lh, struct partial_datagram, list);
index 06a93835cfd2143d5a9c1e69f33f4f2869b976b2..0f237b54d5b30e5c44ab05260b7701d7b7e42f78 100644 (file)
@@ -414,6 +414,27 @@ static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev)
        return 0;
 }
 \f
+/*
+ * 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);
+}
+\f
 /* The typical workload of the driver:
    Handle the network interface interrupts. */
 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)
 }
 
 
-/*
- * 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
 
 static struct net_device *dev_seeq;