]> err.no Git - linux-2.6/blobdiff - include/sound/core.h
Merge ../to-linus-stable/
[linux-2.6] / include / sound / core.h
index 9117c23e3a01b9b885eb97f18c06efd79f677347..38b357fc8958e991ef4cb53abdc4e6c01993ba88 100644 (file)
@@ -126,25 +126,26 @@ struct snd_monitor_file {
        struct snd_monitor_file *next;
 };
 
-struct snd_shutdown_f_ops;     /* define it later */
+struct snd_shutdown_f_ops;     /* define it later in init.c */
 
 /* main structure for soundcard */
 
 struct _snd_card {
-       int number;                     /* number of soundcard (index to snd_cards) */
+       int number;                     /* number of soundcard (index to
+                                                               snd_cards) */
 
        char id[16];                    /* id string of this card */
        char driver[16];                /* driver name */
        char shortname[32];             /* short name of this soundcard */
        char longname[80];              /* name of this soundcard */
        char mixername[80];             /* mixer name */
-       char components[80];            /* card components delimited with space */
-
+       char components[80];            /* card components delimited with
+                                                               space */
        struct module *module;          /* top-level module */
 
        void *private_data;             /* private data for soundcard */
-       void (*private_free) (snd_card_t *card); /* callback for freeing of private data */
-
+       void (*private_free) (snd_card_t *card); /* callback for freeing of
+                                                               private data */
        struct list_head devices;       /* devices */
 
        unsigned int last_numid;        /* last used numeric ID */
@@ -160,7 +161,8 @@ struct _snd_card {
        struct proc_dir_entry *proc_root_link;  /* number link to real id */
 
        struct snd_monitor_file *files; /* all files associated to this card */
-       struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown state */
+       struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown
+                                                               state */
        spinlock_t files_lock;          /* lock the files for this card */
        int shutdown;                   /* this card is going down */
        wait_queue_head_t shutdown_sleep;
@@ -196,8 +198,6 @@ static inline void snd_power_unlock(snd_card_t *card)
        up(&card->power_lock);
 }
 
-int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file);
-
 static inline unsigned int snd_power_get_state(snd_card_t *card)
 {
        return card->power_state;
@@ -208,6 +208,10 @@ static inline void snd_power_change_state(snd_card_t *card, unsigned int state)
        card->power_state = state;
        wake_up(&card->power_sleep);
 }
+
+/* init.c */
+int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file);
+
 int snd_card_set_pm_callback(snd_card_t *card,
                             int (*suspend)(snd_card_t *, pm_message_t),
                             int (*resume)(snd_card_t *),
@@ -238,15 +242,14 @@ static inline int snd_power_wait(snd_card_t *card, unsigned int state, struct fi
 
 #endif /* CONFIG_PM */
 
-/* device.c */
-
 struct _snd_minor {
        struct list_head list;          /* list of all minors per card */
        int number;                     /* minor number */
        int device;                     /* device number */
        const char *comment;            /* for /proc/asound/devices */
        struct file_operations *f_ops;  /* file operations */
-       char name[0];                   /* device name (keep at the end of structure) */
+       char name[0];                   /* device name (keep at the end of
+                                                               structure) */
 };
 
 typedef struct _snd_minor snd_minor_t;
@@ -287,11 +290,12 @@ void snd_memory_init(void);
 void snd_memory_done(void);
 int snd_memory_info_init(void);
 int snd_memory_info_done(void);
-void *snd_hidden_kmalloc(size_t size, int flags);
-void *snd_hidden_kcalloc(size_t n, size_t size, int flags);
+void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags);
+void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags);
 void snd_hidden_kfree(const void *obj);
 void *snd_hidden_vmalloc(unsigned long size);
 void snd_hidden_vfree(void *obj);
+char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags);
 #define kmalloc(size, flags) snd_hidden_kmalloc(size, flags)
 #define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags)
 #define kfree(obj) snd_hidden_kfree(obj)
@@ -301,6 +305,7 @@ void snd_hidden_vfree(void *obj);
 #define vmalloc_nocheck(size) snd_wrapper_vmalloc(size)
 #define kfree_nocheck(obj) snd_wrapper_kfree(obj)
 #define vfree_nocheck(obj) snd_wrapper_vfree(obj)
+#define kstrdup(s, flags)  snd_hidden_kstrdup(s, flags)
 #else
 #define snd_memory_init() /*NOP*/
 #define snd_memory_done() /*NOP*/
@@ -311,7 +316,6 @@ void snd_hidden_vfree(void *obj);
 #define kfree_nocheck(obj) kfree(obj)
 #define vfree_nocheck(obj) vfree(obj)
 #endif
-char *snd_kmalloc_strdup(const char *string, int flags);
 int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count);
 int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count);
 
@@ -410,7 +414,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
        printk(fmt ,##args)
 #endif
 /**
- * snd_assert - run-time assersion macro
+ * snd_assert - run-time assertion macro
  * @expr: expression
  * @args...: the action
  *
@@ -426,7 +430,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
        }\
 } while (0)
 /**
- * snd_runtime_check - run-time assersion macro
+ * snd_runtime_check - run-time assertion macro
  * @expr: expression
  * @args...: the action
  *