include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / media / dvb / mantis / mantis_cards.c
index d486c7f..cf4b39f 100644 (file)
@@ -1,7 +1,28 @@
+/*
+       Mantis PCI bridge driver
+
+       Copyright (C) Manu Abraham (abraham.manu@gmail.com)
+
+       This program is free software; you can redistribute it and/or modify
+       it under the terms of the GNU General Public License as published by
+       the Free Software Foundation; either version 2 of the License, or
+       (at your option) any later version.
+
+       This program is distributed in the hope that it will be useful,
+       but WITHOUT ANY WARRANTY; without even the implied warranty of
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       GNU General Public License for more details.
+
+       You should have received a copy of the GNU General Public License
+       along with this program; if not, write to the Free Software
+       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
+#include <linux/slab.h>
 #include <asm/irq.h>
 #include <linux/interrupt.h>
 
@@ -50,7 +71,6 @@ static char *label[10] = {
        "RACK"
 };
 
-
 static irqreturn_t mantis_irq_handler(int irq, void *dev_id)
 {
        u32 stat = 0, mask = 0, lstat = 0, mstat = 0;
@@ -146,7 +166,7 @@ static int __devinit mantis_pci_probe(struct pci_dev *pdev, const struct pci_dev
        struct mantis_hwconfig *config;
        int err = 0;
 
-       mantis = kzalloc(sizeof (struct mantis_pci), GFP_KERNEL);
+       mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
        if (mantis == NULL) {
                printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
                err = -ENOMEM;
@@ -195,14 +215,21 @@ static int __devinit mantis_pci_probe(struct pci_dev *pdev, const struct pci_dev
                dprintk(MANTIS_ERROR, 1, "ERROR: Mantis DVB initialization failed <%d>", err);
                goto fail4;
        }
+       err = mantis_uart_init(mantis);
+       if (err < 0) {
+               dprintk(MANTIS_ERROR, 1, "ERROR: Mantis UART initialization failed <%d>", err);
+               goto fail6;
+       }
+
        devs++;
 
        return err;
 
-fail5:
-       dprintk(MANTIS_ERROR, 1, "ERROR: Mantis DVB exit! <%d>", err);
-       mantis_dvb_exit(mantis);
 
+       dprintk(MANTIS_ERROR, 1, "ERROR: Mantis UART exit! <%d>", err);
+       mantis_uart_exit(mantis);
+
+fail6:
 fail4:
        dprintk(MANTIS_ERROR, 1, "ERROR: Mantis DMA exit! <%d>", err);
        mantis_dma_exit(mantis);
@@ -228,8 +255,8 @@ static void __devexit mantis_pci_remove(struct pci_dev *pdev)
        struct mantis_pci *mantis = pci_get_drvdata(pdev);
 
        if (mantis) {
+
                mantis_uart_exit(mantis);
-//             mantis_ca_exit(mantis);
                mantis_dvb_exit(mantis);
                mantis_dma_exit(mantis);
                mantis_i2c_exit(mantis);