Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1427400
| From | Andrey Smirnov <andrew.smirnov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 16/17] RTC: rtctest: Change no IRQ detection for RTC_IRQP_READ |
| Date | 2016-06-21 09:30 +0200 |
| Message-ID | <rMoif-2I5-53@gated-at.bofh.it> (permalink) |
| References | <rMoid-2I5-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
tools/testing/selftests/timers/rtctest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/timers/rtctest.c b/tools/testing/selftests/timers/rtctest.c
index 0cb4628..97beadf 100644
--- a/tools/testing/selftests/timers/rtctest.c
+++ b/tools/testing/selftests/timers/rtctest.c
@@ -200,7 +200,7 @@ test_PIE:
retval = ioctl(fd, RTC_IRQP_READ, &tmp);
if (retval == -1) {
/* not all RTCs support periodic IRQs */
- if (errno == ENOTTY) {
+ if (errno == EINVAL) {
fprintf(stderr, "\nNo periodic IRQ support\n");
goto done;
}
--
2.5.5
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v2 16/17] RTC: rtctest: Change no IRQ detection for RTC_IRQP_READ Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-06-21 09:30 +0200
csiph-web