Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	 Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	 Lukasz Luba <lukasz.luba@arm.com>, Len Brown <lenb@kernel.org>,
	 Jonathan Corbet <corbet@lwn.net>,
	Ido Schimmel <idosch@nvidia.com>,
	 Petr Machata <petrm@nvidia.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	 linux-tegra@vger.kernel.org, linux-acpi@vger.kernel.org,
	 linux-doc@vger.kernel.org, netdev@vger.kernel.org,
	 linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
	 ath11k@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-mediatek@lists.infradead.org,
	platform-driver-x86@vger.kernel.org,  linux-pci@vger.kernel.org,
	imx@lists.linux.dev,  linux-renesas-soc@vger.kernel.org
Subject: [PATCH RFC RESEND 3/8] ACPI: processor: Stop creating "device" sysfs link
Date: Thu, 20 Nov 2025 04:41:13 +0100	[thread overview]
Message-ID: <20251120-thermal-device-v1-3-bbdad594d57a@gmx.de> (raw)
In-Reply-To: <20251120-thermal-device-v1-0-bbdad594d57a@gmx.de>

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@gmx.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


  parent reply	other threads:[~2025-11-20  3:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20  3:41 [PATCH RFC RESEND 0/8] thermal: core: Allow setting the parent device of thermal zone/cooling devices Armin Wolf
2025-11-20  3:41 ` [PATCH RFC RESEND 1/8] thermal: core: Allow setting the parent device of cooling devices Armin Wolf
2025-11-20  3:41 ` [PATCH RFC RESEND 2/8] thermal: core: Set parent device in thermal_of_cooling_device_register() Armin Wolf
2025-11-20  3:41 ` Armin Wolf [this message]
2025-11-20  3:41 ` [PATCH RFC RESEND 4/8] ACPI: fan: Stop creating "device" sysfs link Armin Wolf
2025-11-20  3:41 ` [PATCH RFC RESEND 5/8] ACPI: video: " Armin Wolf
2025-11-20  3:41 ` [PATCH RFC RESEND 6/8] thermal: core: Set parent device in thermal_cooling_device_register() Armin Wolf
2025-11-20  3:41 ` [PATCH RFC RESEND 7/8] ACPI: thermal: Stop creating "device" sysfs link Armin Wolf
2025-11-20  3:41 ` [PATCH RFC RESEND 8/8] thermal: core: Allow setting the parent device of thermal zone devices Armin Wolf
2025-11-21 20:35 ` [PATCH RFC RESEND 0/8] thermal: core: Allow setting the parent device of thermal zone/cooling devices Rafael J. Wysocki
2025-11-22 14:18   ` Armin Wolf
2025-11-27 17:41     ` Rafael J. Wysocki
2025-11-27 20:06       ` Armin Wolf
2025-11-27 21:46         ` Rafael J. Wysocki
2025-11-27 23:49           ` Armin Wolf
2025-11-28 11:40             ` Rafael J. Wysocki
2025-11-29 11:35               ` Armin Wolf
2025-11-30 12:55                 ` Rafael J. Wysocki
2025-11-27 18:22     ` Rafael J. Wysocki
2025-11-27 20:29       ` Armin Wolf
2025-11-27 22:14         ` Rafael J. Wysocki
2025-11-27 23:52           ` Armin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251120-thermal-device-v1-3-bbdad594d57a@gmx.de \
    --to=w_armin@gmx.de \
    --cc=ath10k@lists.infradead.org \
    --cc=ath11k@lists.infradead.org \
    --cc=corbet@lwn.net \
    --cc=daniel.lezcano@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=idosch@nvidia.com \
    --cc=imx@lists.linux.dev \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@nvidia.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox