mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 23:34:05 +08:00
pwm: twl: Use to_twl() instead of container_of()
Always use to_twl() for converting into private data instead of container_of(). Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
This commit is contained in:
parent
838bf09d4f
commit
30f7861703
@ -200,8 +200,7 @@ out:
|
||||
|
||||
static void twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
|
||||
{
|
||||
struct twl_pwm_chip *twl = container_of(chip, struct twl_pwm_chip,
|
||||
chip);
|
||||
struct twl_pwm_chip *twl = to_twl(chip);
|
||||
int ret;
|
||||
u8 val, mask;
|
||||
|
||||
@ -231,8 +230,7 @@ out:
|
||||
|
||||
static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
|
||||
{
|
||||
struct twl_pwm_chip *twl = container_of(chip, struct twl_pwm_chip,
|
||||
chip);
|
||||
struct twl_pwm_chip *twl = to_twl(chip);
|
||||
int ret;
|
||||
u8 val;
|
||||
|
||||
@ -255,8 +253,7 @@ out:
|
||||
|
||||
static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
|
||||
{
|
||||
struct twl_pwm_chip *twl = container_of(chip, struct twl_pwm_chip,
|
||||
chip);
|
||||
struct twl_pwm_chip *twl = to_twl(chip);
|
||||
int ret;
|
||||
u8 val;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user