From: David van Moolenbroek Date: Tue, 23 Oct 2012 12:23:26 +0000 (+0000) Subject: drivers: fix various sys_irqsetpolicy calls X-Git-Tag: v3.2.1~259 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch01.html?a=commitdiff_plain;h=7dd6189cc7dd82e3449812d4f92f49d7fd37ba40;p=minix.git drivers: fix various sys_irqsetpolicy calls --- diff --git a/drivers/ahci/ahci.c b/drivers/ahci/ahci.c index c0822b7cb..8fdcc3450 100644 --- a/drivers/ahci/ahci.c +++ b/drivers/ahci/ahci.c @@ -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. */ diff --git a/drivers/atl2/atl2.c b/drivers/atl2/atl2.c index 60c2ecd6d..4869317d6 100644 --- a/drivers/atl2/atl2.c +++ b/drivers/atl2/atl2.c @@ -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); diff --git a/drivers/vbox/vbox.c b/drivers/vbox/vbox.c index 4053515d0..8a1a95bbb 100644 --- a/drivers/vbox/vbox.c +++ b/drivers/vbox/vbox.c @@ -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);