diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-29 20:03:08 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-29 20:03:08 +0100 |
commit | 0191a6b08f1d0e023994a64079be2d3b764d6232 (patch) | |
tree | 909c5a260c4729fac8aa0c7aeef8e992a890ce3d /linux/dev | |
parent | 5180188d834e86562353794c433b17f2e374657f (diff) |
Use PCI macros
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Use
PCI_BASE_ADDRESS_SPACE_IO and PCI_BASE_ADDRESS_MEM_MASK macros instead of
hardcoded values.
Diffstat (limited to 'linux/dev')
-rw-r--r-- | linux/dev/drivers/block/ahci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/dev/drivers/block/ahci.c b/linux/dev/drivers/block/ahci.c index aaa0eab..f67ba2f 100644 --- a/linux/dev/drivers/block/ahci.c +++ b/linux/dev/drivers/block/ahci.c @@ -839,11 +839,11 @@ static void ahci_probe_dev(unsigned char bus, unsigned char device) printk("ahci: %02x:%02x.%x: Can not read BAR 5", bus, dev, fun); return; } - if (bar & 0x01) { + if (bar & PCI_BASE_ADDRESS_SPACE_IO) { printk("ahci: %02x:%02x.%x: BAR 5 is I/O?!", bus, dev, fun); return; } - bar &= ~0x0f; + bar &= PCI_BASE_ADDRESS_MEM_MASK; if (pcibios_read_config_byte(bus, device, PCI_INTERRUPT_LINE, &irq) != PCIBIOS_SUCCESSFUL) { printk("ahci: %02x:%02x.%x: Can not read IRQ", bus, dev, fun); |