rtc: rtctest: Change no IRQ detection for RTC_IRQP_SET

A call to ioctl(..., RTC_IRQP_SET, ...) 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>
This commit is contained in:
Andrey Smirnov 2016-06-21 00:22:50 -07:00 committed by Alexandre Belloni
parent 519efa9805
commit 0a553cbabd
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ int main(int argc, char **argv)
retval = ioctl(fd, RTC_IRQP_SET, tmp); retval = ioctl(fd, RTC_IRQP_SET, tmp);
if (retval == -1) { if (retval == -1) {
/* not all RTCs can change their periodic IRQ rate */ /* not all RTCs can change their periodic IRQ rate */
if (errno == ENOTTY) { if (errno == EINVAL) {
fprintf(stderr, fprintf(stderr,
"\n...Periodic IRQ rate is fixed\n"); "\n...Periodic IRQ rate is fixed\n");
goto done; goto done;