rtc-m41t80: use nonseekable_open()
Use nonseekable_open() for this since seeking is not supported anyway. Signed-off-by: Jan Blunck <jblunck@suse.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
b627dbce6b
commit
09eeb1f5f4
@@ -595,10 +595,6 @@ static void wdt_disable(void)
|
|||||||
static ssize_t wdt_write(struct file *file, const char __user *buf,
|
static ssize_t wdt_write(struct file *file, const char __user *buf,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
/* Can't seek (pwrite) on this device
|
|
||||||
if (ppos != &file->f_pos)
|
|
||||||
return -ESPIPE;
|
|
||||||
*/
|
|
||||||
if (count) {
|
if (count) {
|
||||||
wdt_ping();
|
wdt_ping();
|
||||||
return 1;
|
return 1;
|
||||||
@@ -707,7 +703,7 @@ static int wdt_open(struct inode *inode, struct file *file)
|
|||||||
*/
|
*/
|
||||||
wdt_is_open = 1;
|
wdt_is_open = 1;
|
||||||
unlock_kernel();
|
unlock_kernel();
|
||||||
return 0;
|
return nonseekable_open(inode, file);
|
||||||
}
|
}
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user