]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: rtctest: enabling UIE for a chip that doesn't support it returns EINVAL
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 16 Sep 2015 07:16:51 +0000 (09:16 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 2 Nov 2015 23:50:46 +0000 (00:50 +0100)
commit020847c9b33ba35a43345d6c2d5c8d2b22fdda40
tree94a9d7e57c65f192968d30b2c5f5b3deb8bf9c71
parent889fb0a3ee22e5da0d6e61206a611bead17b3b04
rtc: rtctest: enabling UIE for a chip that doesn't support it returns EINVAL

Calling ioctl(..., RTC_UIE_ON, ...) without CONFIG_RTC_INTF_DEV_UIE_EMUL
either ends in rtc_update_irq_enable if rtc->uie_unsupported is true
or in __rtc_set_alarm in the if (!rtc->ops->set_alarm) branch. In both
cases the return value is -EINVAL. So check for that one instead of
ENOTTY.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
tools/testing/selftests/timers/rtctest.c