platform/x86: think-lmi: Convert container_of() macros to static inline
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 12 Apr 2024 13:09:03 +0000 (16:09 +0300)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2024 08:52:02 +0000 (10:52 +0200)
commit67e9b62085977f4fbcefac3a9713de6d52981ee8
treea9e370c4c7df9c44ea145594af1fd1a82b28c83c
parentf24644581ba92c901bbc2b69a1a6f6d178ee59d4
platform/x86: think-lmi: Convert container_of() macros to static inline

The macros to_tlmi_pwd_setting() and to_tlmi_attr_setting() are fragile
because they expect the variable name to be 'kobj', otherwise the build
will fail because container_of()'s 3rd parameter (member) is taken from
the parameter given to the macro.

While at it, move them into a more logical place.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by Mark Pearson <mpearson-lenovo@squebbb.ca>
Link: https://lore.kernel.org/r/20240412130903.2836-1-ilpo.jarvinen@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/think-lmi.c