summaryrefslogtreecommitdiff
path: root/src/include/pc80
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/pc80')
-rw-r--r--src/include/pc80/mc146818rtc.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h
index 39f58d6015..be90358b05 100644
--- a/src/include/pc80/mc146818rtc.h
+++ b/src/include/pc80/mc146818rtc.h
@@ -140,14 +140,12 @@ static inline void cmos_write(unsigned char val, unsigned char addr)
* eg. the Century / AltCentury byte. So to be safe, disable
* RTC before changing any value.
*/
- if ((addr != RTC_CONTROL) && !(control_state & RTC_SET)) {
+ if ((addr != RTC_CONTROL) && !(control_state & RTC_SET))
cmos_write_inner(control_state | RTC_SET, RTC_CONTROL);
- }
cmos_write_inner(val, addr);
/* reset to prior configuration */
- if ((addr != RTC_CONTROL) && !(control_state & RTC_SET)) {
+ if ((addr != RTC_CONTROL) && !(control_state & RTC_SET))
cmos_write_inner(control_state, RTC_CONTROL);
- }
}
static inline void cmos_disable_rtc(void)