OsdInterrupt.c (91128) | OsdInterrupt.c (96926) |
---|---|
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: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 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: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/dev/acpica/Osd/OsdInterrupt.c 91128 2002-02-23 05:31:38Z msmith $ | 27 * $FreeBSD: head/sys/dev/acpica/Osd/OsdInterrupt.c 96926 2002-05-19 06:16:47Z peter $ |
28 */ 29 30/* 31 * 6.5 : Interrupt handling 32 */ 33 34#include "acpi.h" 35 --- 14 unchanged lines hidden (view full) --- 50 * XXX this does not correctly free resources in the case of partically successful 51 * attachment. 52 */ 53ACPI_STATUS 54AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine, void *Context) 55{ 56 struct acpi_softc *sc; 57 | 28 */ 29 30/* 31 * 6.5 : Interrupt handling 32 */ 33 34#include "acpi.h" 35 --- 14 unchanged lines hidden (view full) --- 50 * XXX this does not correctly free resources in the case of partically successful 51 * attachment. 52 */ 53ACPI_STATUS 54AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine, void *Context) 55{ 56 struct acpi_softc *sc; 57 |
58 ACPI_FUNCTION_TRACE(__func__); | 58 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); |
59 60 if ((sc = devclass_get_softc(devclass_find("acpi"), 0)) == NULL) 61 panic("can't find ACPI device to register interrupt"); 62 if (sc->acpi_dev == NULL) 63 panic("acpi softc has invalid device"); 64 65 if ((InterruptNumber < 0) || (InterruptNumber > 255)) 66 return_ACPI_STATUS(AE_BAD_PARAMETER); --- 29 unchanged lines hidden (view full) --- 96 return_ACPI_STATUS(AE_OK); 97} 98 99ACPI_STATUS 100AcpiOsRemoveInterruptHandler (UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine) 101{ 102 struct acpi_softc *sc; 103 | 59 60 if ((sc = devclass_get_softc(devclass_find("acpi"), 0)) == NULL) 61 panic("can't find ACPI device to register interrupt"); 62 if (sc->acpi_dev == NULL) 63 panic("acpi softc has invalid device"); 64 65 if ((InterruptNumber < 0) || (InterruptNumber > 255)) 66 return_ACPI_STATUS(AE_BAD_PARAMETER); --- 29 unchanged lines hidden (view full) --- 96 return_ACPI_STATUS(AE_OK); 97} 98 99ACPI_STATUS 100AcpiOsRemoveInterruptHandler (UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine) 101{ 102 struct acpi_softc *sc; 103 |
104 ACPI_FUNCTION_TRACE(__func__); | 104 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); |
105 106 if ((InterruptNumber < 0) || (InterruptNumber > 255)) 107 return_ACPI_STATUS(AE_BAD_PARAMETER); 108 if (ServiceRoutine == NULL) 109 return_ACPI_STATUS(AE_BAD_PARAMETER); 110 111 if ((sc = devclass_get_softc(devclass_find("acpi"), 0)) == NULL) 112 panic("can't find ACPI device to deregister interrupt"); --- 23 unchanged lines hidden --- | 105 106 if ((InterruptNumber < 0) || (InterruptNumber > 255)) 107 return_ACPI_STATUS(AE_BAD_PARAMETER); 108 if (ServiceRoutine == NULL) 109 return_ACPI_STATUS(AE_BAD_PARAMETER); 110 111 if ((sc = devclass_get_softc(devclass_find("acpi"), 0)) == NULL) 112 panic("can't find ACPI device to deregister interrupt"); --- 23 unchanged lines hidden --- |