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.
Format: { parport<nr> | timid | 0 }
See also Documentation/parport.txt.
pnpacpi= [ACPI]
{ off }
pnpbios= [ISAPNP]
{ on | off | curr | res | no-curr | no-res }
......
......@@ -276,17 +276,25 @@ int acpi_pci_unbind(
int result = 0;
acpi_status status = AE_OK;
struct acpi_pci_data *data = NULL;
char pathname[ACPI_PATHNAME_MAX] = {0};
struct acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
char *pathname = NULL;
struct acpi_buffer buffer = {0, NULL};
ACPI_FUNCTION_TRACE("acpi_pci_unbind");
if (!device || !device->parent)
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_DEBUG_PRINT((ACPI_DB_INFO, "Unbinding PCI device [%s]...\n",
pathname));
kfree(pathname);
status = acpi_get_data(device->handle, acpi_pci_data_handler, (void**)&data);
if (ACPI_FAILURE(status)) {
......
......@@ -884,7 +884,7 @@ acpi_ut_create_update_state_and_push (
* DESCRIPTION: Create a new state and push it
*
******************************************************************************/
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_ut_create_pkg_state_and_push (
void *internal_object,
......@@ -906,7 +906,7 @@ acpi_ut_create_pkg_state_and_push (
acpi_ut_push_generic_state (state_list, state);
return (AE_OK);
}
#endif /* ACPI_FUTURE_USAGE */
/*******************************************************************************
*
......
......@@ -244,26 +244,34 @@ acpi_evaluate_integer (
unsigned long *data)
{
acpi_status status = AE_OK;
union acpi_object element;
struct acpi_buffer buffer = {sizeof(union acpi_object), &element};
union acpi_object *element;
struct acpi_buffer buffer = {0,NULL};
ACPI_FUNCTION_TRACE("acpi_evaluate_integer");
if (!data)
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);
if (ACPI_FAILURE(status)) {
acpi_util_eval_error(handle, pathname, 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);
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));
......
......@@ -241,10 +241,11 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle,
return AE_OK;
}
int pnpacpi_disabled __initdata;
int __init pnpacpi_init(void)
{
if (acpi_disabled) {
pnp_info("PnP ACPI: ACPI disable");
if (acpi_disabled || pnpacpi_disabled) {
pnp_info("PnP ACPI: disabled");
return 0;
}
pnp_info("PnP ACPI init");
......@@ -255,4 +256,14 @@ int __init pnpacpi_init(void)
}
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);
......@@ -538,10 +538,11 @@ int __init pnpbios_init(void)
return -ENODEV;
}
#ifdef CONFIG_ACPI
if (!acpi_disabled) {
#ifdef CONFIG_PNPACPI
extern int pnpacpi_disabled;
if (!acpi_disabled && !pnpacpi_disabled) {
pnpbios_disabled = 1;
printk(KERN_INFO "PnPBIOS: Disabled by ACPI\n");
printk(KERN_INFO "PnPBIOS: Disabled by ACPI PNP\n");
return -ENODEV;
}
#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