[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] ACPI: check acpi_disabled in acpi_table_parse() and acpi_table_parse_entries()



commit 865d791263eb55c470979b2a22c4ff0568a920a3
Author:     Len Brown <len.brown@xxxxxxxxx>
AuthorDate: Mon Jan 18 14:53:41 2016 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Jan 18 14:53:41 2016 +0100

    ACPI: check acpi_disabled in acpi_table_parse() and 
acpi_table_parse_entries()
    
    Allow consumers of the acpi_table_parse()/acpi_table_parse_entries() API
    to gracefully handle the acpi_disabled=1 case via return value
    rather than checking the global flag themselves.
    
    Signed-off-by: Feng Tang <feng.tang@xxxxxxxxx>
    Signed-off-by: Len Brown <len.brown@xxxxxxxxx>
    [Linux commit e5b8fc6ac158f65598f58dba2c0d52ba3b412f52]
    Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
---
 xen/drivers/acpi/tables.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c
index 60c4ab1..39f1223 100644
--- a/xen/drivers/acpi/tables.c
+++ b/xen/drivers/acpi/tables.c
@@ -210,6 +210,9 @@ acpi_table_parse_entries(char *id,
        unsigned int count = 0;
        unsigned long table_end;
 
+       if (acpi_disabled)
+               return -ENODEV;
+
        if (!handler)
                return -EINVAL;
 
@@ -279,6 +282,9 @@ int __init acpi_table_parse(char *id, acpi_table_handler 
handler)
 {
        struct acpi_table_header *table = NULL;
 
+       if (acpi_disabled)
+               return -ENODEV;
+
        if (!handler)
                return -EINVAL;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.