scan.c (d2f6650a950dadd20667a04a9dc785f240d43695) | scan.c (7779688fc3d1ceddad84846a7b0affbe8e78ec6e) |
---|---|
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/kernel.h> 8#include <linux/acpi.h> --- 1322 unchanged lines hidden (view full) --- 1331 1332 status = acpi_bus_check_add(handle, 0, ops, &device); 1333 if (ACPI_SUCCESS(status)) 1334 acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX, 1335 acpi_bus_check_add, NULL, ops, &device); 1336 1337 if (child) 1338 *child = device; | 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/kernel.h> 8#include <linux/acpi.h> --- 1322 unchanged lines hidden (view full) --- 1331 1332 status = acpi_bus_check_add(handle, 0, ops, &device); 1333 if (ACPI_SUCCESS(status)) 1334 acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX, 1335 acpi_bus_check_add, NULL, ops, &device); 1336 1337 if (child) 1338 *child = device; |
1339 return 0; | 1339 1340 if (device) 1341 return 0; 1342 else 1343 return -ENODEV; |
1340} 1341 | 1344} 1345 |
1346/* 1347 * acpi_bus_add and acpi_bus_start 1348 * 1349 * scan a given ACPI tree and (probably recently hot-plugged) 1350 * create and add or starts found devices. 1351 * 1352 * If no devices were found -ENODEV is returned which does not 1353 * mean that this is a real error, there just have been no suitable 1354 * ACPI objects in the table trunk from which the kernel could create 1355 * a device and add/start an appropriate driver. 1356 */ 1357 |
|
1342int 1343acpi_bus_add(struct acpi_device **child, 1344 struct acpi_device *parent, acpi_handle handle, int type) 1345{ 1346 struct acpi_bus_ops ops; 1347 1348 memset(&ops, 0, sizeof(ops)); 1349 ops.acpi_op_add = 1; 1350 | 1358int 1359acpi_bus_add(struct acpi_device **child, 1360 struct acpi_device *parent, acpi_handle handle, int type) 1361{ 1362 struct acpi_bus_ops ops; 1363 1364 memset(&ops, 0, sizeof(ops)); 1365 ops.acpi_op_add = 1; 1366 |
1351 acpi_bus_scan(handle, &ops, child); 1352 return 0; | 1367 return acpi_bus_scan(handle, &ops, child); |
1353} 1354EXPORT_SYMBOL(acpi_bus_add); 1355 1356int acpi_bus_start(struct acpi_device *device) 1357{ 1358 struct acpi_bus_ops ops; 1359 1360 if (!device) 1361 return -EINVAL; 1362 1363 memset(&ops, 0, sizeof(ops)); 1364 ops.acpi_op_start = 1; 1365 | 1368} 1369EXPORT_SYMBOL(acpi_bus_add); 1370 1371int acpi_bus_start(struct acpi_device *device) 1372{ 1373 struct acpi_bus_ops ops; 1374 1375 if (!device) 1376 return -EINVAL; 1377 1378 memset(&ops, 0, sizeof(ops)); 1379 ops.acpi_op_start = 1; 1380 |
1366 acpi_bus_scan(device->handle, &ops, NULL); 1367 return 0; | 1381 return acpi_bus_scan(device->handle, &ops, NULL); |
1368} 1369EXPORT_SYMBOL(acpi_bus_start); 1370 1371int acpi_bus_trim(struct acpi_device *start, int rmdevice) 1372{ 1373 acpi_status status; 1374 struct acpi_device *parent, *child; 1375 acpi_handle phandle, chandle; --- 108 unchanged lines hidden --- | 1382} 1383EXPORT_SYMBOL(acpi_bus_start); 1384 1385int acpi_bus_trim(struct acpi_device *start, int rmdevice) 1386{ 1387 acpi_status status; 1388 struct acpi_device *parent, *child; 1389 acpi_handle phandle, chandle; --- 108 unchanged lines hidden --- |