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) {
if (!nowayout) {
size_t i;
* Activate
*/
wdt_start();
- return nonseekable_open(inode, file);
+ return 0;
}
/**
{
int temperature;
+ /* Can't seek (pread) on this device */
+ if (ptr != &file->f_pos)
+ return -ESPIPE;
+
if (wdt_get_temperature(&temperature))
return -EFAULT;
static int wdt_temp_open(struct inode *inode, struct file *file)
{
- return nonseekable_open(inode, file);
+ return 0;
}
/**