Commit f5aca1a6 authored by Sumitra Sharma's avatar Sumitra Sharma Committed by Greg Kroah-Hartman

staging: greybus: Inline gb_audio_manager_module()

Convert 'gb_audio_manager_module' from a macro to a static
inline function, to make the relevant types apparent in the
definition and to benefit from the type checking performed by
the compiler at call sites.
Signed-off-by: default avatarSumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/7470bf9d9a57e8bf27e55bd5e3791c5e0ee31385.1679732179.git.sumitraartsy@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4819823
...@@ -12,8 +12,11 @@ ...@@ -12,8 +12,11 @@
#define to_gb_audio_module_attr(x) \ #define to_gb_audio_module_attr(x) \
container_of(x, struct gb_audio_manager_module_attribute, attr) container_of(x, struct gb_audio_manager_module_attribute, attr)
#define to_gb_audio_module(x) \
container_of(x, struct gb_audio_manager_module, kobj) static inline struct gb_audio_manager_module *to_gb_audio_module(struct kobject *kobj)
{
return container_of(kobj, struct gb_audio_manager_module, kobj);
}
struct gb_audio_manager_module_attribute { struct gb_audio_manager_module_attribute {
struct attribute attr; struct attribute attr;
......
Markdown is supported
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