From 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 25 Mar 2016 03:53:42 -0300 Subject: Linux-libre 4.5-gnu --- drivers/acpi/acpica/utids.c | 69 +-------------------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) (limited to 'drivers/acpi/acpica/utids.c') diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c index 7956df1e2..6fb4ec365 100644 --- a/drivers/acpi/acpica/utids.c +++ b/drivers/acpi/acpica/utids.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2015, Intel Corp. + * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -125,73 +125,6 @@ cleanup: return_ACPI_STATUS(status); } -/******************************************************************************* - * - * FUNCTION: acpi_ut_execute_SUB - * - * PARAMETERS: device_node - Node for the device - * return_id - Where the _SUB is returned - * - * RETURN: Status - * - * DESCRIPTION: Executes the _SUB control method that returns the subsystem - * ID of the device. The _SUB value is always a string containing - * either a valid PNP or ACPI ID. - * - * NOTE: Internal function, no parameter validation - * - ******************************************************************************/ - -acpi_status -acpi_ut_execute_SUB(struct acpi_namespace_node *device_node, - struct acpi_pnp_device_id **return_id) -{ - union acpi_operand_object *obj_desc; - struct acpi_pnp_device_id *sub; - u32 length; - acpi_status status; - - ACPI_FUNCTION_TRACE(ut_execute_SUB); - - status = acpi_ut_evaluate_object(device_node, METHOD_NAME__SUB, - ACPI_BTYPE_STRING, &obj_desc); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* Get the size of the String to be returned, includes null terminator */ - - length = obj_desc->string.length + 1; - - /* Allocate a buffer for the SUB */ - - sub = - ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) + - (acpi_size) length); - if (!sub) { - status = AE_NO_MEMORY; - goto cleanup; - } - - /* Area for the string starts after PNP_DEVICE_ID struct */ - - sub->string = - ACPI_ADD_PTR(char, sub, sizeof(struct acpi_pnp_device_id)); - - /* Simply copy existing string */ - - strcpy(sub->string, obj_desc->string.pointer); - sub->length = length; - *return_id = sub; - -cleanup: - - /* On exit, we must delete the return object */ - - acpi_ut_remove_reference(obj_desc); - return_ACPI_STATUS(status); -} - /******************************************************************************* * * FUNCTION: acpi_ut_execute_UID -- cgit v1.2.3-54-g00ecf