[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251120-thermal-device-v1-5-bbdad594d57a@gmx.de>
Date: Thu, 20 Nov 2025 04:41:15 +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 5/8] ACPI: video: 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/acpi_video.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index be8e7e18abca..658e11745523 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -1774,16 +1774,12 @@ static void acpi_video_dev_register_backlight(struct acpi_video_device *device)
dev_info(&device->dev->dev, "registered as cooling_device%d\n",
device->cooling_dev->id);
+ /* For backwards compatibility */
result = sysfs_create_link(&device->dev->dev.kobj,
&device->cooling_dev->device.kobj,
"thermal_cooling");
if (result)
pr_info("sysfs link creation failed\n");
-
- result = sysfs_create_link(&device->cooling_dev->device.kobj,
- &device->dev->dev.kobj, "device");
- if (result)
- pr_info("Reverse sysfs link creation failed\n");
}
static void acpi_video_run_bcl_for_osi(struct acpi_video_bus *video)
@@ -1852,7 +1848,6 @@ static void acpi_video_dev_unregister_backlight(struct acpi_video_device *device
}
if (device->cooling_dev) {
sysfs_remove_link(&device->dev->dev.kobj, "thermal_cooling");
- sysfs_remove_link(&device->cooling_dev->device.kobj, "device");
thermal_cooling_device_unregister(device->cooling_dev);
device->cooling_dev = NULL;
}
--
2.39.5
Powered by blists - more mailing lists