}
static void acpi_dev_memresource_flags(struct resource *res, u64 len,
- u8 write_protect, bool window)
+ u8 write_protect)
{
res->flags = IORESOURCE_MEM;
if (write_protect == ACPI_READ_WRITE_MEMORY)
res->flags |= IORESOURCE_MEM_WRITEABLE;
-
- if (window)
- res->flags |= IORESOURCE_WINDOW;
}
static void acpi_dev_get_memresource(struct resource *res, u64 start, u64 len,
{
res->start = start;
res->end = start + len - 1;
- acpi_dev_memresource_flags(res, len, write_protect, false);
+ acpi_dev_memresource_flags(res, len, write_protect);
}
/**
EXPORT_SYMBOL_GPL(acpi_dev_resource_memory);
static void acpi_dev_ioresource_flags(struct resource *res, u64 len,
- u8 io_decode, bool window)
+ u8 io_decode)
{
res->flags = IORESOURCE_IO;
if (io_decode == ACPI_DECODE_16)
res->flags |= IORESOURCE_IO_16BIT_ADDR;
-
- if (window)
- res->flags |= IORESOURCE_WINDOW;
}
static void acpi_dev_get_ioresource(struct resource *res, u64 start, u64 len,
{
res->start = start;
res->end = start + len - 1;
- acpi_dev_ioresource_flags(res, len, io_decode, false);
+ acpi_dev_ioresource_flags(res, len, io_decode);
}
/**
struct acpi_address64_attribute *attr)
{
u8 iodec = attr->granularity == 0xfff ? ACPI_DECODE_10 : ACPI_DECODE_16;
- bool window = addr->producer_consumer == ACPI_PRODUCER;
bool wp = addr->info.mem.write_protect;
u64 len = attr->address_length;
switch (addr->resource_type) {
case ACPI_MEMORY_RANGE:
- acpi_dev_memresource_flags(res, len, wp, window);
+ acpi_dev_memresource_flags(res, len, wp);
break;
case ACPI_IO_RANGE:
- acpi_dev_ioresource_flags(res, len, iodec, window);
+ acpi_dev_ioresource_flags(res, len, iodec);
break;
case ACPI_BUS_NUMBER_RANGE:
res->flags = IORESOURCE_BUS;
return false;
}
+ if (addr->producer_consumer == ACPI_PRODUCER)
+ res->flags |= IORESOURCE_WINDOW;
+
return !(res->flags & IORESOURCE_DISABLED);
}