mirror of
https://github.com/torvalds/linux
synced 2024-10-07 11:53:31 +00:00
driver core: Call in reversed order in device_platform_notify_remove()
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> Link: https://lore.kernel.org/r/20230818133654.767986-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d21fdd07ce
commit
29c8ab79e9
|
@ -2306,12 +2306,12 @@ static void device_platform_notify(struct device *dev)
|
||||||
|
|
||||||
static void device_platform_notify_remove(struct device *dev)
|
static void device_platform_notify_remove(struct device *dev)
|
||||||
{
|
{
|
||||||
acpi_device_notify_remove(dev);
|
if (platform_notify_remove)
|
||||||
|
platform_notify_remove(dev);
|
||||||
|
|
||||||
software_node_notify_remove(dev);
|
software_node_notify_remove(dev);
|
||||||
|
|
||||||
if (platform_notify_remove)
|
acpi_device_notify_remove(dev);
|
||||||
platform_notify_remove(dev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue