diff options
author | Len Brown <len.brown@intel.com> | 2007-02-10 22:17:07 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-13 02:58:52 -0500 |
commit | 6eb87fed52b7f6ac200eaa649cc3221e239d0113 (patch) | |
tree | 65c278d0f969d8edb7c7292b35303eadbb7c82d2 /drivers/acpi/tables.c | |
parent | 5a8765a84c31ea51baf1f6c78116cd877bd8cd64 (diff) |
ACPI: acpi_table_parse_madt_family() is not MADT specific
acpi_table_parse_madt_family() is also used to parse SRAT entries.
So re-name it to acpi_table_parse_entries(), and re-name the
madt-specific variables within it accordingly.
cosmetic only.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables.c')
-rw-r--r-- | drivers/acpi/tables.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index f211fa35374c..4ed640031e9a 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -170,40 +170,40 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header * header) | |||
170 | 170 | ||
171 | 171 | ||
172 | int __init | 172 | int __init |
173 | acpi_table_parse_madt_family(char *id, | 173 | acpi_table_parse_entries(char *id, |
174 | unsigned long madt_size, | 174 | unsigned long table_size, |
175 | int entry_id, | 175 | int entry_id, |
176 | acpi_table_entry_handler handler, | 176 | acpi_table_entry_handler handler, |
177 | unsigned int max_entries) | 177 | unsigned int max_entries) |
178 | { | 178 | { |
179 | struct acpi_table_header *madt = NULL; | 179 | struct acpi_table_header *table_header = NULL; |
180 | struct acpi_subtable_header *entry; | 180 | struct acpi_subtable_header *entry; |
181 | unsigned int count = 0; | 181 | unsigned int count = 0; |
182 | unsigned long madt_end; | 182 | unsigned long table_end; |
183 | 183 | ||
184 | if (!handler) | 184 | if (!handler) |
185 | return -EINVAL; | 185 | return -EINVAL; |
186 | 186 | ||
187 | /* Locate the MADT (if exists). There should only be one. */ | 187 | /* Locate the table (if exists). There should only be one. */ |
188 | acpi_get_table(id, 0, &madt); | 188 | acpi_get_table(id, 0, &table_header); |
189 | 189 | ||
190 | if (!madt) { | 190 | if (!table_header) { |
191 | printk(KERN_WARNING PREFIX "%4.4s not present\n", id); | 191 | printk(KERN_WARNING PREFIX "%4.4s not present\n", id); |
192 | return -ENODEV; | 192 | return -ENODEV; |
193 | } | 193 | } |
194 | 194 | ||
195 | madt_end = (unsigned long)madt + madt->length; | 195 | table_end = (unsigned long)table_header + table_header->length; |
196 | 196 | ||
197 | /* Parse all entries looking for a match. */ | 197 | /* Parse all entries looking for a match. */ |
198 | 198 | ||
199 | entry = (struct acpi_subtable_header *) | 199 | entry = (struct acpi_subtable_header *) |
200 | ((unsigned long)madt + madt_size); | 200 | ((unsigned long)table_header + table_size); |
201 | 201 | ||
202 | while (((unsigned long)entry) + sizeof(struct acpi_subtable_header) < | 202 | while (((unsigned long)entry) + sizeof(struct acpi_subtable_header) < |
203 | madt_end) { | 203 | table_end) { |
204 | if (entry->type == entry_id | 204 | if (entry->type == entry_id |
205 | && (!max_entries || count++ < max_entries)) | 205 | && (!max_entries || count++ < max_entries)) |
206 | if (handler(entry, madt_end)) | 206 | if (handler(entry, table_end)) |
207 | return -EINVAL; | 207 | return -EINVAL; |
208 | 208 | ||
209 | entry = (struct acpi_subtable_header *) | 209 | entry = (struct acpi_subtable_header *) |
@@ -221,7 +221,7 @@ int __init | |||
221 | acpi_table_parse_madt(enum acpi_madt_type id, | 221 | acpi_table_parse_madt(enum acpi_madt_type id, |
222 | acpi_table_entry_handler handler, unsigned int max_entries) | 222 | acpi_table_entry_handler handler, unsigned int max_entries) |
223 | { | 223 | { |
224 | return acpi_table_parse_madt_family(ACPI_SIG_MADT, | 224 | return acpi_table_parse_entries(ACPI_SIG_MADT, |
225 | sizeof(struct acpi_table_madt), id, | 225 | sizeof(struct acpi_table_madt), id, |
226 | handler, max_entries); | 226 | handler, max_entries); |
227 | } | 227 | } |