Skip to content

Commit

Permalink
pwm: twl: Use to_twl() instead of container_of()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Thumshirn authored and Thierry Reding committed Feb 17, 2013
1 parent 838bf09 commit 30f7861
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/pwm/pwm-twl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 30f7861

Please sign in to comment.