scan.c (5cc619db5c34146ee821acd08382b9d78579b52e) | scan.c (a64a62ce9a380213dc9e192f762266d70c9b40ec) |
---|---|
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> --- 1010 unchanged lines hidden (view full) --- 1019 1020 switch (device->device_type) { 1021 case ACPI_BUS_TYPE_POWER_BUTTON: 1022 strcpy(device->pnp.bus_id, "PWRF"); 1023 break; 1024 case ACPI_BUS_TYPE_SLEEP_BUTTON: 1025 strcpy(device->pnp.bus_id, "SLPF"); 1026 break; | 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> --- 1010 unchanged lines hidden (view full) --- 1019 1020 switch (device->device_type) { 1021 case ACPI_BUS_TYPE_POWER_BUTTON: 1022 strcpy(device->pnp.bus_id, "PWRF"); 1023 break; 1024 case ACPI_BUS_TYPE_SLEEP_BUTTON: 1025 strcpy(device->pnp.bus_id, "SLPF"); 1026 break; |
1027 case ACPI_BUS_TYPE_ECDT_EC: 1028 strcpy(device->pnp.bus_id, "ECDT"); 1029 break; |
|
1027 default: 1028 acpi_get_name(device->handle, ACPI_SINGLE_NAME, &buffer); 1029 /* Clean up trailing underscores (if any) */ 1030 for (i = 3; i > 1; i--) { 1031 if (bus_id[i] == '_') 1032 bus_id[i] = '\0'; 1033 else 1034 break; --- 264 unchanged lines hidden (view full) --- 1299 acpi_add_id(pnp, ACPI_THERMAL_HID); 1300 break; 1301 case ACPI_BUS_TYPE_POWER_BUTTON: 1302 acpi_add_id(pnp, ACPI_BUTTON_HID_POWERF); 1303 break; 1304 case ACPI_BUS_TYPE_SLEEP_BUTTON: 1305 acpi_add_id(pnp, ACPI_BUTTON_HID_SLEEPF); 1306 break; | 1030 default: 1031 acpi_get_name(device->handle, ACPI_SINGLE_NAME, &buffer); 1032 /* Clean up trailing underscores (if any) */ 1033 for (i = 3; i > 1; i--) { 1034 if (bus_id[i] == '_') 1035 bus_id[i] = '\0'; 1036 else 1037 break; --- 264 unchanged lines hidden (view full) --- 1302 acpi_add_id(pnp, ACPI_THERMAL_HID); 1303 break; 1304 case ACPI_BUS_TYPE_POWER_BUTTON: 1305 acpi_add_id(pnp, ACPI_BUTTON_HID_POWERF); 1306 break; 1307 case ACPI_BUS_TYPE_SLEEP_BUTTON: 1308 acpi_add_id(pnp, ACPI_BUTTON_HID_SLEEPF); 1309 break; |
1310 case ACPI_BUS_TYPE_ECDT_EC: 1311 acpi_add_id(pnp, ACPI_ECDT_HID); 1312 break; |
|
1307 } 1308} 1309 1310void acpi_free_pnp_ids(struct acpi_device_pnp *pnp) 1311{ 1312 struct acpi_hardware_id *id, *tmp; 1313 1314 list_for_each_entry_safe(id, tmp, &pnp->ids, list) { --- 729 unchanged lines hidden (view full) --- 2044 * that. 2045 */ 2046 acpi_device_set_power(adev, ACPI_STATE_D3_COLD); 2047 adev->flags.initialized = false; 2048 acpi_device_clear_enumerated(adev); 2049} 2050EXPORT_SYMBOL_GPL(acpi_bus_trim); 2051 | 1313 } 1314} 1315 1316void acpi_free_pnp_ids(struct acpi_device_pnp *pnp) 1317{ 1318 struct acpi_hardware_id *id, *tmp; 1319 1320 list_for_each_entry_safe(id, tmp, &pnp->ids, list) { --- 729 unchanged lines hidden (view full) --- 2050 * that. 2051 */ 2052 acpi_device_set_power(adev, ACPI_STATE_D3_COLD); 2053 adev->flags.initialized = false; 2054 acpi_device_clear_enumerated(adev); 2055} 2056EXPORT_SYMBOL_GPL(acpi_bus_trim); 2057 |
2058int acpi_bus_register_early_device(int type) 2059{ 2060 struct acpi_device *device = NULL; 2061 int result; 2062 2063 result = acpi_add_single_object(&device, NULL, 2064 type, ACPI_STA_DEFAULT); 2065 if (result) 2066 return result; 2067 2068 device->flags.match_driver = true; 2069 return device_attach(&device->dev); 2070} 2071EXPORT_SYMBOL_GPL(acpi_bus_register_early_device); 2072 |
|
2052static int acpi_bus_scan_fixed(void) 2053{ 2054 int result = 0; 2055 2056 /* 2057 * Enumerate all fixed-feature devices. 2058 */ 2059 if (!(acpi_gbl_FADT.flags & ACPI_FADT_POWER_BUTTON)) { --- 208 unchanged lines hidden --- | 2073static int acpi_bus_scan_fixed(void) 2074{ 2075 int result = 0; 2076 2077 /* 2078 * Enumerate all fixed-feature devices. 2079 */ 2080 if (!(acpi_gbl_FADT.flags & ACPI_FADT_POWER_BUTTON)) { --- 208 unchanged lines hidden --- |