[PATCH v1 1/4] ACPI: scan: Register platform devices for thermal zones

Rafael J. Wysocki posted 1 patch 5 days, 18 hours ago
drivers/acpi/scan.c |    1 +
1 file changed, 1 insertion(+)
[PATCH v1 1/4] ACPI: scan: Register platform devices for thermal zones
Posted by Rafael J. Wysocki 5 days, 18 hours ago
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Currently, platform devices are not registered for ACPI thermal zones
because they are not represented as device objects in the ACPI namespace.
Instead, they are represented as thermal zone objects, so in particular
the platform_id flag is not set for them during enumeration because it
is only set for objects of type ACPI_BUS_TYPE_DEVICE, but otherwise they
are handled similarly at the ACPI core level.

To facilitate converting the ACPI thermal zone driver into a platform
one, modify acpi_set_pnp_ids() to set the platform_id flag for thermal
zones in analogy with device objects to cause platform devices to be
registered for them.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/scan.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1468,6 +1468,7 @@ static void acpi_set_pnp_ids(acpi_handle
 		break;
 	case ACPI_BUS_TYPE_THERMAL:
 		acpi_add_id(pnp, ACPI_THERMAL_HID);
+		pnp->type.platform_id = 1;
 		break;
 	case ACPI_BUS_TYPE_POWER_BUTTON:
 		acpi_add_id(pnp, ACPI_BUTTON_HID_POWERF);