diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2016-06-21 03:22:49 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-06-26 17:43:49 -0400 |
commit | 519efa98051717479ff3d0b6be996e112e7a87ff (patch) | |
tree | d9b58b7cdaa631df07249ba34f2d70bda3140846 /tools | |
parent | cd26fca202f9a720d90e00ac2dbb7c4d0544f748 (diff) |
rtc: rtctest: Change no IRQ detection for RTC_IRQP_READ
A call to ioctl(..., RTC_IRQP_READ, ...) should never result in
ENOTTY. All new style RTC drivers implement it and all of the old style
drivers return EINVAL when they don't support periodic IRQs.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/timers/rtctest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/timers/rtctest.c b/tools/testing/selftests/timers/rtctest.c index 0cb46285ccf4..97beadf548b0 100644 --- a/tools/testing/selftests/timers/rtctest.c +++ b/tools/testing/selftests/timers/rtctest.c | |||
@@ -200,7 +200,7 @@ test_PIE: | |||
200 | retval = ioctl(fd, RTC_IRQP_READ, &tmp); | 200 | retval = ioctl(fd, RTC_IRQP_READ, &tmp); |
201 | if (retval == -1) { | 201 | if (retval == -1) { |
202 | /* not all RTCs support periodic IRQs */ | 202 | /* not all RTCs support periodic IRQs */ |
203 | if (errno == ENOTTY) { | 203 | if (errno == EINVAL) { |
204 | fprintf(stderr, "\nNo periodic IRQ support\n"); | 204 | fprintf(stderr, "\nNo periodic IRQ support\n"); |
205 | goto done; | 205 | goto done; |
206 | } | 206 | } |