* [PATCH 1/2] rtc: make example code jump to done instead of return when ioctl not supported
@ 2007-06-08 11:34 Hans-Christian Egtvedt
2007-06-08 11:34 ` [PATCH 2/2] rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver Hans-Christian Egtvedt
0 siblings, 1 reply; 2+ messages in thread
From: Hans-Christian Egtvedt @ 2007-06-08 11:34 UTC (permalink / raw)
To: linux-kernel, rtc-linux; +Cc: Hans-Christian Egtvedt
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
---
Documentation/rtc.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt
index 1ef6bb8..8cc67c7 100644
--- a/Documentation/rtc.txt
+++ b/Documentation/rtc.txt
@@ -388,7 +388,7 @@ test_PIE:
/* not all RTCs support periodic IRQs */
if (errno == ENOTTY) {
fprintf(stderr, "\nNo periodic IRQ support\n");
- return 0;
+ goto done;
}
perror("RTC_IRQP_READ ioctl");
exit(errno);
--
1.4.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver
2007-06-08 11:34 [PATCH 1/2] rtc: make example code jump to done instead of return when ioctl not supported Hans-Christian Egtvedt
@ 2007-06-08 11:34 ` Hans-Christian Egtvedt
0 siblings, 0 replies; 2+ messages in thread
From: Hans-Christian Egtvedt @ 2007-06-08 11:34 UTC (permalink / raw)
To: linux-kernel, rtc-linux; +Cc: Hans-Christian Egtvedt
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
---
drivers/rtc/rtc-dev.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 137330b..7f0e749 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -306,6 +306,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
case RTC_IRQP_READ:
if (ops->irq_set_freq)
err = put_user(rtc->irq_freq, (unsigned long __user *)uarg);
+ else
+ err = -ENOTTY;
break;
case RTC_IRQP_SET:
--
1.4.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-08 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-08 11:34 [PATCH 1/2] rtc: make example code jump to done instead of return when ioctl not supported Hans-Christian Egtvedt
2007-06-08 11:34 ` [PATCH 2/2] rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver Hans-Christian Egtvedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).