aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-17 15:47:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-17 15:47:47 -0400
commita6b52a9db891e2a39e8a0fed6005935d8b1aa59c (patch)
tree3fbef9df274667d1e96894c2b8c373b7192cfaf1 /drivers
parent247dc220f410969b35f884f1554fe9b78119dd59 (diff)
parent7fb574a97f7147610c44cef55d0cde2409392a80 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: Fixes device power states array overflow ACPI, APEI, HEST, Detect duplicated hardware error source ID ACPI: Fix lockdep false positives in acpi_power_off()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/apei/hest.c12
-rw-r--r--drivers/acpi/osl.c17
2 files changed, 11 insertions, 18 deletions
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index abda3786a5d7..181bc2f7bb74 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -139,13 +139,23 @@ static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data)
139{ 139{
140 struct platform_device *ghes_dev; 140 struct platform_device *ghes_dev;
141 struct ghes_arr *ghes_arr = data; 141 struct ghes_arr *ghes_arr = data;
142 int rc; 142 int rc, i;
143 143
144 if (hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR) 144 if (hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR)
145 return 0; 145 return 0;
146 146
147 if (!((struct acpi_hest_generic *)hest_hdr)->enabled) 147 if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
148 return 0; 148 return 0;
149 for (i = 0; i < ghes_arr->count; i++) {
150 struct acpi_hest_header *hdr;
151 ghes_dev = ghes_arr->ghes_devs[i];
152 hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;
153 if (hdr->source_id == hest_hdr->source_id) {
154 pr_warning(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
155 hdr->source_id);
156 return -EIO;
157 }
158 }
149 ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id); 159 ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id);
150 if (!ghes_dev) 160 if (!ghes_dev)
151 return -ENOMEM; 161 return -ENOMEM;
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 52ca9649d769..372f9b70f7f4 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1333,23 +1333,6 @@ int acpi_resources_are_enforced(void)
1333EXPORT_SYMBOL(acpi_resources_are_enforced); 1333EXPORT_SYMBOL(acpi_resources_are_enforced);
1334 1334
1335/* 1335/*
1336 * Create and initialize a spinlock.
1337 */
1338acpi_status
1339acpi_os_create_lock(acpi_spinlock *out_handle)
1340{
1341 spinlock_t *lock;
1342
1343 lock = ACPI_ALLOCATE(sizeof(spinlock_t));
1344 if (!lock)
1345 return AE_NO_MEMORY;
1346 spin_lock_init(lock);
1347 *out_handle = lock;
1348
1349 return AE_OK;
1350}
1351
1352/*
1353 * Deallocate the memory for a spinlock. 1336 * Deallocate the memory for a spinlock.
1354 */ 1337 */
1355void acpi_os_delete_lock(acpi_spinlock handle) 1338void acpi_os_delete_lock(acpi_spinlock handle)