From: Thierry Reding Date: Wed, 18 Feb 2015 07:40:29 +0000 (+0100) Subject: pwm: tegra: Use NSEC_PER_SEC X-Git-Tag: v4.9.8~4769^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b65af27ad89de60ca55721f9368b18d49ba1f269;p=platform%2Fkernel%2Flinux-rpi3.git 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 --- diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c index 5b97cae..cabd7d8 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;