platform/x86: wmi: Decouple WMI device removal from wmi_block_list
authorArmin Wolf <W_Armin@gmx.de>
Fri, 20 Oct 2023 21:10:05 +0000 (23:10 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 25 Oct 2023 09:46:42 +0000 (12:46 +0300)
commitac9bc85c49ffcfca8c1b117e1a9e94dd32680c68
tree56a9e1449620886220c8d7d94a19f7e7b9b7cf95
parenteba9ac7abab91c8f6d351460239108bef5e7a0b6
platform/x86: wmi: Decouple WMI device removal from wmi_block_list

Use device_for_each_child_reverse() to find and unregister WMI devices
belonging to a WMI bus device instead of iterating thru the entire
wmi_block_list.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231020211005.38216-6-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/wmi.c