From 0191a6b08f1d0e023994a64079be2d3b764d6232 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 29 Jan 2016 20:03:08 +0100 Subject: 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. --- linux/dev/drivers/block/ahci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux') 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); -- cgit v1.2.3