[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251120-thermal-device-v1-4-bbdad594d57a@gmx.de>
Date: Thu, 20 Nov 2025 04:41:14 +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 4/8] ACPI: fan: 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/fan_core.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/acpi/fan_core.c b/drivers/acpi/fan_core.c
index fb08b8549ed7..2ca3e347f15c 100644
--- a/drivers/acpi/fan_core.c
+++ b/drivers/acpi/fan_core.c
@@ -594,6 +594,7 @@ static int acpi_fan_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "registered as cooling_device%d\n", cdev->id);
fan->cdev = cdev;
+ /* For backwards compatibility */
result = sysfs_create_link(&pdev->dev.kobj,
&cdev->device.kobj,
"thermal_cooling");
@@ -602,18 +603,8 @@ static int acpi_fan_probe(struct platform_device *pdev)
goto err_unregister;
}
- result = sysfs_create_link(&cdev->device.kobj,
- &pdev->dev.kobj,
- "device");
- if (result) {
- dev_err(&pdev->dev, "Failed to create sysfs link 'device'\n");
- goto err_remove_link;
- }
-
return 0;
-err_remove_link:
- sysfs_remove_link(&pdev->dev.kobj, "thermal_cooling");
err_unregister:
thermal_cooling_device_unregister(cdev);
err_end:
@@ -633,7 +624,6 @@ static void acpi_fan_remove(struct platform_device *pdev)
acpi_fan_delete_attributes(device);
}
sysfs_remove_link(&pdev->dev.kobj, "thermal_cooling");
- sysfs_remove_link(&fan->cdev->device.kobj, "device");
thermal_cooling_device_unregister(fan->cdev);
}
--
2.39.5
Powered by blists - more mailing lists