From: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
To: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com
Cc: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Subject: [PATCH 2/2] rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver
Date: Fri, 8 Jun 2007 13:34:18 +0200 [thread overview]
Message-ID: <11813024583427-git-send-email-hcegtvedt@atmel.com> (raw)
In-Reply-To: <11813024582527-git-send-email-hcegtvedt@atmel.com>
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
prev parent reply other threads:[~2007-06-08 11:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11813024583427-git-send-email-hcegtvedt@atmel.com \
--to=hcegtvedt@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®