]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/cx18/cx18-driver.c
Merge branch 'v28-range-hrtimers-for-linus-v2' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-omap-h63xx.git] / drivers / media / video / cx18 / cx18-driver.c
index df5531709ae570c74ce63dfe3177ef0519e0c6a0..7a1a7830a6b3fcc49ec0b1ff86c049c816c13b38 100644 (file)
@@ -130,6 +130,8 @@ MODULE_PARM_DESC(cardtype,
                 "\t\t\t 3 = Compro VideoMate H900\n"
                 "\t\t\t 4 = Yuan MPC718\n"
                 "\t\t\t 5 = Conexant Raptor PAL/SECAM\n"
+                "\t\t\t 6 = Toshiba Qosmio DVB-T/Analog\n"
+                "\t\t\t 7 = Leadtek WinFast PVR2100\n"
                 "\t\t\t 0 = Autodetect (default)\n"
                 "\t\t\t-1 = Ignore this card\n\t\t");
 MODULE_PARM_DESC(pal, "Set PAL standard: B, G, H, D, K, I, M, N, Nc, 60");
@@ -173,7 +175,7 @@ MODULE_PARM_DESC(enc_pcm_buffers,
                 "Encoder PCM buffers (in MB)\n"
                 "\t\t\tDefault: " __stringify(CX18_DEFAULT_ENC_PCM_BUFFERS));
 
-MODULE_PARM_DESC(cx18_first_minor, "Set minor assigned to first card");
+MODULE_PARM_DESC(cx18_first_minor, "Set kernel number assigned to first card");
 
 MODULE_AUTHOR("Hans Verkuil");
 MODULE_DESCRIPTION("CX23418 driver");
@@ -611,6 +613,7 @@ static int __devinit cx18_probe(struct pci_dev *dev,
                                const struct pci_device_id *pci_id)
 {
        int retval = 0;
+       int i;
        int vbi_buf_size;
        u32 devtype;
        struct cx18 *cx;
@@ -696,7 +699,8 @@ static int __devinit cx18_probe(struct pci_dev *dev,
 
        /* active i2c  */
        CX18_DEBUG_INFO("activating i2c...\n");
-       if (init_cx18_i2c(cx)) {
+       retval = init_cx18_i2c(cx);
+       if (retval) {
                CX18_ERR("Could not initialize i2c\n");
                goto free_map;
        }
@@ -834,8 +838,11 @@ err:
        CX18_ERR("Error %d on initialization\n", retval);
        cx18_log_statistics(cx);
 
-       kfree(cx18_cards[cx18_cards_active]);
-       cx18_cards[cx18_cards_active] = NULL;
+       i = cx->num;
+       spin_lock(&cx18_cards_lock);
+       kfree(cx18_cards[i]);
+       cx18_cards[i] = NULL;
+       spin_unlock(&cx18_cards_lock);
        return retval;
 }
 
@@ -957,7 +964,7 @@ static int module_start(void)
 
        /* Validate parameters */
        if (cx18_first_minor < 0 || cx18_first_minor >= CX18_MAX_CARDS) {
-               printk(KERN_ERR "cx18:  Exiting, ivtv_first_minor must be between 0 and %d\n",
+               printk(KERN_ERR "cx18:  Exiting, cx18_first_minor must be between 0 and %d\n",
                     CX18_MAX_CARDS - 1);
                return -1;
        }