From: Andrey Smirnov Date: Tue, 21 Jun 2016 07:22:49 +0000 (-0700) Subject: rtc: rtctest: Change no IRQ detection for RTC_IRQP_READ X-Git-Tag: v4.8-rc1~28^2~35 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=519efa98051717479ff3d0b6be996e112e7a87ff;p=linux.git 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 Signed-off-by: Alexandre Belloni --- 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 @@ int main(int argc, char **argv) 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; }