Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
[cascardo/linux.git] / include / sound / core.h
index f557c8a..5135147 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include <linux/sched.h>               /* wake_up() */
-#include <asm/semaphore.h>             /* struct semaphore */
+#include <linux/mutex.h>               /* struct mutex */
 #include <linux/rwsem.h>               /* struct rw_semaphore */
 #include <linux/workqueue.h>           /* struct workqueue_struct */
 #include <linux/pm.h>                  /* pm_message_t */
@@ -137,7 +137,7 @@ struct snd_card {
 
 #ifdef CONFIG_PM
        unsigned int power_state;       /* power state */
-       struct semaphore power_lock;    /* power lock */
+       struct mutex power_lock;        /* power lock */
        wait_queue_head_t power_sleep;
 #endif
 
@@ -150,12 +150,12 @@ struct snd_card {
 #ifdef CONFIG_PM
 static inline void snd_power_lock(struct snd_card *card)
 {
-       down(&card->power_lock);
+       mutex_lock(&card->power_lock);
 }
 
 static inline void snd_power_unlock(struct snd_card *card)
 {
-       up(&card->power_lock);
+       mutex_unlock(&card->power_lock);
 }
 
 static inline unsigned int snd_power_get_state(struct snd_card *card)
@@ -170,24 +170,24 @@ static inline void snd_power_change_state(struct snd_card *card, unsigned int st
 }
 
 /* init.c */
-int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file);
+int snd_power_wait(struct snd_card *card, unsigned int power_state);
 
 #else /* ! CONFIG_PM */
 
 #define snd_power_lock(card)           do { (void)(card); } while (0)
 #define snd_power_unlock(card)         do { (void)(card); } while (0)
-static inline int snd_power_wait(struct snd_card *card, unsigned int state, struct file *file) { return 0; }
+static inline int snd_power_wait(struct snd_card *card, unsigned int state) { return 0; }
 #define snd_power_get_state(card)      SNDRV_CTL_POWER_D0
 #define snd_power_change_state(card, state)    do { (void)(card); } while (0)
 
 #endif /* CONFIG_PM */
 
 struct snd_minor {
-       struct list_head list;          /* list of all minors per card */
-       int number;                     /* minor number */
        int type;                       /* SNDRV_DEVICE_TYPE_XXX */
+       int card;                       /* card number */
        int device;                     /* device number */
-       struct file_operations *f_ops;  /* file operations */
+       const struct file_operations *f_ops;    /* file operations */
+       void *private_data;             /* private data for f_ops->open */
        char name[0];                   /* device name (keep at the end of
                                                                structure) */
 };
@@ -200,13 +200,17 @@ extern int snd_ecards_limit;
 void snd_request_card(int card);
 
 int snd_register_device(int type, struct snd_card *card, int dev,
-                       struct file_operations *f_ops, const char *name);
+                       const struct file_operations *f_ops, void *private_data,
+                       const char *name);
 int snd_unregister_device(int type, struct snd_card *card, int dev);
+void *snd_lookup_minor_data(unsigned int minor, int type);
 
 #ifdef CONFIG_SND_OSSEMUL
 int snd_register_oss_device(int type, struct snd_card *card, int dev,
-                           struct file_operations *f_ops, const char *name);
+                           const struct file_operations *f_ops, void *private_data,
+                           const char *name);
 int snd_unregister_oss_device(int type, struct snd_card *card, int dev);
+void *snd_lookup_oss_minor_data(unsigned int minor, int type);
 #endif
 
 int snd_minor_info_init(void);
@@ -217,11 +221,9 @@ int snd_minor_info_done(void);
 #ifdef CONFIG_SND_OSSEMUL
 int snd_minor_info_oss_init(void);
 int snd_minor_info_oss_done(void);
-int snd_oss_init_module(void);
 #else
 #define snd_minor_info_oss_init() /*NOP*/
 #define snd_minor_info_oss_done() /*NOP*/
-#define snd_oss_init_module() 0
 #endif
 
 /* memory.c */
@@ -315,7 +317,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
 #ifdef CONFIG_SND_VERBOSE_PRINTK
 /**
  * snd_printd - debug printk
- * @format: format string
+ * @fmt: format string
  *
  * Compiled only when Works like snd_printk() for debugging purpose.
  * Ignored when CONFIG_SND_DEBUG is not set.
@@ -329,7 +331,6 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
 /**
  * snd_assert - run-time assertion macro
  * @expr: expression
- * @args...: the action
  *
  * This macro checks the expression in run-time and invokes the commands
  * given in the rest arguments if the assertion is failed.