]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/wanxl.c
x86: merge thread_info.h
[linux-2.6-omap-h63xx.git] / drivers / net / wan / wanxl.c
index c73601574334c22e97b46b451b33ff133c22bd99..d4aab8a28b61bd097c7c1123472b335c79944de2 100644 (file)
@@ -599,7 +599,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
        }
 
        alloc_size = sizeof(card_t) + ports * sizeof(port_t);
-       card = kmalloc(alloc_size, GFP_KERNEL);
+       card = kzalloc(alloc_size, GFP_KERNEL);
        if (card == NULL) {
                printk(KERN_ERR "wanXL %s: unable to allocate memory\n",
                       pci_name(pdev));
@@ -607,7 +607,6 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
                pci_disable_device(pdev);
                return -ENOBUFS;
        }
-       memset(card, 0, alloc_size);
 
        pci_set_drvdata(pdev, card);
        card->pdev = pdev;
@@ -716,7 +715,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
        }
 
        for (i = 0; i < sizeof(firmware); i += 4)
-               writel(htonl(*(u32*)(firmware + i)), mem + PDM_OFFSET + i);
+               writel(ntohl(*(__be32*)(firmware + i)), mem + PDM_OFFSET + i);
 
        for (i = 0; i < ports; i++)
                writel(card->status_address +
@@ -744,7 +743,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
        }while (time_after(timeout, jiffies));
 
        if (!stat) {
-               printk(KERN_WARNING "wanXL %s: timeout while initializing card"
+               printk(KERN_WARNING "wanXL %s: timeout while initializing card "
                       "firmware\n", pci_name(pdev));
                wanxl_pci_remove_one(pdev);
                return -ENODEV;
@@ -780,7 +779,6 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
                port->dev = dev;
                hdlc = dev_to_hdlc(dev);
                spin_lock_init(&port->lock);
-               SET_MODULE_OWNER(dev);
                dev->tx_queue_len = 50;
                dev->do_ioctl = wanxl_ioctl;
                dev->open = wanxl_open;