summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-tegra.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2015-02-18 08:40:29 +0100
committerThierry Reding <thierry.reding@gmail.com>2015-02-18 08:40:29 +0100
commitb65af27ad89de60ca55721f9368b18d49ba1f269 (patch)
tree69102692126bae18880008c8cc3d610fff059863 /drivers/pwm/pwm-tegra.c
parent8d6cc0738540f97edb021d3b76a4367519f1e5f1 (diff)
pwm: tegra: Use NSEC_PER_SEC
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>
Diffstat (limited to 'drivers/pwm/pwm-tegra.c')
-rw-r--r--drivers/pwm/pwm-tegra.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
index 5b97cae5423a..cabd7d8e05cc 100644
--- 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;