summaryrefslogtreecommitdiff
path: root/Documentation/rtc.txt
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-02-06 01:38:57 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 10:41:14 -0800
commit8696e70267a6b1c7f1e26b32ce97646334b1613a (patch)
tree1c0eea2da4086c8f3acc15793a9c6d2b72a39c3e /Documentation/rtc.txt
parent8a0ba4e0178f4d87445b5527bfefdd5437b974c6 (diff)
downloadlinux-3.10-8696e70267a6b1c7f1e26b32ce97646334b1613a.tar.gz
linux-3.10-8696e70267a6b1c7f1e26b32ce97646334b1613a.tar.bz2
linux-3.10-8696e70267a6b1c7f1e26b32ce97646334b1613a.zip
rtc: cleanup example code
No functional changes here, just tighten up style/whitespace. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/rtc.txt')
-rw-r--r--Documentation/rtc.txt38
1 files changed, 19 insertions, 19 deletions
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt
index 804a7cf6bd1..8deffcd68cb 100644
--- a/Documentation/rtc.txt
+++ b/Documentation/rtc.txt
@@ -268,8 +268,8 @@ int main(int argc, char **argv)
/* This read will block */
retval = read(fd, &data, sizeof(unsigned long));
if (retval == -1) {
- perror("read");
- exit(errno);
+ perror("read");
+ exit(errno);
}
fprintf(stderr, " %d",i);
fflush(stderr);
@@ -326,11 +326,11 @@ test_READ:
rtc_tm.tm_sec %= 60;
rtc_tm.tm_min++;
}
- if (rtc_tm.tm_min == 60) {
+ if (rtc_tm.tm_min == 60) {
rtc_tm.tm_min = 0;
rtc_tm.tm_hour++;
}
- if (rtc_tm.tm_hour == 24)
+ if (rtc_tm.tm_hour == 24)
rtc_tm.tm_hour = 0;
retval = ioctl(fd, RTC_ALM_SET, &rtc_tm);
@@ -407,8 +407,8 @@ test_PIE:
"\n...Periodic IRQ rate is fixed\n");
goto done;
}
- perror("RTC_IRQP_SET ioctl");
- exit(errno);
+ perror("RTC_IRQP_SET ioctl");
+ exit(errno);
}
fprintf(stderr, "\n%ldHz:\t", tmp);
@@ -417,27 +417,27 @@ test_PIE:
/* Enable periodic interrupts */
retval = ioctl(fd, RTC_PIE_ON, 0);
if (retval == -1) {
- perror("RTC_PIE_ON ioctl");
- exit(errno);
+ perror("RTC_PIE_ON ioctl");
+ exit(errno);
}
for (i=1; i<21; i++) {
- /* This blocks */
- retval = read(fd, &data, sizeof(unsigned long));
- if (retval == -1) {
- perror("read");
- exit(errno);
- }
- fprintf(stderr, " %d",i);
- fflush(stderr);
- irqcount++;
+ /* This blocks */
+ retval = read(fd, &data, sizeof(unsigned long));
+ if (retval == -1) {
+ perror("read");
+ exit(errno);
+ }
+ fprintf(stderr, " %d",i);
+ fflush(stderr);
+ irqcount++;
}
/* Disable periodic interrupts */
retval = ioctl(fd, RTC_PIE_OFF, 0);
if (retval == -1) {
- perror("RTC_PIE_OFF ioctl");
- exit(errno);
+ perror("RTC_PIE_OFF ioctl");
+ exit(errno);
}
}