platform/x86: wmi: Add to_wmi_device() helper macro
authorArmin Wolf <W_Armin@gmx.de>
Fri, 3 Nov 2023 18:25:24 +0000 (19:25 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 20 Nov 2023 12:20:33 +0000 (13:20 +0100)
commit7275bf3e09578e1761157e7683f2e898c5c235a6
tree804cd2f8f81770027d7633d3e2824b9b089a1b70
parentf25d34646bd01505a0989ca67bc9a37390cae755
platform/x86: wmi: Add to_wmi_device() helper macro

Add a helper macro for WMI drivers to cast a device to
the corresponding WMI device. This should replace some
boilerplate code.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231103182526.3524-2-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
include/linux/wmi.h