diff options
author | Sumitra Sharma <sumitraartsy@gmail.com> | 2023-03-25 11:31:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-25 11:54:52 +0300 |
commit | f5aca1a63e83178374195d3a26790091fdf2ed05 (patch) | |
tree | de81adfdb0a4009733ffd595618aac2cead64e8f /drivers/staging/greybus | |
parent | f48198232d605a0d29f1e11235a6f6142b074b39 (diff) | |
download | linux-f5aca1a63e83178374195d3a26790091fdf2ed05.tar.xz |
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: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/7470bf9d9a57e8bf27e55bd5e3791c5e0ee31385.1679732179.git.sumitraartsy@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r-- | drivers/staging/greybus/audio_manager_module.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c index 81b4ba607a0e..5f9dcbdbc191 100644 --- a/drivers/staging/greybus/audio_manager_module.c +++ b/drivers/staging/greybus/audio_manager_module.c @@ -12,8 +12,11 @@ #define to_gb_audio_module_attr(x) \ 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 attribute attr; |