platform/x86: wmi: introduce helper to convert driver to WMI driver
authorBarnabás Pőcze <pobrn@protonmail.com>
Sat, 4 Sep 2021 17:56:32 +0000 (17:56 +0000)
committerHans de Goede <hdegoede@redhat.com>
Tue, 14 Sep 2021 10:26:02 +0000 (12:26 +0200)
commite7b2e33449e22fdbaa0247d96f31543affe6163d
tree98fcc588d091aa9c830d9e3d1db223e4d66a2cea
parent736b48aae5e83b5fab16fc9f31354d2cf863aa79
platform/x86: wmi: introduce helper to convert driver to WMI driver

Introduce a helper function which wraps the appropriate
`container_of()` macro invocation to convert
a `struct device_driver` to `struct wmi_driver`.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20210904175450.156801-27-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/wmi.c