platform/x86: wmi: Replace read_takes_no_args with a flags field
authorHans de Goede <hdegoede@redhat.com>
Sun, 28 Nov 2021 19:00:27 +0000 (20:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:34:53 +0000 (16:34 +0200)
commit4b53562319894fad2b13883562af316c6efaa48a
treeba04eff73ad040f37fedc5b8443deb128416e839
parent789382ce73596e548c4843082f69db149493fdaf
platform/x86: wmi: Replace read_takes_no_args with a flags field

[ Upstream commit a90b38c58667142ecff2521481ed44286d46b140 ]

Replace the wmi_block.read_takes_no_args bool field with
an unsigned long flags field, used together with test_bit()
and friends.

This is a preparation patch for fixing a driver->notify() vs ->probe()
race, which requires atomic flag handling.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211128190031.405620-1-hdegoede@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/wmi.c