X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpci%2Fcs4281.c;h=86430a0bcd68a2a8867aad71714067ee77f26c1d;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=91a60417e7ec467eb795eaeb7b4648d16c513993;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index 91a60417e..86430a0bc 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c @@ -1185,35 +1185,35 @@ static void snd_cs4281_proc_read(snd_info_entry_t *entry, } static long snd_cs4281_BA0_read(snd_info_entry_t *entry, void *file_private_data, - struct file *file, char __user *buf, long count) + struct file *file, char __user *buf, + unsigned long count, unsigned long pos) { long size; cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return -ENXIO); size = count; - if (file->f_pos + size > CS4281_BA0_SIZE) - size = (long)CS4281_BA0_SIZE - file->f_pos; + if (pos + size > CS4281_BA0_SIZE) + size = (long)CS4281_BA0_SIZE - pos; if (size > 0) { - if (copy_to_user_fromio(buf, chip->ba0 + file->f_pos, size)) + if (copy_to_user_fromio(buf, chip->ba0 + pos, size)) return -EFAULT; - file->f_pos += size; } return size; } static long snd_cs4281_BA1_read(snd_info_entry_t *entry, void *file_private_data, - struct file *file, char __user *buf, long count) + struct file *file, char __user *buf, + unsigned long count, unsigned long pos) { long size; cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return -ENXIO); size = count; - if (file->f_pos + size > CS4281_BA1_SIZE) - size = (long)CS4281_BA1_SIZE - file->f_pos; + if (pos + size > CS4281_BA1_SIZE) + size = (long)CS4281_BA1_SIZE - pos; if (size > 0) { - if (copy_to_user_fromio(buf, chip->ba1 + file->f_pos, size)) + if (copy_to_user_fromio(buf, chip->ba1 + pos, size)) return -EFAULT; - file->f_pos += size; } return size; }