aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index c54d7b6c4066..b7308efce458 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -11,6 +11,8 @@
11 11
12#include <acpi/acpi_drivers.h> 12#include <acpi/acpi_drivers.h>
13 13
14#include "internal.h"
15
14#define _COMPONENT ACPI_BUS_COMPONENT 16#define _COMPONENT ACPI_BUS_COMPONENT
15ACPI_MODULE_NAME("scan"); 17ACPI_MODULE_NAME("scan");
16#define STRUCT_TO_INT(s) (*((int*)&s)) 18#define STRUCT_TO_INT(s) (*((int*)&s))
@@ -395,22 +397,10 @@ static int acpi_device_remove(struct device * dev)
395 return 0; 397 return 0;
396} 398}
397 399
398static void acpi_device_shutdown(struct device *dev)
399{
400 struct acpi_device *acpi_dev = to_acpi_device(dev);
401 struct acpi_driver *acpi_drv = acpi_dev->driver;
402
403 if (acpi_drv && acpi_drv->ops.shutdown)
404 acpi_drv->ops.shutdown(acpi_dev);
405
406 return ;
407}
408
409struct bus_type acpi_bus_type = { 400struct bus_type acpi_bus_type = {
410 .name = "acpi", 401 .name = "acpi",
411 .suspend = acpi_device_suspend, 402 .suspend = acpi_device_suspend,
412 .resume = acpi_device_resume, 403 .resume = acpi_device_resume,
413 .shutdown = acpi_device_shutdown,
414 .match = acpi_bus_match, 404 .match = acpi_bus_match,
415 .probe = acpi_device_probe, 405 .probe = acpi_device_probe,
416 .remove = acpi_device_remove, 406 .remove = acpi_device_remove,
@@ -1524,16 +1514,11 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
1524 return result; 1514 return result;
1525} 1515}
1526 1516
1527 1517int __init acpi_scan_init(void)
1528static int __init acpi_scan_init(void)
1529{ 1518{
1530 int result; 1519 int result;
1531 struct acpi_bus_ops ops; 1520 struct acpi_bus_ops ops;
1532 1521
1533
1534 if (acpi_disabled)
1535 return 0;
1536
1537 memset(&ops, 0, sizeof(ops)); 1522 memset(&ops, 0, sizeof(ops));
1538 ops.acpi_op_add = 1; 1523 ops.acpi_op_add = 1;
1539 ops.acpi_op_start = 1; 1524 ops.acpi_op_start = 1;
@@ -1566,5 +1551,3 @@ static int __init acpi_scan_init(void)
1566 Done: 1551 Done:
1567 return result; 1552 return result;
1568} 1553}
1569
1570subsys_initcall(acpi_scan_init);