driver core / ACPI: Represent ACPI companions using fwnode_handle
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 16 Mar 2015 22:49:03 +0000 (23:49 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 16 Mar 2015 22:49:03 +0000 (23:49 +0100)
Now that we have struct fwnode_handle, we can use that to point to
ACPI companions from struct device objects instead of pointing to
struct acpi_device directly.

There are two benefits from that.  First, the somewhat ugly and
hackish struct acpi_dev_node can be dropped and, second, the same
struct fwnode_handle pointer can be used in the future to point
to other (non-ACPI) firmware device node types.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
12 files changed:
drivers/acpi/acpi_platform.c
drivers/acpi/dock.c
drivers/base/platform.c
drivers/gpio/gpiolib.h
drivers/i2c/i2c-core.c
include/acpi/acpi_bus.h
include/linux/acpi.h
include/linux/device.h
include/linux/fwnode.h [new file with mode: 0644]
include/linux/i2c.h
include/linux/platform_device.h
include/linux/property.h

index 1284138..4bf7559 100644 (file)
@@ -102,7 +102,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
        pdevinfo.id = -1;
        pdevinfo.res = resources;
        pdevinfo.num_res = count;
-       pdevinfo.acpi_node.companion = adev;
+       pdevinfo.fwnode = acpi_fwnode_handle(adev);
        pdevinfo.dma_mask = DMA_BIT_MASK(32);
        pdev = platform_device_register_full(&pdevinfo);
        if (IS_ERR(pdev))
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge