|
|
| version 1.3, 2004/02/13 00:25:17 | version 1.4, 2004/05/05 22:19:22 |
|---|---|
| Line 542 acpi_add_child(device_t bus, int order, | Line 542 acpi_add_child(device_t bus, int order, |
| struct acpi_device *ad; | struct acpi_device *ad; |
| device_t child; | device_t child; |
| if ((ad = malloc(sizeof(*ad), M_ACPIDEV, M_NOWAIT)) == NULL) | ad = malloc(sizeof(*ad), M_ACPIDEV, M_INTWAIT | M_ZERO); |
| return(NULL); | |
| bzero(ad, sizeof(*ad)); | |
| resource_list_init(&ad->ad_rl); | resource_list_init(&ad->ad_rl); |
| Line 1100 acpi_AllocBuffer(int size) | Line 1098 acpi_AllocBuffer(int size) |
| { | { |
| ACPI_BUFFER *buf; | ACPI_BUFFER *buf; |
| if ((buf = malloc(size + sizeof(*buf), M_ACPIDEV, M_NOWAIT)) == NULL) | buf = malloc(size + sizeof(*buf), M_ACPIDEV, M_INTWAIT); |
| return(NULL); | |
| buf->Length = size; | buf->Length = size; |
| buf->Pointer = (void *)(buf + 1); | buf->Pointer = (void *)(buf + 1); |
| return(buf); | return(buf); |
| Line 1812 acpi_register_ioctl(u_long cmd, int (* f | Line 1809 acpi_register_ioctl(u_long cmd, int (* f |
| { | { |
| struct acpi_ioctl_hook *hp; | struct acpi_ioctl_hook *hp; |
| if ((hp = malloc(sizeof(*hp), M_ACPIDEV, M_NOWAIT)) == NULL) | hp = malloc(sizeof(*hp), M_ACPIDEV, M_INTWAIT); |
| return(ENOMEM); | |
| hp->cmd = cmd; | hp->cmd = cmd; |
| hp->fn = fn; | hp->fn = fn; |
| hp->arg = arg; | hp->arg = arg; |