diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-05-20 13:58:57 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-05-20 13:58:57 +0400 |
commit | 3374cd1abd478f767aaedf2c21d109596ff0fe72 (patch) | |
tree | 46b00a571ba5d86373bd9054fdccc5dc6e28e42f /sound/isa | |
parent | e40152ee1e1c7a63f4777791863215e3faa37a86 (diff) | |
parent | 670ff6abd6caff406b217f8a828d6c03656535d8 (diff) | |
download | linux-3374cd1abd478f767aaedf2c21d109596ff0fe72.tar.xz |
Merge branch 'topic/core-cleanup' into for-linus
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/gus/gus_mem_proc.c | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/sound/isa/gus/gus_mem_proc.c b/sound/isa/gus/gus_mem_proc.c index 2803e227aec9..2ccb3fadd7be 100644 --- a/sound/isa/gus/gus_mem_proc.c +++ b/sound/isa/gus/gus_mem_proc.c @@ -31,52 +31,21 @@ struct gus_proc_private { struct snd_gus_card * gus; }; -static long snd_gf1_mem_proc_dump(struct snd_info_entry *entry, void *file_private_data, - struct file *file, char __user *buf, - unsigned long count, unsigned long pos) +static ssize_t snd_gf1_mem_proc_dump(struct snd_info_entry *entry, + void *file_private_data, + struct file *file, char __user *buf, + size_t count, loff_t pos) { - long size; struct gus_proc_private *priv = entry->private_data; struct snd_gus_card *gus = priv->gus; int err; - size = count; - if (pos + size > priv->size) - size = (long)priv->size - pos; - if (size > 0) { - if ((err = snd_gus_dram_read(gus, buf, pos, size, priv->rom)) < 0) - return err; - return size; - } - return 0; + err = snd_gus_dram_read(gus, buf, pos, count, priv->rom); + if (err < 0) + return err; + return count; } -static long long snd_gf1_mem_proc_llseek(struct snd_info_entry *entry, - void *private_file_data, - struct file *file, - long long offset, - int orig) -{ - struct gus_proc_private *priv = entry->private_data; - - switch (orig) { - case SEEK_SET: - file->f_pos = offset; - break; - case SEEK_CUR: - file->f_pos += offset; - break; - case SEEK_END: /* offset is negative */ - file->f_pos = priv->size + offset; - break; - default: - return -EINVAL; - } - if (file->f_pos > priv->size) - file->f_pos = priv->size; - return file->f_pos; -} - static void snd_gf1_mem_proc_free(struct snd_info_entry *entry) { struct gus_proc_private *priv = entry->private_data; @@ -85,7 +54,6 @@ static void snd_gf1_mem_proc_free(struct snd_info_entry *entry) static struct snd_info_entry_ops snd_gf1_mem_proc_ops = { .read = snd_gf1_mem_proc_dump, - .llseek = snd_gf1_mem_proc_llseek, }; int snd_gf1_mem_proc_init(struct snd_gus_card * gus) |