platform/x86: wmi: Decouple probe deferring from wmi_block_list
authorArmin Wolf <W_Armin@gmx.de>
Fri, 20 Oct 2023 21:10:01 +0000 (23:10 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 25 Oct 2023 09:46:35 +0000 (12:46 +0300)
commit4186a47dbfbce2f97b0c025a7eac32bb5130df05
tree6fa704a255ebad243f0e3e3dfd8eb1845075f6a2
parent02a258ac3ebf8a530d340ec24a694c13ac9d25c0
platform/x86: wmi: Decouple probe deferring from wmi_block_list

Many aggregate WMI drivers do not use -EPROBE_DEFER when they
cannot find a WMI device during probe, instead they require
all WMI devices associated with an platform device to become
available at once. This is currently achieved by adding those
WMI devices to the wmi_block_list before they are registered,
which is then used by the deprecated GUID-based functions to
search for WMI devices.

Replace this approach with a device link which defers probing
of the WMI device until the associated platform device has finished
probing (and has registered all WMI devices). New aggregate WMI
drivers should not rely on this behaviour.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231020211005.38216-2-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