[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251120-thermal-device-v1-3-bbdad594d57a@gmx.de>
Date: Thu, 20 Nov 2025 04:41:13 +0100
From: Armin Wolf <W_Armin@....de>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>, Len Brown <lenb@...nel.org>,
Jonathan Corbet <corbet@....net>, Ido Schimmel <idosch@...dia.com>,
Petr Machata <petrm@...dia.com>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
etnaviv@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-tegra@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-doc@...r.kernel.org, netdev@...r.kernel.org,
linux-wireless@...r.kernel.org, ath10k@...ts.infradead.org,
ath11k@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, platform-driver-x86@...r.kernel.org,
linux-pci@...r.kernel.org, imx@...ts.linux.dev,
linux-renesas-soc@...r.kernel.org
Subject: [PATCH RFC RESEND 3/8] ACPI: processor: Stop creating "device"
sysfs link
The thermal core will soon automatically create sysfs links between
the cooling device and its parent device. Stop manually creating
the "device" sysfs link between the cooling device and the parent
device to avoid a name collision. The "thermal_cooling" sysfs link
however stays for backwards compatibility, as it does not suffer
from a name collision.
Signed-off-by: Armin Wolf <W_Armin@....de>
---
drivers/acpi/processor_thermal.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index c7b1dc5687ec..1ff10321eac5 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -323,6 +323,7 @@ int acpi_processor_thermal_init(struct acpi_processor *pr,
dev_dbg(&device->dev, "registered as cooling_device%d\n",
pr->cdev->id);
+ /* For backwards compatibility */
result = sysfs_create_link(&device->dev.kobj,
&pr->cdev->device.kobj,
"thermal_cooling");
@@ -332,19 +333,8 @@ int acpi_processor_thermal_init(struct acpi_processor *pr,
goto err_thermal_unregister;
}
- result = sysfs_create_link(&pr->cdev->device.kobj,
- &device->dev.kobj,
- "device");
- if (result) {
- dev_err(&pr->cdev->device,
- "Failed to create sysfs link 'device'\n");
- goto err_remove_sysfs_thermal;
- }
-
return 0;
-err_remove_sysfs_thermal:
- sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
err_thermal_unregister:
thermal_cooling_device_unregister(pr->cdev);
@@ -356,7 +346,6 @@ void acpi_processor_thermal_exit(struct acpi_processor *pr,
{
if (pr->cdev) {
sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
- sysfs_remove_link(&pr->cdev->device.kobj, "device");
thermal_cooling_device_unregister(pr->cdev);
pr->cdev = NULL;
}
--
2.39.5
Powered by blists - more mailing lists