mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] driver core: Call in reversed order in device_platform_notify_remove()
@ 2023-08-18 13:36 Andy Shevchenko
  0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2023-08-18 13:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Saravana Kannan, linux-kernel
  Cc: Rafael J. Wysocki, Andy Shevchenko

It's logically correct to call the removal notifiers in the reversed order
as it might be dependent to each other. Luckily, platform_notify_remove()
currently is not used and the others have no dependency use, but theoretically
it's still possible.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/base/core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 3afb7710ccb5..edcf0a2ccee4 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2306,12 +2306,12 @@ static void device_platform_notify(struct device *dev)
 
 static void device_platform_notify_remove(struct device *dev)
 {
-	acpi_device_notify_remove(dev);
-
-	software_node_notify_remove(dev);
-
 	if (platform_notify_remove)
 		platform_notify_remove(dev);
+
+	software_node_notify_remove(dev);
+
+	acpi_device_notify_remove(dev);
 }
 
 /**
-- 
2.40.0.1.gaa8946217a0b


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-18 13:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-18 13:36 [PATCH v1 1/1] driver core: Call in reversed order in device_platform_notify_remove() Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®