From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754899AbcFUHZi (ORCPT ); Tue, 21 Jun 2016 03:25:38 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:34353 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754493AbcFUHYY (ORCPT ); Tue, 21 Jun 2016 03:24:24 -0400 From: Andrey Smirnov To: rtc-linux@googlegroups.com Cc: Andrey Smirnov , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, cphealy@gmail.com Subject: [PATCH v2 17/17] RTC: rtctest: Change no IRQ detection for RTC_IRQP_SET Date: Tue, 21 Jun 2016 00:22:50 -0700 Message-Id: <1466493770-11895-16-git-send-email-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466493770-11895-1-git-send-email-andrew.smirnov@gmail.com> References: <1466493770-11895-1-git-send-email-andrew.smirnov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 97beadf..4230d30 100644 --- a/tools/testing/selftests/timers/rtctest.c +++ b/tools/testing/selftests/timers/rtctest.c @@ -218,7 +218,7 @@ test_PIE: retval = ioctl(fd, RTC_IRQP_SET, tmp); if (retval == -1) { /* not all RTCs can change their periodic IRQ rate */ - if (errno == ENOTTY) { + if (errno == EINVAL) { fprintf(stderr, "\n...Periodic IRQ rate is fixed\n"); goto done; -- 2.5.5