提交 519efa98 编写于 作者: A Andrey Smirnov 提交者: Alexandre Belloni

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: NAndrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 cd26fca2
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册