diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-25 08:15:31 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-25 08:15:31 -0500 |
commit | 52e04ea89da57274f0313d2bd73ba02f686cfdeb (patch) | |
tree | 6ce5d086bcaea4cb534b3fcf6ba736eb48d582a4 /drivers/usb/gadget/u_audio.c | |
parent | 41116e926cb92292fa4fcbe888ae8133fa0038e6 (diff) | |
parent | 8b90ca08821fee79e181bfcbc3bbd41ef5637136 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/usb/gadget/u_audio.c')
-rw-r--r-- | drivers/usb/gadget/u_audio.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/usb/gadget/u_audio.c b/drivers/usb/gadget/u_audio.c index 8252595d619d..35e0930f5bbb 100644 --- a/drivers/usb/gadget/u_audio.c +++ b/drivers/usb/gadget/u_audio.c | |||
@@ -288,6 +288,7 @@ static int gaudio_close_snd_dev(struct gaudio *gau) | |||
288 | return 0; | 288 | return 0; |
289 | } | 289 | } |
290 | 290 | ||
291 | static struct gaudio *the_card; | ||
291 | /** | 292 | /** |
292 | * gaudio_setup - setup ALSA interface and preparing for USB transfer | 293 | * gaudio_setup - setup ALSA interface and preparing for USB transfer |
293 | * | 294 | * |
@@ -303,6 +304,9 @@ int __init gaudio_setup(struct gaudio *card) | |||
303 | if (ret) | 304 | if (ret) |
304 | ERROR(card, "we need at least one control device\n"); | 305 | ERROR(card, "we need at least one control device\n"); |
305 | 306 | ||
307 | if (!the_card) | ||
308 | the_card = card; | ||
309 | |||
306 | return ret; | 310 | return ret; |
307 | 311 | ||
308 | } | 312 | } |
@@ -312,9 +316,11 @@ int __init gaudio_setup(struct gaudio *card) | |||
312 | * | 316 | * |
313 | * This is called to free all resources allocated by @gaudio_setup(). | 317 | * This is called to free all resources allocated by @gaudio_setup(). |
314 | */ | 318 | */ |
315 | void gaudio_cleanup(struct gaudio *card) | 319 | void gaudio_cleanup(void) |
316 | { | 320 | { |
317 | if (card) | 321 | if (the_card) { |
318 | gaudio_close_snd_dev(card); | 322 | gaudio_close_snd_dev(the_card); |
323 | the_card = NULL; | ||
324 | } | ||
319 | } | 325 | } |
320 | 326 | ||