diff options
Diffstat (limited to 'drivers/pwm/pwm-twl.c')
-rw-r--r-- | drivers/pwm/pwm-twl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c index e65db95d5e59..bf3fda294223 100644 --- a/drivers/pwm/pwm-twl.c +++ b/drivers/pwm/pwm-twl.c | |||
@@ -200,8 +200,7 @@ out: | |||
200 | 200 | ||
201 | static void twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) | 201 | static void twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) |
202 | { | 202 | { |
203 | struct twl_pwm_chip *twl = container_of(chip, struct twl_pwm_chip, | 203 | struct twl_pwm_chip *twl = to_twl(chip); |
204 | chip); | ||
205 | int ret; | 204 | int ret; |
206 | u8 val, mask; | 205 | u8 val, mask; |
207 | 206 | ||
@@ -231,8 +230,7 @@ out: | |||
231 | 230 | ||
232 | static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) | 231 | static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) |
233 | { | 232 | { |
234 | struct twl_pwm_chip *twl = container_of(chip, struct twl_pwm_chip, | 233 | struct twl_pwm_chip *twl = to_twl(chip); |
235 | chip); | ||
236 | int ret; | 234 | int ret; |
237 | u8 val; | 235 | u8 val; |
238 | 236 | ||
@@ -255,8 +253,7 @@ out: | |||
255 | 253 | ||
256 | static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) | 254 | static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) |
257 | { | 255 | { |
258 | struct twl_pwm_chip *twl = container_of(chip, struct twl_pwm_chip, | 256 | struct twl_pwm_chip *twl = to_twl(chip); |
259 | chip); | ||
260 | int ret; | 257 | int ret; |
261 | u8 val; | 258 | u8 val; |
262 | 259 | ||
@@ -315,6 +312,7 @@ static int twl_pwm_probe(struct platform_device *pdev) | |||
315 | twl->chip.dev = &pdev->dev; | 312 | twl->chip.dev = &pdev->dev; |
316 | twl->chip.base = -1; | 313 | twl->chip.base = -1; |
317 | twl->chip.npwm = 2; | 314 | twl->chip.npwm = 2; |
315 | twl->chip.can_sleep = true; | ||
318 | 316 | ||
319 | mutex_init(&twl->mutex); | 317 | mutex_init(&twl->mutex); |
320 | 318 | ||