]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/pc300_drv.c
[ARM] Merge most of the PXA work for initial merge
[linux-2.6-omap-h63xx.git] / drivers / net / wan / pc300_drv.c
index 5d8c78ee2cd9648e186f0efbdd4d1065b2715ef8..57914fbd41d370c15df6c2a9531a069a77731166 100644 (file)
@@ -2365,17 +2365,17 @@ static void falc_intr(pc300_t * card)
 
 static irqreturn_t cpc_intr(int irq, void *dev_id)
 {
-       pc300_t *card;
+       pc300_t *card = dev_id;
        volatile ucchar plx_status;
 
-       if ((card = (pc300_t *) dev_id) == 0) {
+       if (!card) {
 #ifdef PC300_DEBUG_INTR
                printk("cpc_intr: spurious intr %d\n", irq);
 #endif
                return IRQ_NONE;                /* spurious intr */
        }
 
-       if (card->hw.rambase == 0) {
+       if (!card->hw.rambase) {
 #ifdef PC300_DEBUG_INTR
                printk("cpc_intr: spurious intr2 %d\n", irq);
 #endif
@@ -3456,7 +3456,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        if ((err = pci_enable_device(pdev)) < 0)
                return err;
 
-       card = kmalloc(sizeof(pc300_t), GFP_KERNEL);
+       card = kzalloc(sizeof(pc300_t), GFP_KERNEL);
        if (card == NULL) {
                printk("PC300 found at RAM 0x%016llx, "
                       "but could not allocate card structure.\n",
@@ -3464,7 +3464,6 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                err = -ENOMEM;
                goto err_disable_dev;
        }
-       memset(card, 0, sizeof(pc300_t));
 
        err = -ENODEV;
 
@@ -3649,7 +3648,7 @@ static void __devexit cpc_remove_one(struct pci_dev *pdev)
 {
        pc300_t *card = pci_get_drvdata(pdev);
 
-       if (card->hw.rambase != 0) {
+       if (card->hw.rambase) {
                int i;
 
                /* Disable interrupts on the PCI bridge */