diff options
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
| -rw-r--r-- | drivers/pwm/pwm-atmel.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index f3df529737f2..8083015b8641 100644 --- a/drivers/pwm/pwm-atmel.c +++ b/drivers/pwm/pwm-atmel.c | |||
| @@ -64,7 +64,8 @@ struct atmel_pwm_chip { | |||
| 64 | void __iomem *base; | 64 | void __iomem *base; |
| 65 | 65 | ||
| 66 | unsigned int updated_pwms; | 66 | unsigned int updated_pwms; |
| 67 | struct mutex isr_lock; /* ISR is cleared when read, ensure only one thread does that */ | 67 | /* ISR is cleared when read, ensure only one thread does that */ |
| 68 | struct mutex isr_lock; | ||
| 68 | 69 | ||
| 69 | void (*config)(struct pwm_chip *chip, struct pwm_device *pwm, | 70 | void (*config)(struct pwm_chip *chip, struct pwm_device *pwm, |
| 70 | unsigned long dty, unsigned long prd); | 71 | unsigned long dty, unsigned long prd); |
| @@ -334,6 +335,8 @@ MODULE_DEVICE_TABLE(of, atmel_pwm_dt_ids); | |||
| 334 | static inline const struct atmel_pwm_data * | 335 | static inline const struct atmel_pwm_data * |
| 335 | atmel_pwm_get_driver_data(struct platform_device *pdev) | 336 | atmel_pwm_get_driver_data(struct platform_device *pdev) |
| 336 | { | 337 | { |
| 338 | const struct platform_device_id *id; | ||
| 339 | |||
| 337 | if (pdev->dev.of_node) { | 340 | if (pdev->dev.of_node) { |
| 338 | const struct of_device_id *match; | 341 | const struct of_device_id *match; |
| 339 | 342 | ||
| @@ -342,13 +345,11 @@ atmel_pwm_get_driver_data(struct platform_device *pdev) | |||
| 342 | return NULL; | 345 | return NULL; |
| 343 | 346 | ||
| 344 | return match->data; | 347 | return match->data; |
| 345 | } else { | 348 | } |
| 346 | const struct platform_device_id *id; | ||
| 347 | 349 | ||
| 348 | id = platform_get_device_id(pdev); | 350 | id = platform_get_device_id(pdev); |
| 349 | 351 | ||
| 350 | return (struct atmel_pwm_data *)id->driver_data; | 352 | return (struct atmel_pwm_data *)id->driver_data; |
| 351 | } | ||
| 352 | } | 353 | } |
| 353 | 354 | ||
| 354 | static int atmel_pwm_probe(struct platform_device *pdev) | 355 | static int atmel_pwm_probe(struct platform_device *pdev) |
