]> git.hungrycats.org Git - linux/commitdiff
Fix up drivers that access file->f_pos directly.
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 9 Aug 2004 10:23:30 +0000 (03:23 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 9 Aug 2004 10:23:30 +0000 (03:23 -0700)
Use the proper "pointer to pos" that is passed down instead.

drivers/acpi/sleep/proc.c
drivers/isdn/divert/divert_procfs.c
drivers/isdn/hysdn/hysdn_proclog.c

index a64ef154db0808a62e55b2cf5c398d1764311ba7..7eb20609694e91e89026216630bdf7e2b4a96626 100644 (file)
@@ -345,7 +345,7 @@ acpi_system_write_alarm (
 
        acpi_set_register(ACPI_BITREG_RT_CLOCK_ENABLE, 1, ACPI_MTX_LOCK);
 
-       file->f_pos += count;
+       *ppos += count;
 
        result = 0;
 end:
index d89a94b964cb9842dd7bbd0674835f32f2c9547f..d3506ee8543d512851535ee5a21647ff1ae20b7b 100644 (file)
@@ -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 (copy_to_user(buf, inf->info_start, len))
                        return -EFAULT;
-               file->f_pos += len;
+               *off += len;
                return (len);
        }
        return (0);
@@ -142,7 +142,7 @@ isdn_divert_open(struct inode *ino, struct file *filep)
                (struct divert_info **) filep->private_data = &divert_info_head;
        spin_unlock_irqrestore( &divert_info_lock, flags );
        /*  start_divert(); */
-       return (0);
+       return nonseekable_open(ino, filep);
 }                              /* isdn_divert_open */
 
 /*******************/
index a5477cc4eaf52164b7bafa23b681243a2f382f39..8ef2b7c952a67d5e7d2195024f739e52bdab0223 100644 (file)
@@ -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 (copy_to_user(buf, inf->log_start, len))
                        return -EFAULT;
-               file->f_pos += len;
+               *off += len;
                return (len);
        }
        return (0);