X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpci%2Fcs46xx%2Fcs46xx_lib.c;h=9a1758396395b0ee487376ddd3f28802224c2054;hb=1731da41698a0b4ce0b124c3771426720490471d;hp=e9810d2ea5af30b2e5219091a5620ffd51563428;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index e9810d2ea..9a1758396 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -2866,18 +2866,18 @@ void __devinit snd_cs46xx_gameport(cs46xx_t *chip) */ static long snd_cs46xx_io_read(snd_info_entry_t *entry, void *file_private_data, - struct file *file, char __user *buf, - unsigned long count, unsigned long pos) + struct file *file, char __user *buf, long count) { long size; snd_cs46xx_region_t *region = (snd_cs46xx_region_t *)entry->private_data; size = count; - if (pos + (size_t)size > region->size) - size = region->size - pos; + if (file->f_pos + (size_t)size > region->size) + size = region->size - file->f_pos; if (size > 0) { - if (copy_to_user_fromio(buf, region->remap_addr + pos, size)) + if (copy_to_user_fromio(buf, region->remap_addr + file->f_pos, size)) return -EFAULT; + file->f_pos += size; } return size; }