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

staging: greybus: Inline pwm_chip_to_gb_pwm_chip()

Convert 'pwm_chip_to_gb_pwm_chip' 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/20230326064519.GA179449@sumitra.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 91de7cdc
......@@ -21,8 +21,11 @@ struct gb_pwm_chip {
struct pwm_chip chip;
struct pwm_chip *pwm;
};
#define pwm_chip_to_gb_pwm_chip(chip) \
container_of(chip, struct gb_pwm_chip, chip)
static inline struct gb_pwm_chip *pwm_chip_to_gb_pwm_chip(struct pwm_chip *chip)
{
return container_of(chip, struct gb_pwm_chip, chip);
}
static int gb_pwm_count_operation(struct gb_pwm_chip *pwmc)
{
......
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