OsdInterrupt.c (2a191126deb870f9bd48b3172bd16079cd5a926b) OsdInterrupt.c (ef544f631226436ef590825881e7a28369df82f6)
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000 BSDi
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 72 unchanged lines hidden (view full) ---

81 bus_set_resource(sc->acpi_dev, SYS_RES_IRQ, 0, InterruptNumber, 1);
82 sc->acpi_irq = bus_alloc_resource_any(sc->acpi_dev, SYS_RES_IRQ,
83 &sc->acpi_irq_rid, RF_SHAREABLE | RF_ACTIVE);
84 if (sc->acpi_irq == NULL) {
85 device_printf(sc->acpi_dev, "could not allocate interrupt\n");
86 goto error;
87 }
88 if (bus_setup_intr(sc->acpi_dev, sc->acpi_irq, INTR_TYPE_MISC|INTR_MPSAFE,
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000 BSDi
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 72 unchanged lines hidden (view full) ---

81 bus_set_resource(sc->acpi_dev, SYS_RES_IRQ, 0, InterruptNumber, 1);
82 sc->acpi_irq = bus_alloc_resource_any(sc->acpi_dev, SYS_RES_IRQ,
83 &sc->acpi_irq_rid, RF_SHAREABLE | RF_ACTIVE);
84 if (sc->acpi_irq == NULL) {
85 device_printf(sc->acpi_dev, "could not allocate interrupt\n");
86 goto error;
87 }
88 if (bus_setup_intr(sc->acpi_dev, sc->acpi_irq, INTR_TYPE_MISC|INTR_MPSAFE,
89 (driver_intr_t *)ServiceRoutine, Context, &sc->acpi_irq_handle)) {
89 NULL, (driver_intr_t *)ServiceRoutine, Context, &sc->acpi_irq_handle)) {
90 device_printf(sc->acpi_dev, "could not set up interrupt\n");
91 goto error;
92 }
93
94 return_ACPI_STATUS (AE_OK);
95
96error:
97 if (sc->acpi_irq_handle)

--- 48 unchanged lines hidden ---
90 device_printf(sc->acpi_dev, "could not set up interrupt\n");
91 goto error;
92 }
93
94 return_ACPI_STATUS (AE_OK);
95
96error:
97 if (sc->acpi_irq_handle)

--- 48 unchanged lines hidden ---