[ALSA] Remove sound/driver.h
[pandora-kernel.git] / sound / core / info.c
index e43662b..9977ec2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Information interface for ALSA driver
- *  Copyright (c) by Jaroslav Kysela <perex@suse.cz>
+ *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
  *
  *
  *   This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,6 @@
  *
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/time.h>
 #include <linux/smp_lock.h>
@@ -120,7 +119,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);
@@ -485,7 +487,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 +506,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,