Skip to content
Commit 6ee50aaa authored by Darren Hart (VMware)'s avatar Darren Hart (VMware)
Browse files

platform/x86: wmi: Instantiate all devices before adding them

At some point, we will want sub-drivers to get references to other
devices on the same WMI bus. This change is needed to avoid races.

This ends up simplifying the setup code and fixing some leaks, too.

This is based on the original work of Andy Lutomirski <luto@kernel.org>,
but includes several modifications, many in response to review from
Michał Kępień <kernel@kempniu.pl>:

  https://www.spinics.net/lists/platform-driver-x86/msg08201.html



Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Mario Limonciello <mario_limonciello@dell.com>
Cc: Pali Rohár <pali.rohar@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-acpi@vger.kernel.org
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent d4fc91ad
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment