Merge branches 'acpi-scan', 'acpi-bus' and 'acpi-platform'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 30 Sep 2022 18:28:22 +0000 (20:28 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 30 Sep 2022 18:28:22 +0000 (20:28 +0200)
Merge changes related to ACPI device enumeration and ACPI support for
platform devices for 6.1-rc1:

 - Clean up ACPI platform devices support code (Andy Shevchenko, John
   Garry).

 - Clean up ACPI bus management code (Andy Shevchenko, ye xingchen).

 - Add support for multiple DMA windows with different offsets to the
   ACPI device enumeration code and use it on LoongArch (Jianmin Lv).

* acpi-scan:
  LoongArch: Use acpi_arch_dma_setup() and remove ARCH_HAS_PHYS_TO_DMA
  ACPI: scan: Support multiple DMA windows with different offsets

* acpi-bus:
  ACPI: bus: Refactor ACPI matching functions for better readability
  ACPI: bus: Drop kernel doc annotation from acpi_bus_notify()
  ACPI: bus: Remove the unneeded result variable

* acpi-platform:
  ACPI: platform: Use PLATFORM_DEVID_NONE in acpi_create_platform_device()
  ACPI: platform: Sort forbidden_id_list[] in ascending order
  ACPI: platform: Use sizeof(*pointer) instead of sizeof(type)
  ACPI: platform: Remove redundant print on -ENOMEM
  ACPI: platform: Get rid of redundant 'else'

1  2  3  4 
drivers/acpi/acpi_platform.c
drivers/acpi/bus.c
drivers/acpi/scan.c
include/acpi/acpi_bus.h
include/linux/acpi.h

@@@@@ -138,9 -137,10 -137,10 -135,10 +136,9 @@@@@ struct platform_device *acpi_create_pla
         * attached to it, that physical device should be the parent of the
         * platform device we are about to create.
         */
 ---    pdevinfo.parent = adev->parent ?
 ---            acpi_get_first_physical_node(adev->parent) : NULL;
 +++    pdevinfo.parent = parent ? acpi_get_first_physical_node(parent) : NULL;
        pdevinfo.name = dev_name(&adev->dev);
---     pdevinfo.id = -1;
+++     pdevinfo.id = PLATFORM_DEVID_NONE;
        pdevinfo.res = resources;
        pdevinfo.num_res = count;
        pdevinfo.fwnode = acpi_fwnode_handle(adev);
Simple merge
        return 0;
    }
    
 ---static int acpi_dev_get_first_consumer_dev_cb(struct acpi_dep_data *dep, void *data)
 +++static int acpi_dev_get_next_consumer_dev_cb(struct acpi_dep_data *dep, void *data)
    {
 ---    struct acpi_device *adev;
 +++    struct acpi_device **adev_p = data;
 +++    struct acpi_device *adev = *adev_p;
 +  
  --    adev = acpi_bus_get_acpi_device(dep->consumer);
 +++    /*
 +++     * If we're passed a 'previous' consumer device then we need to skip
 +++     * any consumers until we meet the previous one, and then NULL @data
 +++     * so the next one can be returned.
 +++     */
 +++    if (adev) {
 +++            if (dep->consumer == adev->handle)
 +++                    *adev_p = NULL;
 +++
 +++            return 0;
 +++    }
  ++
 -      adev = acpi_bus_get_acpi_device(dep->consumer);
 +++    adev = acpi_get_acpi_dev(dep->consumer);
        if (adev) {
                *(struct acpi_device **)data = adev;
                return 1;
Simple merge
Simple merge