Commit e6380f1c authored by Linus Torvalds's avatar Linus Torvalds

Fix up drivers that access file->f_pos directly.

Use the proper "pointer to pos" that is passed down instead.
parent 799e4907
...@@ -345,7 +345,7 @@ acpi_system_write_alarm ( ...@@ -345,7 +345,7 @@ acpi_system_write_alarm (
acpi_set_register(ACPI_BITREG_RT_CLOCK_ENABLE, 1, ACPI_MTX_LOCK); acpi_set_register(ACPI_BITREG_RT_CLOCK_ENABLE, 1, ACPI_MTX_LOCK);
file->f_pos += count; *ppos += count;
result = 0; result = 0;
end: end:
......
...@@ -94,7 +94,7 @@ isdn_divert_read(struct file *file, char *buf, size_t count, loff_t * off) ...@@ -94,7 +94,7 @@ isdn_divert_read(struct file *file, char *buf, size_t count, loff_t * off)
if ((len = strlen(inf->info_start)) <= count) { if ((len = strlen(inf->info_start)) <= count) {
if (copy_to_user(buf, inf->info_start, len)) if (copy_to_user(buf, inf->info_start, len))
return -EFAULT; return -EFAULT;
file->f_pos += len; *off += len;
return (len); return (len);
} }
return (0); return (0);
...@@ -142,7 +142,7 @@ isdn_divert_open(struct inode *ino, struct file *filep) ...@@ -142,7 +142,7 @@ isdn_divert_open(struct inode *ino, struct file *filep)
(struct divert_info **) filep->private_data = &divert_info_head; (struct divert_info **) filep->private_data = &divert_info_head;
spin_unlock_irqrestore( &divert_info_lock, flags ); spin_unlock_irqrestore( &divert_info_lock, flags );
/* start_divert(); */ /* start_divert(); */
return (0); return nonseekable_open(ino, filep);
} /* isdn_divert_open */ } /* isdn_divert_open */
/*******************/ /*******************/
......
...@@ -234,7 +234,7 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t * off) ...@@ -234,7 +234,7 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t * off)
if ((len = strlen(inf->log_start)) <= count) { if ((len = strlen(inf->log_start)) <= count) {
if (copy_to_user(buf, inf->log_start, len)) if (copy_to_user(buf, inf->log_start, len))
return -EFAULT; return -EFAULT;
file->f_pos += len; *off += len;
return (len); return (len);
} }
return (0); return (0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment