2 * scan.c - support for transforming the ACPI namespace into individual objects
5 #include <linux/init.h>
6 #include <linux/acpi.h>
7 #include <linux/module.h>
9 #include <acpi/acpi_drivers.h>
10 #include <acpi/acinterp.h> /* for acpi_ex_eisa_id_to_string() */
13 #define _COMPONENT ACPI_BUS_COMPONENT
14 ACPI_MODULE_NAME ("scan")
16 #define STRUCT_TO_INT(s) (*((int*)&s))
18 extern struct acpi_device *acpi_root;
19 struct acpi_device *acpi_fixed_pwr_button;
20 struct acpi_device *acpi_fixed_sleep_button;
22 EXPORT_SYMBOL(acpi_fixed_pwr_button);
23 EXPORT_SYMBOL(acpi_fixed_sleep_button);
27 #define ACPI_BUS_CLASS "system_bus"
28 #define ACPI_BUS_HID "ACPI_BUS"
29 #define ACPI_BUS_DRIVER_NAME "ACPI Bus Driver"
30 #define ACPI_BUS_DEVICE_NAME "System Bus"
32 static LIST_HEAD(acpi_device_list);
33 static spinlock_t acpi_device_lock = SPIN_LOCK_UNLOCKED;
35 static void acpi_device_release(struct kobject * kobj)
37 struct acpi_device * dev = container_of(kobj,struct acpi_device,kobj);
38 if (dev->pnp.cid_list)
39 kfree(dev->pnp.cid_list);
43 static struct kobj_type ktype_acpi_ns = {
44 .release = acpi_device_release,
47 static struct kset acpi_namespace_kset = {
51 .subsys = &acpi_subsys,
52 .ktype = &ktype_acpi_ns,
56 static void acpi_device_register(struct acpi_device * device, struct acpi_device * parent)
61 * Link this device to its parent and siblings.
63 INIT_LIST_HEAD(&device->children);
64 INIT_LIST_HEAD(&device->node);
65 INIT_LIST_HEAD(&device->g_list);
67 spin_lock(&acpi_device_lock);
69 list_add_tail(&device->node, &device->parent->children);
70 list_add_tail(&device->g_list,&device->parent->g_list);
72 list_add_tail(&device->g_list,&acpi_device_list);
73 spin_unlock(&acpi_device_lock);
75 kobject_init(&device->kobj);
76 strlcpy(device->kobj.name,device->pnp.bus_id,KOBJ_NAME_LEN);
78 device->kobj.parent = &parent->kobj;
79 device->kobj.ktype = &ktype_acpi_ns;
80 device->kobj.kset = &acpi_namespace_kset;
81 kobject_add(&device->kobj);
85 acpi_device_unregister (
86 struct acpi_device *device,
89 kobject_unregister(&device->kobj);
94 acpi_bus_data_handler (
99 ACPI_FUNCTION_TRACE("acpi_bus_data_handler");
107 acpi_bus_get_power_flags (
108 struct acpi_device *device)
110 acpi_status status = 0;
111 acpi_handle handle = 0;
114 ACPI_FUNCTION_TRACE("acpi_bus_get_power_flags");
117 * Power Management Flags
119 status = acpi_get_handle(device->handle, "_PSC", &handle);
120 if (ACPI_SUCCESS(status))
121 device->power.flags.explicit_get = 1;
122 status = acpi_get_handle(device->handle, "_IRC", &handle);
123 if (ACPI_SUCCESS(status))
124 device->power.flags.inrush_current = 1;
125 status = acpi_get_handle(device->handle, "_PRW", &handle);
126 if (ACPI_SUCCESS(status))
127 device->power.flags.wake_capable = 1;
130 * Enumerate supported power management states
132 for (i = ACPI_STATE_D0; i <= ACPI_STATE_D3; i++) {
133 struct acpi_device_power_state *ps = &device->power.states[i];
134 char object_name[5] = {'_','P','R','0'+i,'\0'};
136 /* Evaluate "_PRx" to se if power resources are referenced */
137 acpi_evaluate_reference(device->handle, object_name, NULL,
139 if (ps->resources.count) {
140 device->power.flags.power_resources = 1;
144 /* Evaluate "_PSx" to see if we can do explicit sets */
145 object_name[2] = 'S';
146 status = acpi_get_handle(device->handle, object_name, &handle);
147 if (ACPI_SUCCESS(status)) {
148 ps->flags.explicit_set = 1;
152 /* State is valid if we have some power control */
153 if (ps->resources.count || ps->flags.explicit_set)
156 ps->power = -1; /* Unknown - driver assigned */
157 ps->latency = -1; /* Unknown - driver assigned */
160 /* Set defaults for D0 and D3 states (always valid) */
161 device->power.states[ACPI_STATE_D0].flags.valid = 1;
162 device->power.states[ACPI_STATE_D0].power = 100;
163 device->power.states[ACPI_STATE_D3].flags.valid = 1;
164 device->power.states[ACPI_STATE_D3].power = 0;
166 /* TBD: System wake support and resource requirements. */
168 device->power.state = ACPI_STATE_UNKNOWN;
174 /* --------------------------------------------------------------------------
175 Performance Management
176 -------------------------------------------------------------------------- */
179 acpi_bus_get_perf_flags (
180 struct acpi_device *device)
182 device->performance.state = ACPI_STATE_UNKNOWN;
186 /* --------------------------------------------------------------------------
188 -------------------------------------------------------------------------- */
190 static LIST_HEAD(acpi_bus_drivers);
191 static DECLARE_MUTEX(acpi_bus_drivers_lock);
197 * Checks the device's hardware (_HID) or compatible (_CID) ids to see if it
198 * matches the specified driver's criteria.
202 struct acpi_device *device,
203 struct acpi_driver *driver)
206 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
208 if (device->flags.hardware_id)
209 if (strstr(driver->ids, device->pnp.hardware_id))
212 if (device->flags.compatible_ids) {
213 struct acpi_compatible_id_list *cid_list = device->pnp.cid_list;
216 /* compare multiple _CID entries against driver ids */
217 for (i = 0; i < cid_list->count; i++)
219 if (strstr(driver->ids, cid_list->id[i].value))
227 acpi_os_free(buffer.pointer);
233 * acpi_bus_driver_init
234 * --------------------
235 * Used to initialize a device via its device driver. Called whenever a
236 * driver is bound to a device. Invokes the driver's add() and start() ops.
239 acpi_bus_driver_init (
240 struct acpi_device *device,
241 struct acpi_driver *driver)
245 ACPI_FUNCTION_TRACE("acpi_bus_driver_init");
247 if (!device || !driver)
248 return_VALUE(-EINVAL);
250 if (!driver->ops.add)
251 return_VALUE(-ENOSYS);
253 result = driver->ops.add(device);
255 device->driver = NULL;
256 acpi_driver_data(device) = NULL;
257 return_VALUE(result);
260 device->driver = driver;
263 * TBD - Configuration Management: Assign resources to device based
264 * upon possible configuration and currently allocated resources.
267 if (driver->ops.start) {
268 result = driver->ops.start(device);
269 if (result && driver->ops.remove)
270 driver->ops.remove(device, ACPI_BUS_REMOVAL_NORMAL);
271 return_VALUE(result);
274 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Driver successfully bound to device\n"));
276 if (driver->ops.scan) {
277 driver->ops.scan(device);
283 static int acpi_driver_attach(struct acpi_driver * drv)
285 struct list_head * node, * next;
287 ACPI_FUNCTION_TRACE("acpi_driver_attach");
289 spin_lock(&acpi_device_lock);
290 list_for_each_safe(node, next, &acpi_device_list) {
291 struct acpi_device * dev = container_of(node, struct acpi_device, g_list);
293 if (dev->driver || !dev->status.present)
295 spin_unlock(&acpi_device_lock);
297 if (!acpi_bus_match(dev, drv)) {
298 if (!acpi_bus_driver_init(dev, drv)) {
299 atomic_inc(&drv->references);
300 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found driver [%s] for device [%s]\n",
301 drv->name, dev->pnp.bus_id));
304 spin_lock(&acpi_device_lock);
306 spin_unlock(&acpi_device_lock);
310 static int acpi_driver_detach(struct acpi_driver * drv)
312 struct list_head * node, * next;
314 ACPI_FUNCTION_TRACE("acpi_driver_detach");
316 spin_lock(&acpi_device_lock);
317 list_for_each_safe(node,next,&acpi_device_list) {
318 struct acpi_device * dev = container_of(node,struct acpi_device,g_list);
320 if (dev->driver == drv) {
322 drv->ops.remove(dev,ACPI_BUS_REMOVAL_NORMAL);
324 dev->driver_data = NULL;
325 atomic_dec(&drv->references);
328 spin_unlock(&acpi_device_lock);
333 * acpi_bus_register_driver
334 * ------------------------
335 * Registers a driver with the ACPI bus. Searches the namespace for all
336 * devices that match the driver's criteria and binds.
339 acpi_bus_register_driver (
340 struct acpi_driver *driver)
344 ACPI_FUNCTION_TRACE("acpi_bus_register_driver");
347 return_VALUE(-ENODEV);
350 spin_lock(&acpi_device_lock);
351 list_add_tail(&driver->node, &acpi_bus_drivers);
352 spin_unlock(&acpi_device_lock);
353 acpi_driver_attach(driver);
362 * acpi_bus_unregister_driver
363 * --------------------------
364 * Unregisters a driver with the ACPI bus. Searches the namespace for all
365 * devices that match the driver's criteria and unbinds.
368 acpi_bus_unregister_driver (
369 struct acpi_driver *driver)
373 ACPI_FUNCTION_TRACE("acpi_bus_unregister_driver");
376 acpi_driver_detach(driver);
378 if (!atomic_read(&driver->references)) {
379 spin_lock(&acpi_device_lock);
380 list_del_init(&driver->node);
381 spin_unlock(&acpi_device_lock);
389 * acpi_bus_find_driver
390 * --------------------
391 * Parses the list of registered drivers looking for a driver applicable for
392 * the specified device.
395 acpi_bus_find_driver (
396 struct acpi_device *device)
399 struct list_head * node, *next;
401 ACPI_FUNCTION_TRACE("acpi_bus_find_driver");
403 if (!device->flags.hardware_id && !device->flags.compatible_ids)
406 spin_lock(&acpi_device_lock);
407 list_for_each_safe(node,next,&acpi_bus_drivers) {
408 struct acpi_driver * driver = container_of(node,struct acpi_driver,node);
410 atomic_inc(&driver->references);
411 spin_unlock(&acpi_device_lock);
412 if (!acpi_bus_match(device, driver)) {
413 result = acpi_bus_driver_init(device, driver);
417 atomic_dec(&driver->references);
418 spin_lock(&acpi_device_lock);
420 spin_unlock(&acpi_device_lock);
423 return_VALUE(result);
427 /* --------------------------------------------------------------------------
429 -------------------------------------------------------------------------- */
433 struct acpi_device *device)
435 acpi_status status = AE_OK;
436 acpi_handle temp = NULL;
438 ACPI_FUNCTION_TRACE("acpi_bus_get_flags");
440 /* Presence of _STA indicates 'dynamic_status' */
441 status = acpi_get_handle(device->handle, "_STA", &temp);
442 if (ACPI_SUCCESS(status))
443 device->flags.dynamic_status = 1;
445 /* Presence of _CID indicates 'compatible_ids' */
446 status = acpi_get_handle(device->handle, "_CID", &temp);
447 if (ACPI_SUCCESS(status))
448 device->flags.compatible_ids = 1;
450 /* Presence of _RMV indicates 'removable' */
451 status = acpi_get_handle(device->handle, "_RMV", &temp);
452 if (ACPI_SUCCESS(status))
453 device->flags.removable = 1;
455 /* Presence of _EJD|_EJ0 indicates 'ejectable' */
456 status = acpi_get_handle(device->handle, "_EJD", &temp);
457 if (ACPI_SUCCESS(status))
458 device->flags.ejectable = 1;
460 status = acpi_get_handle(device->handle, "_EJ0", &temp);
461 if (ACPI_SUCCESS(status))
462 device->flags.ejectable = 1;
465 /* Presence of _LCK indicates 'lockable' */
466 status = acpi_get_handle(device->handle, "_LCK", &temp);
467 if (ACPI_SUCCESS(status))
468 device->flags.lockable = 1;
470 /* Presence of _PS0|_PR0 indicates 'power manageable' */
471 status = acpi_get_handle(device->handle, "_PS0", &temp);
472 if (ACPI_FAILURE(status))
473 status = acpi_get_handle(device->handle, "_PR0", &temp);
474 if (ACPI_SUCCESS(status))
475 device->flags.power_manageable = 1;
477 /* TBD: Peformance management */
482 static void acpi_device_get_busid(struct acpi_device * device, acpi_handle handle, int type)
484 char bus_id[5] = {'?',0};
485 struct acpi_buffer buffer = {sizeof(bus_id), bus_id};
491 * The device's Bus ID is simply the object name.
492 * TBD: Shouldn't this value be unique (within the ACPI namespace)?
495 case ACPI_BUS_TYPE_SYSTEM:
496 strcpy(device->pnp.bus_id, "ACPI");
498 case ACPI_BUS_TYPE_POWER_BUTTON:
499 strcpy(device->pnp.bus_id, "PWRF");
501 case ACPI_BUS_TYPE_SLEEP_BUTTON:
502 strcpy(device->pnp.bus_id, "SLPF");
505 acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer);
506 /* Clean up trailing underscores (if any) */
507 for (i = 3; i > 1; i--) {
508 if (bus_id[i] == '_')
513 strcpy(device->pnp.bus_id, bus_id);
518 static void acpi_device_set_id(struct acpi_device * device, struct acpi_device * parent,
519 acpi_handle handle, int type)
521 struct acpi_device_info *info;
522 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
525 struct acpi_compatible_id_list *cid_list = NULL;
529 case ACPI_BUS_TYPE_DEVICE:
530 status = acpi_get_object_info(handle, &buffer);
531 if (ACPI_FAILURE(status)) {
532 printk("%s: Error reading device info\n",__FUNCTION__);
536 info = buffer.pointer;
537 if (info->valid & ACPI_VALID_HID)
538 hid = info->hardware_id.value;
539 if (info->valid & ACPI_VALID_UID)
540 uid = info->unique_id.value;
541 if (info->valid & ACPI_VALID_CID)
542 cid_list = &info->compatibility_id;
543 if (info->valid & ACPI_VALID_ADR) {
544 device->pnp.bus_address = info->address;
545 device->flags.bus_address = 1;
548 case ACPI_BUS_TYPE_POWER:
549 hid = ACPI_POWER_HID;
551 case ACPI_BUS_TYPE_PROCESSOR:
552 hid = ACPI_PROCESSOR_HID;
554 case ACPI_BUS_TYPE_SYSTEM:
555 hid = ACPI_SYSTEM_HID;
557 case ACPI_BUS_TYPE_THERMAL:
558 hid = ACPI_THERMAL_HID;
560 case ACPI_BUS_TYPE_POWER_BUTTON:
561 hid = ACPI_BUTTON_HID_POWERF;
563 case ACPI_BUS_TYPE_SLEEP_BUTTON:
564 hid = ACPI_BUTTON_HID_SLEEPF;
571 * Fix for the system root bus device -- the only root-level device.
573 if ((parent == ACPI_ROOT_OBJECT) && (type == ACPI_BUS_TYPE_DEVICE)) {
575 strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
576 strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
580 strcpy(device->pnp.hardware_id, hid);
581 device->flags.hardware_id = 1;
584 strcpy(device->pnp.unique_id, uid);
585 device->flags.unique_id = 1;
588 device->pnp.cid_list = kmalloc(cid_list->size, GFP_KERNEL);
589 if (device->pnp.cid_list)
590 memcpy(device->pnp.cid_list, cid_list, cid_list->size);
592 printk(KERN_ERR "Memory allocation error\n");
595 acpi_os_free(buffer.pointer);
598 int acpi_device_set_context(struct acpi_device * device, int type)
600 acpi_status status = AE_OK;
605 * Attach this 'struct acpi_device' to the ACPI object. This makes
606 * resolutions from handle->device very efficient. Note that we need
607 * to be careful with fixed-feature devices as they all attach to the
610 if (type != ACPI_BUS_TYPE_POWER_BUTTON &&
611 type != ACPI_BUS_TYPE_SLEEP_BUTTON) {
612 status = acpi_attach_data(device->handle,
613 acpi_bus_data_handler, device);
615 if (ACPI_FAILURE(status)) {
616 printk("Error attaching device data\n");
623 void acpi_device_get_debug_info(struct acpi_device * device, acpi_handle handle, int type)
625 #ifdef CONFIG_ACPI_DEBUG_OUTPUT
626 char *type_string = NULL;
627 char name[80] = {'?','\0'};
628 acpi_buffer buffer = {sizeof(name), name};
631 case ACPI_BUS_TYPE_DEVICE:
632 type_string = "Device";
633 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
635 case ACPI_BUS_TYPE_POWER:
636 type_string = "Power Resource";
637 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
639 case ACPI_BUS_TYPE_PROCESSOR:
640 type_string = "Processor";
641 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
643 case ACPI_BUS_TYPE_SYSTEM:
644 type_string = "System";
645 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
647 case ACPI_BUS_TYPE_THERMAL:
648 type_string = "Thermal Zone";
649 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
651 case ACPI_BUS_TYPE_POWER_BUTTON:
652 type_string = "Power Button";
653 sprintf(name, "PWRB");
655 case ACPI_BUS_TYPE_SLEEP_BUTTON:
656 type_string = "Sleep Button";
657 sprintf(name, "SLPB");
661 printk(KERN_DEBUG "Found %s %s [%p]\n", type_string, name, handle);
662 #endif /*CONFIG_ACPI_DEBUG_OUTPUT*/
667 struct acpi_device **child,
668 struct acpi_device *parent,
673 struct acpi_device *device = NULL;
675 ACPI_FUNCTION_TRACE("acpi_bus_add");
678 return_VALUE(-EINVAL);
680 device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL);
682 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Memory allocation error\n"));
683 return_VALUE(-ENOMEM);
685 memset(device, 0, sizeof(struct acpi_device));
687 device->handle = handle;
688 device->parent = parent;
690 acpi_device_get_busid(device,handle,type);
695 * Get prior to calling acpi_bus_get_status() so we know whether
696 * or not _STA is present. Note that we only look for object
697 * handles -- cannot evaluate objects until we know the device is
698 * present and properly initialized.
700 result = acpi_bus_get_flags(device);
707 * See if the device is present. We always assume that non-Device()
708 * objects (e.g. thermal zones, power resources, processors, etc.) are
709 * present, functioning, etc. (at least when parent object is present).
710 * Note that _STA has a different meaning for some objects (e.g.
711 * power resources) so we need to be careful how we use it.
714 case ACPI_BUS_TYPE_DEVICE:
715 result = acpi_bus_get_status(device);
716 if (ACPI_FAILURE(result) || !device->status.present) {
722 STRUCT_TO_INT(device->status) = 0x0F;
729 * TBD: Synch with Core's enumeration/initialization process.
733 * Hardware ID, Unique ID, & Bus Address
734 * -------------------------------------
736 acpi_device_set_id(device,parent,handle,type);
742 if (device->flags.power_manageable) {
743 result = acpi_bus_get_power_flags(device);
749 * Performance Management
750 * ----------------------
752 if (device->flags.performance_manageable) {
753 result = acpi_bus_get_perf_flags(device);
758 if ((result = acpi_device_set_context(device,type)))
761 acpi_device_get_debug_info(device,handle,type);
763 acpi_device_register(device,parent);
766 * Bind _ADR-Based Devices
767 * -----------------------
768 * If there's a a bus address (_ADR) then we utilize the parent's
769 * 'bind' function (if exists) to bind the ACPI- and natively-
770 * enumerated device representations.
772 if (device->flags.bus_address) {
773 if (device->parent && device->parent->ops.bind)
774 device->parent->ops.bind(device);
778 * Locate & Attach Driver
779 * ----------------------
780 * If there's a hardware id (_HID) or compatible ids (_CID) we check
781 * to see if there's a driver installed for this kind of device. Note
782 * that drivers can install before or after a device is enumerated.
784 * TBD: Assumes LDM provides driver hot-plug capability.
786 acpi_bus_find_driver(device);
792 if (device->pnp.cid_list)
793 kfree(device->pnp.cid_list);
797 return_VALUE(result);
802 static int acpi_bus_scan (struct acpi_device *start)
804 acpi_status status = AE_OK;
805 struct acpi_device *parent = NULL;
806 struct acpi_device *child = NULL;
807 acpi_handle phandle = 0;
808 acpi_handle chandle = 0;
809 acpi_object_type type = 0;
812 ACPI_FUNCTION_TRACE("acpi_bus_scan");
815 return_VALUE(-EINVAL);
818 phandle = start->handle;
821 * Parse through the ACPI namespace, identify all 'devices', and
822 * create a new 'struct acpi_device' for each.
824 while ((level > 0) && parent) {
826 status = acpi_get_next_object(ACPI_TYPE_ANY, phandle,
830 * If this scope is exhausted then move our way back up.
832 if (ACPI_FAILURE(status)) {
835 acpi_get_parent(phandle, &phandle);
837 parent = parent->parent;
841 status = acpi_get_type(chandle, &type);
842 if (ACPI_FAILURE(status))
846 * If this is a scope object then parse it (depth-first).
848 if (type == ACPI_TYPE_LOCAL_SCOPE) {
856 * We're only interested in objects that we consider 'devices'.
859 case ACPI_TYPE_DEVICE:
860 type = ACPI_BUS_TYPE_DEVICE;
862 case ACPI_TYPE_PROCESSOR:
863 type = ACPI_BUS_TYPE_PROCESSOR;
865 case ACPI_TYPE_THERMAL:
866 type = ACPI_BUS_TYPE_THERMAL;
868 case ACPI_TYPE_POWER:
869 type = ACPI_BUS_TYPE_POWER;
875 status = acpi_bus_add(&child, parent, chandle, type);
876 if (ACPI_FAILURE(status))
880 * If the device is present, enabled, and functioning then
881 * parse its scope (depth-first). Note that we need to
882 * represent absent devices to facilitate PnP notifications
883 * -- but only the subtree head (not all of its children,
884 * which will be enumerated when the parent is inserted).
886 * TBD: Need notifications and other detection mechanisms
887 * in place before we can fully implement this.
889 if (child->status.present) {
890 status = acpi_get_next_object(ACPI_TYPE_ANY, chandle,
892 if (ACPI_SUCCESS(status)) {
906 acpi_bus_scan_fixed (
907 struct acpi_device *root)
911 ACPI_FUNCTION_TRACE("acpi_bus_scan_fixed");
913 acpi_fixed_pwr_button = NULL;
914 acpi_fixed_sleep_button = NULL;
918 return_VALUE(-ENODEV);
921 * Enumerate all fixed-feature devices.
923 if (acpi_fadt.pwr_button == 0)
924 result = acpi_bus_add(&acpi_fixed_pwr_button, acpi_root,
925 NULL, ACPI_BUS_TYPE_POWER_BUTTON);
927 if (acpi_fadt.sleep_button == 0)
928 result = acpi_bus_add(&acpi_fixed_sleep_button, acpi_root,
929 NULL, ACPI_BUS_TYPE_SLEEP_BUTTON);
931 return_VALUE(result);
935 static int __init acpi_scan_init(void)
939 ACPI_FUNCTION_TRACE("acpi_scan_init");
944 kset_register(&acpi_namespace_kset);
947 * Create the root device in the bus's device tree
949 result = acpi_bus_add(&acpi_root, NULL, ACPI_ROOT_OBJECT,
950 ACPI_BUS_TYPE_SYSTEM);
955 * Enumerate devices in the ACPI namespace.
957 result = acpi_bus_scan_fixed(acpi_root);
959 result = acpi_bus_scan(acpi_root);
962 acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL);
965 return_VALUE(result);
968 subsys_initcall(acpi_scan_init);