aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2010-07-20 18:18:36 -0400
committerLen Brown <len.brown@intel.com>2010-08-15 00:53:08 -0400
commitcfa806f059801dbe7e435745eb2e187c8bfe1e7f (patch)
tree9c99026f29b863ca0541699e45349b8fa40ea93a /drivers/acpi/osl.c
parent43d9f87b79804f2d75d9d8a81c862b179f055a15 (diff)
gcc-4.6: ACPI: fix unused but set variables in ACPI
Some minor improvements in error handling, but overall it was mostly dead code. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 44bddc5bc6ad..03017b1eb38b 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -141,15 +141,14 @@ static struct osi_linux {
141static void __init acpi_request_region (struct acpi_generic_address *addr, 141static void __init acpi_request_region (struct acpi_generic_address *addr,
142 unsigned int length, char *desc) 142 unsigned int length, char *desc)
143{ 143{
144 struct resource *res;
145
146 if (!addr->address || !length) 144 if (!addr->address || !length)
147 return; 145 return;
148 146
147 /* Resources are never freed */
149 if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_IO) 148 if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
150 res = request_region(addr->address, length, desc); 149 request_region(addr->address, length, desc);
151 else if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) 150 else if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
152 res = request_mem_region(addr->address, length, desc); 151 request_mem_region(addr->address, length, desc);
153} 152}
154 153
155static int __init acpi_reserve_resources(void) 154static int __init acpi_reserve_resources(void)