]> Zhao Yanbai Git Server - minix.git/commitdiff
drivers: fix various sys_irqsetpolicy calls
authorDavid van Moolenbroek <david@minix3.org>
Tue, 23 Oct 2012 12:23:26 +0000 (12:23 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Wed, 24 Oct 2012 11:29:10 +0000 (11:29 +0000)
drivers/ahci/ahci.c
drivers/atl2/atl2.c
drivers/vbox/vbox.c

index c0822b7cb4068af0b064817f2242e421c341f6d0..8fdcc345052fac41cd226767eacc53203c87b168 100644 (file)
@@ -213,7 +213,7 @@ static struct device *ahci_part(dev_t minor);
 static void ahci_alarm(clock_t stamp);
 static int ahci_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
        cp_grant_id_t grant);
-static void ahci_intr(unsigned int irqs);
+static void ahci_intr(unsigned int mask);
 static int ahci_device(dev_t minor, device_id_t *id);
 static struct port_state *ahci_get_port(dev_t minor);
 
@@ -1998,6 +1998,7 @@ static void ahci_init(int devind)
 
        /* Retrieve, allocate and enable the controller's IRQ. */
        hba_state.irq = pci_attr_r8(devind, PCI_ILR);
+       hba_state.hook_id = 0;
 
        if ((r = sys_irqsetpolicy(hba_state.irq, 0, &hba_state.hook_id)) != OK)
                panic("unable to register IRQ: %d", r);
@@ -2090,7 +2091,7 @@ static void ahci_alarm(clock_t stamp)
 /*===========================================================================*
  *                             ahci_intr                                    *
  *===========================================================================*/
-static void ahci_intr(unsigned int UNUSED(irqs))
+static void ahci_intr(unsigned int UNUSED(mask))
 {
        /* Process an interrupt.
         */
index 60c2ecd6dfcc72432a0a73bd8acf010c39378ac0..4869317d6324c12b7f583d9ac0d080d017a7c03b 100644 (file)
@@ -523,6 +523,7 @@ static void atl2_init(int devind)
                panic("unable to allocate DMA buffers: %d", r);
 
        state.irq = pci_attr_r8(devind, PCI_ILR);
+       state.hook_id = 0;
 
        if ((r = sys_irqsetpolicy(state.irq, 0, &state.hook_id)) != OK)
                panic("unable to register IRQ: %d", r);
index 4053515d00881d52955b57fbd4ef707df1d2eb11..8a1a95bbb5f2a03af64f0a9da8a7b6446efbb09a 100644 (file)
@@ -88,6 +88,7 @@ static int vbox_init(int UNUSED(type), sef_init_info_t *UNUSED(info))
        port = pci_attr_r32(devind, PCI_BAR) & PCI_BAR_IO_MASK;
 
        irq = pci_attr_r8(devind, PCI_ILR);
+       hook_id = 0;
 
        if ((r = sys_irqsetpolicy(irq, 0 /* IRQ_REENABLE */, &hook_id)) != OK)
                panic("unable to register IRQ: %d", r);