projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d6cc07
)
pwm: tegra: Use NSEC_PER_SEC
author
Thierry Reding
<thierry.reding@gmail.com>
Wed, 18 Feb 2015 07:40:29 +0000
(08:40 +0100)
committer
Thierry Reding
<thierry.reding@gmail.com>
Wed, 18 Feb 2015 07:40:29 +0000
(08:40 +0100)
Instead of using the literal value for the number of nanoseconds per
second, use the macro instead to increase readability.
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-tegra.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-tegra.c
b/drivers/pwm/pwm-tegra.c
index 5b97cae5423a0fead0b3f944c6d7ee933f58459e..cabd7d8e05cc0fdd79e42da12046d43d5e7032af 100644
(file)
--- a/
drivers/pwm/pwm-tegra.c
+++ b/
drivers/pwm/pwm-tegra.c
@@
-87,7
+87,7
@@
static int tegra_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
* cycles at the PWM clock rate will take period_ns nanoseconds.
*/
rate = clk_get_rate(pc->clk) >> PWM_DUTY_WIDTH;
- hz =
1000000000ul
/ period_ns;
+ hz =
NSEC_PER_SEC
/ period_ns;
rate = (rate + (hz / 2)) / hz;