static ssize_t usb_pcwd_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos)
{
+ /* Can't seek (pwrite) on this device */
+ if (ppos != &file->f_pos)
+ return -ESPIPE;
+
/* See if we got the magic character 'V' and reload the timer */
if (len) {
if (!nowayout) {
/* Activate */
usb_pcwd_start(usb_pcwd_device);
usb_pcwd_keepalive(usb_pcwd_device);
- return nonseekable_open(inode, file);
+ return 0;
}
static int usb_pcwd_release(struct inode *inode, struct file *file)
{
int temperature;
+ /* Can't seek (pwrite) on this device */
+ if (ppos != &file->f_pos)
+ return -ESPIPE;
+
if (usb_pcwd_get_temperature(usb_pcwd_device, &temperature))
return -EFAULT;
static int usb_pcwd_temperature_open(struct inode *inode, struct file *file)
{
- return nonseekable_open(inode, file);
+ return 0;
}
static int usb_pcwd_temperature_release(struct inode *inode, struct file *file)