Commit 30f78617 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Thierry Reding

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: default avatarJohannes Thumshirn <morbidrsa@gmail.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
parent 838bf09d
...@@ -200,8 +200,7 @@ static int twl4030_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) ...@@ -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) 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, struct twl_pwm_chip *twl = to_twl(chip);
chip);
int ret; int ret;
u8 val, mask; u8 val, mask;
...@@ -231,8 +230,7 @@ static void twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) ...@@ -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) 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, struct twl_pwm_chip *twl = to_twl(chip);
chip);
int ret; int ret;
u8 val; u8 val;
...@@ -255,8 +253,7 @@ static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) ...@@ -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) 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, struct twl_pwm_chip *twl = to_twl(chip);
chip);
int ret; int ret;
u8 val; u8 val;
......
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