and changed files
[powerpc.git] / sound / core / info.c
index 9663b6b..bf6dbf9 100644 (file)
@@ -120,7 +120,10 @@ int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...)
        len = buffer->len - buffer->size;
        va_start(args, fmt);
        for (;;) {
-               res = vsnprintf(buffer->buffer + buffer->curr, len, fmt, args);
+               va_list ap;
+               va_copy(ap, args);
+               res = vsnprintf(buffer->buffer + buffer->curr, len, fmt, ap);
+               va_end(ap);
                if (res < len)
                        break;
                err = resize_info_buffer(buffer, buffer->len + PAGE_SIZE);
@@ -175,15 +178,15 @@ static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig)
        switch (entry->content) {
        case SNDRV_INFO_CONTENT_TEXT:
                switch (orig) {
-               case 0: /* SEEK_SET */
+               case SEEK_SET:
                        file->f_pos = offset;
                        ret = file->f_pos;
                        goto out;
-               case 1: /* SEEK_CUR */
+               case SEEK_CUR:
                        file->f_pos += offset;
                        ret = file->f_pos;
                        goto out;
-               case 2: /* SEEK_END */
+               case SEEK_END:
                default:
                        ret = -EINVAL;
                        goto out;
@@ -485,7 +488,7 @@ static long snd_info_entry_ioctl(struct file *file, unsigned int cmd,
 
 static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma)
 {
-       struct inode *inode = file->f_dentry->d_inode;
+       struct inode *inode = file->f_path.dentry->d_inode;
        struct snd_info_private_data *data;
        struct snd_info_entry *entry;
 
@@ -504,7 +507,7 @@ static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma)
        return -ENXIO;
 }
 
-static struct file_operations snd_info_entry_operations =
+static const struct file_operations snd_info_entry_operations =
 {
        .owner =                THIS_MODULE,
        .llseek =               snd_info_entry_llseek,