diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2016-07-11 12:14:34 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-07-11 12:49:36 +0200 |
commit | 313b78efea71229e0c48d50ed5527a3c34f3e4eb (patch) | |
tree | 07c3aa63d684e22b4e587777f31304ff3825dc4e /drivers | |
parent | pwm: atmel: Fix disabling of PWM channels (diff) | |
download | linux-313b78efea71229e0c48d50ed5527a3c34f3e4eb.tar.xz linux-313b78efea71229e0c48d50ed5527a3c34f3e4eb.zip |
pwm: atmel: Fix checkpatch warnings
Avoid an overly long line by moving a comment around, and remove a use
of else-after-return.
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers')
-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 { void __iomem *base; unsigned int updated_pwms; - struct mutex isr_lock; /* ISR is cleared when read, ensure only one thread does that */ + /* ISR is cleared when read, ensure only one thread does that */ + struct mutex isr_lock; void (*config)(struct pwm_chip *chip, struct pwm_device *pwm, unsigned long dty, unsigned long prd); @@ -334,6 +335,8 @@ MODULE_DEVICE_TABLE(of, atmel_pwm_dt_ids); static inline const struct atmel_pwm_data * atmel_pwm_get_driver_data(struct platform_device *pdev) { + const struct platform_device_id *id; + if (pdev->dev.of_node) { const struct of_device_id *match; @@ -342,13 +345,11 @@ atmel_pwm_get_driver_data(struct platform_device *pdev) return NULL; return match->data; - } else { - const struct platform_device_id *id; + } - id = platform_get_device_id(pdev); + id = platform_get_device_id(pdev); - return (struct atmel_pwm_data *)id->driver_data; - } + return (struct atmel_pwm_data *)id->driver_data; } static int atmel_pwm_probe(struct platform_device *pdev) |