]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
rtc: rtctest: Change no IRQ detection for RTC_IRQP_READ
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Tue, 21 Jun 2016 07:22:49 +0000 (00:22 -0700)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sun, 26 Jun 2016 21:43:49 +0000 (23:43 +0200)
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>
tools/testing/selftests/timers/rtctest.c

index 0cb46285ccf401066c7024a7f7fb2b5a17f5b2fc..97beadf548b0f5e50a5bfa663027157abecc8ebd 100644 (file)
@@ -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;
                }