Commit b6de3c42 authored by Niclas Zeising's avatar Niclas Zeising
Browse files

freebsd_pci: Fix types in write functions



Fix the type used in write functions to match the size of the write.
Signed-off-by: Niclas Zeising's avatarNiclas Zeising <zeising@daemonic.se>
parent 735c8a5f
......@@ -652,7 +652,7 @@ pci_device_freebsd_write32( struct pci_io_handle *handle, uint32_t reg,
#if defined(__i386__) || defined(__amd64__)
outl( handle->base + reg, data );
#else
*(uint16_t *)((uintptr_t)handle->memory + reg) = data;
*(uint32_t *)((uintptr_t)handle->memory + reg) = data;
#endif
}
......@@ -663,7 +663,7 @@ pci_device_freebsd_write16( struct pci_io_handle *handle, uint32_t reg,
#if defined(__i386__) || defined(__amd64__)
outw( handle->base + reg, data );
#else
*(uint8_t *)((uintptr_t)handle->memory + reg) = data;
*(uint16_t *)((uintptr_t)handle->memory + reg) = data;
#endif
}
......@@ -674,7 +674,7 @@ pci_device_freebsd_write8( struct pci_io_handle *handle, uint32_t reg,
#if defined(__i386__) || defined(__amd64__)
outb( handle->base + reg, data );
#else
*(uint32_t *)((uintptr_t)handle->memory + reg) = data;
*(uint8_t *)((uintptr_t)handle->memory + reg) = data;
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment