diff options
author | Jaewon Kim <jaewon02.kim@samsung.com> | 2016-04-14 21:21:47 +0900 |
---|---|---|
committer | jino.cho <jino.cho@samsung.com> | 2017-03-03 17:02:25 +0900 |
commit | 6869f6fd339a92e47b83c0f039cd56c0215aea6c (patch) | |
tree | ddd49b78cca3d30ff77227ddf52a988d88fae4cc /drivers | |
parent | 8e4374b3ae7c1eaad0269d45a64a9a49f5dc600c (diff) | |
download | linux-3.10-artik-6869f6fd339a92e47b83c0f039cd56c0215aea6c.tar.gz linux-3.10-artik-6869f6fd339a92e47b83c0f039cd56c0215aea6c.tar.bz2 linux-3.10-artik-6869f6fd339a92e47b83c0f039cd56c0215aea6c.zip |
pwm: samsung: fix period config bug
There is some bug about period setup in pwm_config.
If push too short value in period, It return -ERANGE error.
But push same value in period, We can not show error message.
echo 10 > period
- write error: Numerical result out of range
echo 10 > period
This problem caused by early write before error checking done.
And s3c_pwm->period_ns value filled at end of s3c_pwm_config.
Change-Id: I48c54b9860829218a78ef4064985cc576d4b09ed
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pwm/pwm-samsung.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c index eb9dd7d4c84..520417d584a 100644 --- a/drivers/pwm/pwm-samsung.c +++ b/drivers/pwm/pwm-samsung.c @@ -218,7 +218,6 @@ static int s3c_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, tin_rate = pwm_calc_tin(pwm, period); clk_set_rate(s3c_pwm->clk_div, tin_rate); tin_rate = clk_get_rate(s3c_pwm->clk_div); - s3c_pwm->period_ns = period_ns; pwm_dbg(s3c, "tin_rate=%lu\n", tin_rate); } else { tin_rate = clk_get_rate(s3c_pwm->clk_tin); |