This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / drivers / net / hamradio / scc.c
index 0e6844f..ece1b1a 100644 (file)
@@ -7,7 +7,7 @@
  *            ------------------
  *
  * You can find a subset of the documentation in 
- * linux/Documentation/networking/z8530drv.txt.
+ * Documentation/networking/z8530drv.txt.
  */
 
 /*
 #include <linux/kernel.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <linux/bitops.h>
 
 #include <net/ax25.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <asm/bitops.h>
 
 #include "z8530.h"
 
@@ -237,7 +237,7 @@ static io_port Vector_Latch;
 
 /* These provide interrupt save 2-step access to the Z8530 registers */
 
-static spinlock_t iolock = SPIN_LOCK_UNLOCKED; /* Guards paired accesses */
+static DEFINE_SPINLOCK(iolock);        /* Guards paired accesses */
 
 static inline unsigned char InReg(io_port port, unsigned char reg)
 {
@@ -1630,10 +1630,7 @@ static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb)
        scc->dev_stat.rx_packets++;
        scc->dev_stat.rx_bytes += skb->len;
 
-       skb->dev      = scc->dev;
-       skb->protocol = htons(ETH_P_AX25);
-       skb->mac.raw  = skb->data;
-       skb->pkt_type = PACKET_HOST;
+       skb->protocol = ax25_type_trans(skb, scc->dev);
        
        netif_rx(skb);
        scc->dev->last_rx = jiffies;
@@ -1714,13 +1711,11 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
        struct scc_mem_config memcfg;
        struct scc_hw_config hwcfg;
        struct scc_calibrate cal;
-       struct scc_channel *scc;
+       struct scc_channel *scc = (struct scc_channel *) dev->priv;
        int chan;
        unsigned char device_name[IFNAMSIZ];
-       void *arg;
+       void __user *arg = ifr->ifr_data;
        
-       scc = (struct scc_channel *) dev->priv;
-       arg = (void *) ifr->ifr_data;
        
        if (!Driver_Initialized)
        {