]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[media] cx23885, cimax2.c: Fix case of two CAM insertion irq
authorIgor M. Liplianin <liplianin@me.by>
Fri, 31 Dec 2010 05:04:38 +0000 (02:04 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 31 Dec 2010 15:46:20 +0000 (13:46 -0200)
For example  boot up with two CAM inserted.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cimax2.c

index c95e7bc14745d4ac31694a8836a54cc6fdb4c312..209b971bd267add702469bbf07d5c92492006fa8 100644 (file)
@@ -368,7 +368,7 @@ static void netup_read_ci_status(struct work_struct *work)
                                DVB_CA_EN50221_POLL_CAM_READY;
                else
                        state->status = 0;
-       };
+       }
 }
 
 /* CI irq handler */
@@ -377,16 +377,24 @@ int netup_ci_slot_status(struct cx23885_dev *dev, u32 pci_status)
        struct cx23885_tsport *port = NULL;
        struct netup_ci_state *state = NULL;
 
-       if (pci_status & PCI_MSK_GPIO0)
-               port = &dev->ts1;
-       else if (pci_status & PCI_MSK_GPIO1)
-               port = &dev->ts2;
-       else /* who calls ? */
+       ci_dbg_print("%s:\n", __func__);
+
+       if (0 == (pci_status & (PCI_MSK_GPIO0 | PCI_MSK_GPIO1)))
                return 0;
 
-       state = port->port_priv;
+       if (pci_status & PCI_MSK_GPIO0) {
+               port = &dev->ts1;
+               state = port->port_priv;
+               schedule_work(&state->work);
+               ci_dbg_print("%s: Wakeup CI0\n", __func__);
+       }
 
-       schedule_work(&state->work);
+       if (pci_status & PCI_MSK_GPIO1) {
+               port = &dev->ts2;
+               state = port->port_priv;
+               schedule_work(&state->work);
+               ci_dbg_print("%s: Wakeup CI1\n", __func__);
+       }
 
        return 1;
 }