diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c index f783efcd14bbffa129f24b18708f8baff80b65a8..bf3fda294223abfb546e7877b6c897e4e107836b 100644 --- a/drivers/pwm/pwm-twl.c +++ b/drivers/pwm/pwm-twl.c @@ -200,8 +200,7 @@ static int twl4030_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) 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 @@ static void twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) 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 @@ static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) 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;