mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 00:51:44 +00:00
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: Sumitra Sharma <sumitraartsy@gmail.com> Link: https://lore.kernel.org/r/20230326064519.GA179449@sumitra.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
91de7cdc78
commit
b07c8ef8c6
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user