[PATCH 07/12] rtc-m41t80: Use nonseekable_open()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Blunck
Date: Friday, April 9, 2010 - 7:00 am

Use nonseekable_open() for this since seeking is not supported anyway.

Signed-off-by: Jan Blunck <jblunck@suse.de>
---
 drivers/rtc/rtc-m41t80.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index 60fe266..1e2ed76 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -595,10 +595,6 @@ static void wdt_disable(void)
 static ssize_t wdt_write(struct file *file, const char __user *buf,
 			 size_t count, loff_t *ppos)
 {
-	/*  Can't seek (pwrite) on this device
-	if (ppos != &file->f_pos)
-	return -ESPIPE;
-	*/
 	if (count) {
 		wdt_ping();
 		return 1;
@@ -695,7 +691,7 @@ static int wdt_open(struct inode *inode, struct file *file)
 		 */
 		wdt_is_open = 1;
 		unlock_kernel();
-		return 0;
+		return nonseekable_open(inode, file);
 	}
 	return -ENODEV;
 }
-- 
1.6.4.2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 06/12] zcrypt: Use nonseekable_open(), Jan Blunck, (Fri Apr 9, 7:00 am)
[PATCH 07/12] rtc-m41t80: Use nonseekable_open(), Jan Blunck, (Fri Apr 9, 7:00 am)
[PATCH 08/12] Introduce noop_llseek(), Jan Blunck, (Fri Apr 9, 7:00 am)