]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/hamradio/yam.c
mmc: struct device - replace bus_id with dev_name(), dev_set_name()
[linux-2.6-omap-h63xx.git] / drivers / net / hamradio / yam.c
index ee3ea4fa729f370a79567dbb3432f2d5b3d37b10..1c942862a3f4944710de74c546cba66943b8b81a 100644 (file)
@@ -65,6 +65,7 @@
 #include <linux/kernel.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <net/net_namespace.h>
 
 #include <asm/uaccess.h>
 #include <linux/init.h>
@@ -638,7 +639,9 @@ static void yam_tx_byte(struct net_device *dev, struct yam_port *yp)
                                dev_kfree_skb_any(skb);
                                break;
                        }
-                       memcpy(yp->tx_buf, skb->data + 1, yp->tx_len);
+                       skb_copy_from_linear_data_offset(skb, 1,
+                                                        yp->tx_buf,
+                                                        yp->tx_len);
                        dev_kfree_skb_any(skb);
                        yp->tx_count = 0;
                        yp->tx_crcl = 0x21;
@@ -1094,8 +1097,7 @@ static void yam_setup(struct net_device *dev)
 
        skb_queue_head_init(&yp->send_queue);
 
-       dev->hard_header = ax25_hard_header;
-       dev->rebuild_header = ax25_rebuild_header;
+       dev->header_ops = &ax25_header_ops;
 
        dev->set_mac_address = yam_set_mac_address;
 
@@ -1140,7 +1142,7 @@ static int __init yam_init_driver(void)
        yam_timer.expires = jiffies + HZ / 100;
        add_timer(&yam_timer);
 
-       proc_net_fops_create("yam", S_IRUGO, &yam_info_fops);
+       proc_net_fops_create(&init_net, "yam", S_IRUGO, &yam_info_fops);
        return 0;
  error:
        while (--i >= 0) {
@@ -1172,7 +1174,7 @@ static void __exit yam_cleanup_driver(void)
                kfree(p);
        }
 
-       proc_net_remove("yam");
+       proc_net_remove(&init_net, "yam");
 }
 
 /* --------------------------------------------------------------------- */