aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2014-11-03 05:34:12 -0500
committerTakashi Iwai <tiwai@suse.de>2014-11-03 08:02:33 -0500
commite369086968157415aeb11af3b57cd998c6721603 (patch)
treeaae8b6c975e92c2f30fe05a00433e6b9368eccb6
parent4c41421657a3760056976fd517e7e6b3615febb3 (diff)
ALSA: echoaudio: add reference of struct echoaudio
added reference of struct echoaudio to free_firmware function. this structure will be later used to get a reference of the card when converting snd_printk to dev_* in the next patch of the series. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/echoaudio/echoaudio.c3
-rw-r--r--sound/pci/echoaudio/echoaudio.h3
-rw-r--r--sound/pci/echoaudio/echoaudio_dsp.c10
3 files changed, 9 insertions, 7 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index d82321ff549b..db1b247d8587 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -69,7 +69,8 @@ static int get_firmware(const struct firmware **fw_entry,
69 69
70 70
71 71
72static void free_firmware(const struct firmware *fw_entry) 72static void free_firmware(const struct firmware *fw_entry,
73 struct echoaudio *chip)
73{ 74{
74#ifdef CONFIG_PM_SLEEP 75#ifdef CONFIG_PM_SLEEP
75 DE_ACT(("firmware not released (kept in cache)\n")); 76 DE_ACT(("firmware not released (kept in cache)\n"));
diff --git a/sound/pci/echoaudio/echoaudio.h b/sound/pci/echoaudio/echoaudio.h
index b86b88da81cd..a4f112aa78e2 100644
--- a/sound/pci/echoaudio/echoaudio.h
+++ b/sound/pci/echoaudio/echoaudio.h
@@ -468,7 +468,8 @@ static int wait_handshake(struct echoaudio *chip);
468static int send_vector(struct echoaudio *chip, u32 command); 468static int send_vector(struct echoaudio *chip, u32 command);
469static int get_firmware(const struct firmware **fw_entry, 469static int get_firmware(const struct firmware **fw_entry,
470 struct echoaudio *chip, const short fw_index); 470 struct echoaudio *chip, const short fw_index);
471static void free_firmware(const struct firmware *fw_entry); 471static void free_firmware(const struct firmware *fw_entry,
472 struct echoaudio *chip);
472 473
473#ifdef ECHOCARD_HAS_MIDI 474#ifdef ECHOCARD_HAS_MIDI
474static int enable_midi_input(struct echoaudio *chip, char enable); 475static int enable_midi_input(struct echoaudio *chip, char enable);
diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c
index 5a6a217b82e0..977b2bd2e72f 100644
--- a/sound/pci/echoaudio/echoaudio_dsp.c
+++ b/sound/pci/echoaudio/echoaudio_dsp.c
@@ -206,12 +206,12 @@ static int load_asic_generic(struct echoaudio *chip, u32 cmd, short asic)
206 } 206 }
207 207
208 DE_INIT(("ASIC loaded\n")); 208 DE_INIT(("ASIC loaded\n"));
209 free_firmware(fw); 209 free_firmware(fw, chip);
210 return 0; 210 return 0;
211 211
212la_error: 212la_error:
213 DE_INIT(("failed on write_dsp\n")); 213 DE_INIT(("failed on write_dsp\n"));
214 free_firmware(fw); 214 free_firmware(fw, chip);
215 return -EIO; 215 return -EIO;
216} 216}
217 217
@@ -317,11 +317,11 @@ static int install_resident_loader(struct echoaudio *chip)
317 } 317 }
318 318
319 DE_INIT(("Resident loader successfully installed\n")); 319 DE_INIT(("Resident loader successfully installed\n"));
320 free_firmware(fw); 320 free_firmware(fw, chip);
321 return 0; 321 return 0;
322 322
323irl_error: 323irl_error:
324 free_firmware(fw); 324 free_firmware(fw, chip);
325 return -EIO; 325 return -EIO;
326} 326}
327 327
@@ -491,7 +491,7 @@ static int load_firmware(struct echoaudio *chip)
491 if (err < 0) 491 if (err < 0)
492 return err; 492 return err;
493 err = load_dsp(chip, (u16 *)fw->data); 493 err = load_dsp(chip, (u16 *)fw->data);
494 free_firmware(fw); 494 free_firmware(fw, chip);
495 if (err < 0) 495 if (err < 0)
496 return err; 496 return err;
497 497