scan.c (f058cdf4cf3e5181172455f90fc73f2127b6ddf8) | scan.c (0aa120a0138398d6597350f4c1dcb46d14be1a0b) |
---|---|
1/* 2 * scan.c - support for transforming the ACPI namespace into individual objects 3 */ 4 5#include <linux/module.h> 6#include <linux/init.h> 7#include <linux/slab.h> 8#include <linux/kernel.h> --- 111 unchanged lines hidden (view full) --- 120 121 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 122 "Hot-removing device %s...\n", dev_name(&device->dev))); 123 124 __acpi_bus_trim(device); 125 /* Device node has been released. */ 126 device = NULL; 127 | 1/* 2 * scan.c - support for transforming the ACPI namespace into individual objects 3 */ 4 5#include <linux/module.h> 6#include <linux/init.h> 7#include <linux/slab.h> 8#include <linux/kernel.h> --- 111 unchanged lines hidden (view full) --- 120 121 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 122 "Hot-removing device %s...\n", dev_name(&device->dev))); 123 124 __acpi_bus_trim(device); 125 /* Device node has been released. */ 126 device = NULL; 127 |
128 /* power off device */ 129 status = acpi_evaluate_object(handle, "_PS3", NULL, NULL); 130 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) 131 printk(KERN_WARNING PREFIX 132 "Power-off device failed\n"); 133 | |
134 if (ACPI_SUCCESS(acpi_get_handle(handle, "_LCK", &temp))) { 135 arg_list.count = 1; 136 arg_list.pointer = &arg; 137 arg.type = ACPI_TYPE_INTEGER; 138 arg.integer.value = 0; 139 acpi_evaluate_object(handle, "_LCK", &arg_list, NULL); 140 } 141 --- 633 unchanged lines hidden (view full) --- 775 776 acpi_power_add_remove_device(device, false); 777 acpi_device_remove_files(device); 778 if (device->remove) 779 device->remove(device); 780 781 device_del(&device->dev); 782 /* | 128 if (ACPI_SUCCESS(acpi_get_handle(handle, "_LCK", &temp))) { 129 arg_list.count = 1; 130 arg_list.pointer = &arg; 131 arg.type = ACPI_TYPE_INTEGER; 132 arg.integer.value = 0; 133 acpi_evaluate_object(handle, "_LCK", &arg_list, NULL); 134 } 135 --- 633 unchanged lines hidden (view full) --- 769 770 acpi_power_add_remove_device(device, false); 771 acpi_device_remove_files(device); 772 if (device->remove) 773 device->remove(device); 774 775 device_del(&device->dev); 776 /* |
783 * Drop the reference counts of all power resources the device depends 784 * on and turn off the ones that have no more references. | 777 * Transition the device to D3cold to drop the reference counts of all 778 * power resources the device depends on and turn off the ones that have 779 * no more references. |
785 */ | 780 */ |
786 acpi_power_transition(device, ACPI_STATE_D3_COLD); | 781 acpi_device_set_power(device, ACPI_STATE_D3_COLD); |
787 put_device(&device->dev); 788} 789 790/* -------------------------------------------------------------------------- 791 Driver Management 792 -------------------------------------------------------------------------- */ 793/** 794 * acpi_bus_driver_init - add a device to a driver --- 991 unchanged lines hidden --- | 782 put_device(&device->dev); 783} 784 785/* -------------------------------------------------------------------------- 786 Driver Management 787 -------------------------------------------------------------------------- */ 788/** 789 * acpi_bus_driver_init - add a device to a driver --- 991 unchanged lines hidden --- |