diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 14:52:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 14:52:52 -0400 |
commit | 08acd4f8af42affd8cbed81cc1b69fa12ddb213f (patch) | |
tree | 988d15db6233b20db6a500cd5f590c6d2041462d /drivers/acpi/resources/rsio.c | |
parent | ccf2779544eecfcc5447e2028d1029b6d4ff7bb6 (diff) | |
parent | 008238b54ac2350babf195084ecedbcf7851a202 (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: (179 commits)
ACPI: Fix acpi_processor_idle and idle= boot parameters interaction
acpi: fix section mismatch warning in pnpacpi
intel_menlo: fix build warning
ACPI: Cleanup: Remove unneeded, multiple local dummy variables
ACPI: video - fix permissions on some proc entries
ACPI: video - properly handle errors when registering proc elements
ACPI: video - do not store invalid entries in attached_array list
ACPI: re-name acpi_pm_ops to acpi_suspend_ops
ACER_WMI/ASUS_LAPTOP: fix build bug
thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed
ACPI: check a return value correctly in acpi_power_get_context()
#if 0 acpi/bay.c:eject_removable_drive()
eeepc-laptop: add hwmon fan control
eeepc-laptop: add backlight
eeepc-laptop: add base driver
ACPI: thinkpad-acpi: bump up version to 0.20
ACPI: thinkpad-acpi: fix selects in Kconfig
ACPI: thinkpad-acpi: use a private workqueue
ACPI: thinkpad-acpi: fluff really minor fix
ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation
...
Fixed conflicts in drivers/acpi/video.c and drivers/misc/intel_menlow.c
manually.
Diffstat (limited to 'drivers/acpi/resources/rsio.c')
-rw-r--r-- | drivers/acpi/resources/rsio.c | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/drivers/acpi/resources/rsio.c b/drivers/acpi/resources/rsio.c index b297bc3e4419..b66d42e7402e 100644 --- a/drivers/acpi/resources/rsio.c +++ b/drivers/acpi/resources/rsio.c | |||
@@ -5,7 +5,7 @@ | |||
5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2007, R. Byron Moore | 8 | * Copyright (C) 2000 - 2008, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -185,7 +185,7 @@ struct acpi_rsconvert_info acpi_rs_convert_end_tag[2] = { | |||
185 | * | 185 | * |
186 | ******************************************************************************/ | 186 | ******************************************************************************/ |
187 | 187 | ||
188 | struct acpi_rsconvert_info acpi_rs_get_start_dpf[5] = { | 188 | struct acpi_rsconvert_info acpi_rs_get_start_dpf[6] = { |
189 | {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_START_DEPENDENT, | 189 | {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_START_DEPENDENT, |
190 | ACPI_RS_SIZE(struct acpi_resource_start_dependent), | 190 | ACPI_RS_SIZE(struct acpi_resource_start_dependent), |
191 | ACPI_RSC_TABLE_SIZE(acpi_rs_get_start_dpf)}, | 191 | ACPI_RSC_TABLE_SIZE(acpi_rs_get_start_dpf)}, |
@@ -196,6 +196,12 @@ struct acpi_rsconvert_info acpi_rs_get_start_dpf[5] = { | |||
196 | ACPI_ACCEPTABLE_CONFIGURATION, | 196 | ACPI_ACCEPTABLE_CONFIGURATION, |
197 | 2}, | 197 | 2}, |
198 | 198 | ||
199 | /* Get the descriptor length (0 or 1 for Start Dpf descriptor) */ | ||
200 | |||
201 | {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.start_dpf.descriptor_length), | ||
202 | AML_OFFSET(start_dpf.descriptor_type), | ||
203 | 0}, | ||
204 | |||
199 | /* All done if there is no flag byte present in the descriptor */ | 205 | /* All done if there is no flag byte present in the descriptor */ |
200 | 206 | ||
201 | {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 1}, | 207 | {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 1}, |
@@ -219,7 +225,9 @@ struct acpi_rsconvert_info acpi_rs_get_start_dpf[5] = { | |||
219 | * | 225 | * |
220 | ******************************************************************************/ | 226 | ******************************************************************************/ |
221 | 227 | ||
222 | struct acpi_rsconvert_info acpi_rs_set_start_dpf[6] = { | 228 | struct acpi_rsconvert_info acpi_rs_set_start_dpf[10] = { |
229 | /* Start with a default descriptor of length 1 */ | ||
230 | |||
223 | {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_START_DEPENDENT, | 231 | {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_START_DEPENDENT, |
224 | sizeof(struct aml_resource_start_dependent), | 232 | sizeof(struct aml_resource_start_dependent), |
225 | ACPI_RSC_TABLE_SIZE(acpi_rs_set_start_dpf)}, | 233 | ACPI_RSC_TABLE_SIZE(acpi_rs_set_start_dpf)}, |
@@ -236,6 +244,33 @@ struct acpi_rsconvert_info acpi_rs_set_start_dpf[6] = { | |||
236 | AML_OFFSET(start_dpf.flags), | 244 | AML_OFFSET(start_dpf.flags), |
237 | 2}, | 245 | 2}, |
238 | /* | 246 | /* |
247 | * All done if the output descriptor length is required to be 1 | ||
248 | * (i.e., optimization to 0 bytes cannot be attempted) | ||
249 | */ | ||
250 | {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE, | ||
251 | ACPI_RS_OFFSET(data.start_dpf.descriptor_length), | ||
252 | 1}, | ||
253 | |||
254 | /* Set length to 0 bytes (no flags byte) */ | ||
255 | |||
256 | {ACPI_RSC_LENGTH, 0, 0, | ||
257 | sizeof(struct aml_resource_start_dependent_noprio)}, | ||
258 | |||
259 | /* | ||
260 | * All done if the output descriptor length is required to be 0. | ||
261 | * | ||
262 | * TBD: Perhaps we should check for error if input flags are not | ||
263 | * compatible with a 0-byte descriptor. | ||
264 | */ | ||
265 | {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE, | ||
266 | ACPI_RS_OFFSET(data.start_dpf.descriptor_length), | ||
267 | 0}, | ||
268 | |||
269 | /* Reset length to 1 byte (descriptor with flags byte) */ | ||
270 | |||
271 | {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_start_dependent)}, | ||
272 | |||
273 | /* | ||
239 | * All done if flags byte is necessary -- if either priority value | 274 | * All done if flags byte is necessary -- if either priority value |
240 | * is not ACPI_ACCEPTABLE_CONFIGURATION | 275 | * is not ACPI_ACCEPTABLE_CONFIGURATION |
241 | */ | 276 | */ |