Commit 872898de authored by Len Brown's avatar Len Brown

Merge intel.com:/home/lenb/src/26-stable-dev

into intel.com:/home/lenb/src/26-latest-dev
parents 2ec8b33e 43b2bf3e
...@@ -1014,6 +1014,9 @@ running once the system is up. ...@@ -1014,6 +1014,9 @@ running once the system is up.
Format: { parport<nr> | timid | 0 } Format: { parport<nr> | timid | 0 }
See also Documentation/parport.txt. See also Documentation/parport.txt.
pnpacpi= [ACPI]
{ off }
pnpbios= [ISAPNP] pnpbios= [ISAPNP]
{ on | off | curr | res | no-curr | no-res } { on | off | curr | res | no-curr | no-res }
......
...@@ -276,17 +276,25 @@ int acpi_pci_unbind( ...@@ -276,17 +276,25 @@ int acpi_pci_unbind(
int result = 0; int result = 0;
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct acpi_pci_data *data = NULL; struct acpi_pci_data *data = NULL;
char pathname[ACPI_PATHNAME_MAX] = {0}; char *pathname = NULL;
struct acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname}; struct acpi_buffer buffer = {0, NULL};
ACPI_FUNCTION_TRACE("acpi_pci_unbind"); ACPI_FUNCTION_TRACE("acpi_pci_unbind");
if (!device || !device->parent) if (!device || !device->parent)
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
pathname = (char *) kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if(!pathname)
return_VALUE(-ENOMEM);
memset(pathname, 0, ACPI_PATHNAME_MAX);
buffer.length = ACPI_PATHNAME_MAX;
buffer.pointer = pathname;
acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer); acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unbinding PCI device [%s]...\n", ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unbinding PCI device [%s]...\n",
pathname)); pathname));
kfree(pathname);
status = acpi_get_data(device->handle, acpi_pci_data_handler, (void**)&data); status = acpi_get_data(device->handle, acpi_pci_data_handler, (void**)&data);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
......
...@@ -884,7 +884,7 @@ acpi_ut_create_update_state_and_push ( ...@@ -884,7 +884,7 @@ acpi_ut_create_update_state_and_push (
* DESCRIPTION: Create a new state and push it * DESCRIPTION: Create a new state and push it
* *
******************************************************************************/ ******************************************************************************/
#ifdef ACPI_FUTURE_USAGE
acpi_status acpi_status
acpi_ut_create_pkg_state_and_push ( acpi_ut_create_pkg_state_and_push (
void *internal_object, void *internal_object,
...@@ -906,7 +906,7 @@ acpi_ut_create_pkg_state_and_push ( ...@@ -906,7 +906,7 @@ acpi_ut_create_pkg_state_and_push (
acpi_ut_push_generic_state (state_list, state); acpi_ut_push_generic_state (state_list, state);
return (AE_OK); return (AE_OK);
} }
#endif /* ACPI_FUTURE_USAGE */
/******************************************************************************* /*******************************************************************************
* *
......
...@@ -244,26 +244,34 @@ acpi_evaluate_integer ( ...@@ -244,26 +244,34 @@ acpi_evaluate_integer (
unsigned long *data) unsigned long *data)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
union acpi_object element; union acpi_object *element;
struct acpi_buffer buffer = {sizeof(union acpi_object), &element}; struct acpi_buffer buffer = {0,NULL};
ACPI_FUNCTION_TRACE("acpi_evaluate_integer"); ACPI_FUNCTION_TRACE("acpi_evaluate_integer");
if (!data) if (!data)
return_ACPI_STATUS(AE_BAD_PARAMETER); return_ACPI_STATUS(AE_BAD_PARAMETER);
element = kmalloc(sizeof(union acpi_object), GFP_KERNEL);
if(!element)
return_ACPI_STATUS(AE_NO_MEMORY);
memset(element, 0, sizeof(union acpi_object));
buffer.length = sizeof(union acpi_object);
buffer.pointer = element;
status = acpi_evaluate_object(handle, pathname, arguments, &buffer); status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
acpi_util_eval_error(handle, pathname, status); acpi_util_eval_error(handle, pathname, status);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
if (element.type != ACPI_TYPE_INTEGER) { if (element->type != ACPI_TYPE_INTEGER) {
acpi_util_eval_error(handle, pathname, AE_BAD_DATA); acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
return_ACPI_STATUS(AE_BAD_DATA); return_ACPI_STATUS(AE_BAD_DATA);
} }
*data = element.integer.value; *data = element->integer.value;
kfree(element);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data)); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data));
......
...@@ -241,10 +241,11 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle, ...@@ -241,10 +241,11 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle,
return AE_OK; return AE_OK;
} }
int pnpacpi_disabled __initdata;
int __init pnpacpi_init(void) int __init pnpacpi_init(void)
{ {
if (acpi_disabled) { if (acpi_disabled || pnpacpi_disabled) {
pnp_info("PnP ACPI: ACPI disable"); pnp_info("PnP ACPI: disabled");
return 0; return 0;
} }
pnp_info("PnP ACPI init"); pnp_info("PnP ACPI init");
...@@ -255,4 +256,14 @@ int __init pnpacpi_init(void) ...@@ -255,4 +256,14 @@ int __init pnpacpi_init(void)
} }
subsys_initcall(pnpacpi_init); subsys_initcall(pnpacpi_init);
static int __init pnpacpi_setup(char *str)
{
if (str == NULL)
return 1;
if (!strncmp(str, "off", 3))
pnpacpi_disabled = 1;
return 1;
}
__setup("pnpacpi=", pnpacpi_setup);
EXPORT_SYMBOL(pnpacpi_protocol); EXPORT_SYMBOL(pnpacpi_protocol);
...@@ -538,10 +538,11 @@ int __init pnpbios_init(void) ...@@ -538,10 +538,11 @@ int __init pnpbios_init(void)
return -ENODEV; return -ENODEV;
} }
#ifdef CONFIG_ACPI #ifdef CONFIG_PNPACPI
if (!acpi_disabled) { extern int pnpacpi_disabled;
if (!acpi_disabled && !pnpacpi_disabled) {
pnpbios_disabled = 1; pnpbios_disabled = 1;
printk(KERN_INFO "PnPBIOS: Disabled by ACPI\n"); printk(KERN_INFO "PnPBIOS: Disabled by ACPI PNP\n");
return -ENODEV; return -ENODEV;
} }
#endif /* CONFIG_ACPI */ #endif /* CONFIG_ACPI */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment