提交 e814f6de 编写于 作者: T Thomas Gleixner 提交者: Rafael J. Wysocki

ACPI: Let the parser return false for disabled resources

If the parser disables a resource during parsing, let it return false,
so the calling code does not need to implement further checks.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 1d0420f1
......@@ -219,10 +219,10 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares,
res->flags = IORESOURCE_BUS;
break;
default:
res->flags = 0;
return false;
}
return true;
return !(res->flags & IORESOURCE_DISABLED);
}
EXPORT_SYMBOL_GPL(acpi_dev_resource_address_space);
......@@ -268,10 +268,10 @@ bool acpi_dev_resource_ext_address_space(struct acpi_resource *ares,
res->flags = IORESOURCE_BUS;
break;
default:
res->flags = 0;
return false;
}
return true;
return !(res->flags & IORESOURCE_DISABLED);
}
EXPORT_SYMBOL_GPL(acpi_dev_resource_ext_address_space);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册