diff options
Diffstat (limited to 'lib/hurd.c')
-rw-r--r-- | lib/hurd.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -74,8 +74,8 @@ hurd_cleanup(struct pci_access *a UNUSED) static void hurd_init_dev(struct pci_dev *d) { - d->aux = pci_malloc(d->access, sizeof(mach_port_t)); - *((mach_port_t *) d->aux) = MACH_PORT_NULL; + d->backend_data = pci_malloc(d->access, sizeof(mach_port_t)); + *((mach_port_t *) d->backend_data) = MACH_PORT_NULL; } /* Deallocate the port and free its space */ @@ -84,17 +84,18 @@ hurd_cleanup_dev(struct pci_dev *d) { mach_port_t device_port; - device_port = *((mach_port_t *) d->aux); + device_port = *((mach_port_t *) d->backend_data); mach_port_deallocate(mach_task_self(), device_port); - pci_mfree(d->aux); + pci_mfree(d->backend_data); + d->backend_data = NULL; } static mach_port_t device_port_lookup(struct pci_dev *d) { char server[NAME_MAX]; - mach_port_t device_port = *((mach_port_t *) d->aux); + mach_port_t device_port = *((mach_port_t *) d->backend_data); if (device_port != MACH_PORT_NULL) return device_port; @@ -107,7 +108,7 @@ device_port_lookup(struct pci_dev *d) if (device_port == MACH_PORT_NULL) d->access->error("Cannot find the PCI arbiter"); - *((mach_port_t *) d->aux) = device_port; + *((mach_port_t *) d->backend_data) = device_port; return device_port; } |