ACPI: remove unused acpi_bus_scan_fixed() argument
[firefly-linux-kernel-4.4.55.git] / drivers / acpi / scan.c
index 297d8b94fbbc53c9fa75359eb4c934a08c92d68e..0302dd454e1786ef1e62719c0efc598da8ba3245 100644 (file)
@@ -370,7 +370,8 @@ static acpi_status acpi_device_notify_fixed(void *data)
 {
        struct acpi_device *device = data;
 
-       acpi_device_notify(device->handle, ACPI_FIXED_HARDWARE_EVENT, device);
+       /* Fixed hardware devices have no handles */
+       acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device);
        return AE_OK;
 }
 
@@ -430,9 +431,6 @@ static int acpi_device_probe(struct device * dev)
                if (acpi_drv->ops.notify) {
                        ret = acpi_device_install_notify_handler(acpi_dev);
                        if (ret) {
-                               if (acpi_drv->ops.stop)
-                                       acpi_drv->ops.stop(acpi_dev,
-                                                  acpi_dev->removal_type);
                                if (acpi_drv->ops.remove)
                                        acpi_drv->ops.remove(acpi_dev,
                                                     acpi_dev->removal_type);
@@ -456,8 +454,6 @@ static int acpi_device_remove(struct device * dev)
        if (acpi_drv) {
                if (acpi_drv->ops.notify)
                        acpi_device_remove_notify_handler(acpi_dev);
-               if (acpi_drv->ops.stop)
-                       acpi_drv->ops.stop(acpi_dev, acpi_dev->removal_type);
                if (acpi_drv->ops.remove)
                        acpi_drv->ops.remove(acpi_dev, acpi_dev->removal_type);
        }
@@ -1234,6 +1230,7 @@ acpi_add_single_object(struct acpi_device **child,
 {
        int result = 0;
        struct acpi_device *device = NULL;
+       struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 
 
        if (!child)
@@ -1359,9 +1356,16 @@ acpi_add_single_object(struct acpi_device **child,
        }
 
 end:
-       if (!result)
+       if (!result) {
+               acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
+               ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+                       "Adding %s [%s] parent %s\n", dev_name(&device->dev),
+                        (char *) buffer.pointer,
+                        device->parent ? dev_name(&device->parent->dev) :
+                                         "(null)"));
+               kfree(buffer.pointer);
                *child = device;
-       else
+       else
                acpi_device_release(&device->dev);
 
        return result;
@@ -1576,15 +1580,12 @@ int acpi_bus_trim(struct acpi_device *start, int rmdevice)
 }
 EXPORT_SYMBOL_GPL(acpi_bus_trim);
 
-static int acpi_bus_scan_fixed(struct acpi_device *root)
+static int acpi_bus_scan_fixed(void)
 {
        int result = 0;
        struct acpi_device *device = NULL;
        struct acpi_bus_ops ops;
 
-       if (!root)
-               return -ENODEV;
-
        memset(&ops, 0, sizeof(ops));
        ops.acpi_op_add = 1;
        ops.acpi_op_start = 1;
@@ -1635,7 +1636,7 @@ int __init acpi_scan_init(void)
        /*
         * Enumerate devices in the ACPI namespace.
         */
-       result = acpi_bus_scan_fixed(acpi_root);
+       result = acpi_bus_scan_fixed();
 
        if (!result)
                result = acpi_bus_scan(acpi_root, &ops);