@@ -126,25 +126,26 @@ struct snd_monitor_file {
126126 struct snd_monitor_file * next ;
127127};
128128
129- struct snd_shutdown_f_ops ; /* define it later */
129+ struct snd_shutdown_f_ops ; /* define it later in init.c */
130130
131131/* main structure for soundcard */
132132
133133struct _snd_card {
134- int number ; /* number of soundcard (index to snd_cards) */
134+ int number ; /* number of soundcard (index to
135+ snd_cards) */
135136
136137 char id [16 ]; /* id string of this card */
137138 char driver [16 ]; /* driver name */
138139 char shortname [32 ]; /* short name of this soundcard */
139140 char longname [80 ]; /* name of this soundcard */
140141 char mixername [80 ]; /* mixer name */
141- char components [80 ]; /* card components delimited with space */
142-
142+ char components [80 ]; /* card components delimited with
143+ space */
143144 struct module * module ; /* top-level module */
144145
145146 void * private_data ; /* private data for soundcard */
146- void (* private_free ) (snd_card_t * card ); /* callback for freeing of private data */
147-
147+ void (* private_free ) (snd_card_t * card ); /* callback for freeing of
148+ private data */
148149 struct list_head devices ; /* devices */
149150
150151 unsigned int last_numid ; /* last used numeric ID */
@@ -160,7 +161,8 @@ struct _snd_card {
160161 struct proc_dir_entry * proc_root_link ; /* number link to real id */
161162
162163 struct snd_monitor_file * files ; /* all files associated to this card */
163- struct snd_shutdown_f_ops * s_f_ops ; /* file operations in the shutdown state */
164+ struct snd_shutdown_f_ops * s_f_ops ; /* file operations in the shutdown
165+ state */
164166 spinlock_t files_lock ; /* lock the files for this card */
165167 int shutdown ; /* this card is going down */
166168 wait_queue_head_t shutdown_sleep ;
@@ -196,8 +198,6 @@ static inline void snd_power_unlock(snd_card_t *card)
196198 up (& card -> power_lock );
197199}
198200
199- int snd_power_wait (snd_card_t * card , unsigned int power_state , struct file * file );
200-
201201static inline unsigned int snd_power_get_state (snd_card_t * card )
202202{
203203 return card -> power_state ;
@@ -208,6 +208,10 @@ static inline void snd_power_change_state(snd_card_t *card, unsigned int state)
208208 card -> power_state = state ;
209209 wake_up (& card -> power_sleep );
210210}
211+
212+ /* init.c */
213+ int snd_power_wait (snd_card_t * card , unsigned int power_state , struct file * file );
214+
211215int snd_card_set_pm_callback (snd_card_t * card ,
212216 int (* suspend )(snd_card_t * , pm_message_t ),
213217 int (* resume )(snd_card_t * ),
@@ -238,15 +242,14 @@ static inline int snd_power_wait(snd_card_t *card, unsigned int state, struct fi
238242
239243#endif /* CONFIG_PM */
240244
241- /* device.c */
242-
243245struct _snd_minor {
244246 struct list_head list ; /* list of all minors per card */
245247 int number ; /* minor number */
246248 int device ; /* device number */
247249 const char * comment ; /* for /proc/asound/devices */
248250 struct file_operations * f_ops ; /* file operations */
249- char name [0 ]; /* device name (keep at the end of structure) */
251+ char name [0 ]; /* device name (keep at the end of
252+ structure) */
250253};
251254
252255typedef struct _snd_minor snd_minor_t ;
@@ -287,12 +290,12 @@ void snd_memory_init(void);
287290void snd_memory_done (void );
288291int snd_memory_info_init (void );
289292int snd_memory_info_done (void );
290- void * snd_hidden_kmalloc (size_t size , int flags );
291- void * snd_hidden_kcalloc (size_t n , size_t size , int flags );
293+ void * snd_hidden_kmalloc (size_t size , unsigned int __nocast flags );
294+ void * snd_hidden_kcalloc (size_t n , size_t size , unsigned int __nocast flags );
292295void snd_hidden_kfree (const void * obj );
293296void * snd_hidden_vmalloc (unsigned long size );
294297void snd_hidden_vfree (void * obj );
295- char * snd_hidden_kstrdup (const char * s , int flags );
298+ char * snd_hidden_kstrdup (const char * s , unsigned int __nocast flags );
296299#define kmalloc (size , flags ) snd_hidden_kmalloc(size, flags)
297300#define kcalloc (n , size , flags ) snd_hidden_kcalloc(n, size, flags)
298301#define kfree (obj ) snd_hidden_kfree(obj)
@@ -411,7 +414,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
411414 printk(fmt ,##args)
412415#endif
413416/**
414- * snd_assert - run-time assersion macro
417+ * snd_assert - run-time assertion macro
415418 * @expr: expression
416419 * @args...: the action
417420 *
@@ -427,7 +430,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
427430 }\
428431} while (0)
429432/**
430- * snd_runtime_check - run-time assersion macro
433+ * snd_runtime_check - run-time assertion macro
431434 * @expr: expression
432435 * @args...: the action
433436 *
0 commit comments