diff options
author | Len Brown <len.brown@intel.com> | 2007-11-20 01:20:31 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-11-20 01:20:31 -0500 |
commit | 614a6bbecceb97558819f18a676fd819ea61550b (patch) | |
tree | d3f59dc6ef0ffdb14d8047072e096fdabeaf7d2b /drivers/acpi/osl.c | |
parent | c2e46d2e2a8e6ed17fac6154ac7e5fa7fe4efb28 (diff) | |
parent | f79f06ab9f86d7203006d2ec8992ac80df36a34e (diff) |
Pull thermal into release branch
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index aabc6ca4a81c..e3a673a00845 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -387,17 +387,14 @@ acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width) if (!value) value = &dummy; - switch (width) { - case 8: + *value = 0; + if (width <= 8) { *(u8 *) value = inb(port); - break; - case 16: + } else if (width <= 16) { *(u16 *) value = inw(port); - break; - case 32: + } else if (width <= 32) { *(u32 *) value = inl(port); - break; - default: + } else { BUG(); } @@ -408,17 +405,13 @@ EXPORT_SYMBOL(acpi_os_read_port); acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width) { - switch (width) { - case 8: + if (width <= 8) { outb(value, port); - break; - case 16: + } else if (width <= 16) { outw(value, port); - break; - case 32: + } else if (width <= 32) { outl(value, port); - break; - default: + } else { BUG(); } |