]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/xen-netfront.c
get xenbus_driver ->probe() "recognized" by modpost
[linux-2.6-omap-h63xx.git] / drivers / net / xen-netfront.c
index 9ffe743f4eb1cac391cdc65d163180a211de4d6e..6d017adc914ac18c5389fb550b53ed5aa09b3246 100644 (file)
@@ -474,7 +474,7 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
        unsigned int offset = offset_in_page(data);
        unsigned int len = skb_headlen(skb);
 
-       frags += (offset + len + PAGE_SIZE - 1) / PAGE_SIZE;
+       frags += DIV_ROUND_UP(offset + len, PAGE_SIZE);
        if (unlikely(frags > MAX_SKB_FRAGS + 1)) {
                printk(KERN_ALERT "xennet: skb rides the rocket: %d frags\n",
                       frags);
@@ -1785,7 +1785,7 @@ static int __devexit xennet_remove(struct xenbus_device *dev)
        return 0;
 }
 
-static struct xenbus_driver netfront = {
+static struct xenbus_driver netfront_driver = {
        .name = "vif",
        .owner = THIS_MODULE,
        .ids = netfront_ids,
@@ -1797,25 +1797,25 @@ static struct xenbus_driver netfront = {
 
 static int __init netif_init(void)
 {
-       if (!is_running_on_xen())
+       if (!xen_domain())
                return -ENODEV;
 
-       if (is_initial_xendomain())
+       if (xen_initial_domain())
                return 0;
 
        printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n");
 
-       return xenbus_register_frontend(&netfront);
+       return xenbus_register_frontend(&netfront_driver);
 }
 module_init(netif_init);
 
 
 static void __exit netif_exit(void)
 {
-       if (is_initial_xendomain())
+       if (xen_initial_domain())
                return;
 
-       xenbus_unregister_driver(&netfront);
+       xenbus_unregister_driver(&netfront_driver);
 }
 module_exit(netif_exit);