diff options
author | Heiko Stuebner <heiko@sntech.de> | 2015-04-16 15:45:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-17 09:04:01 -0400 |
commit | b3288a43b4dacd2b4d2b24726d7b469d8ade5120 (patch) | |
tree | 6f83a13dd27b1e1d39b3091b0ba1b09e9a491158 /drivers/rtc/rtc-hym8563.c | |
parent | d174a024007dd543fd066cffd8eb727806a62da6 (diff) |
drivers/rtc/rtc-hym8563.c: return clock rate even when clock is disabled
When the clock is disabled, do not return a rate of 0 but instead return
the rate the clock will be running at after it gets enabled. This
prevents problems when the core clock code is trying to determine a
suitable rate, while the clock is still off.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-hym8563.c')
-rw-r--r-- | drivers/rtc/rtc-hym8563.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c index b936bb4096b5..d4a65619ef14 100644 --- a/drivers/rtc/rtc-hym8563.c +++ b/drivers/rtc/rtc-hym8563.c | |||
@@ -309,7 +309,7 @@ static unsigned long hym8563_clkout_recalc_rate(struct clk_hw *hw, | |||
309 | struct i2c_client *client = hym8563->client; | 309 | struct i2c_client *client = hym8563->client; |
310 | int ret = i2c_smbus_read_byte_data(client, HYM8563_CLKOUT); | 310 | int ret = i2c_smbus_read_byte_data(client, HYM8563_CLKOUT); |
311 | 311 | ||
312 | if (ret < 0 || ret & HYM8563_CLKOUT_DISABLE) | 312 | if (ret < 0) |
313 | return 0; | 313 | return 0; |
314 | 314 | ||
315 | ret &= HYM8563_CLKOUT_MASK; | 315 | ret &= HYM8563_CLKOUT_MASK; |