Commit e3690869 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Takashi Iwai

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: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4c414216
...@@ -69,7 +69,8 @@ static int get_firmware(const struct firmware **fw_entry, ...@@ -69,7 +69,8 @@ static int get_firmware(const struct firmware **fw_entry,
static void free_firmware(const struct firmware *fw_entry) static void free_firmware(const struct firmware *fw_entry,
struct echoaudio *chip)
{ {
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
DE_ACT(("firmware not released (kept in cache)\n")); DE_ACT(("firmware not released (kept in cache)\n"));
......
...@@ -468,7 +468,8 @@ static int wait_handshake(struct echoaudio *chip); ...@@ -468,7 +468,8 @@ static int wait_handshake(struct echoaudio *chip);
static int send_vector(struct echoaudio *chip, u32 command); static int send_vector(struct echoaudio *chip, u32 command);
static int get_firmware(const struct firmware **fw_entry, static int get_firmware(const struct firmware **fw_entry,
struct echoaudio *chip, const short fw_index); struct echoaudio *chip, const short fw_index);
static void free_firmware(const struct firmware *fw_entry); static void free_firmware(const struct firmware *fw_entry,
struct echoaudio *chip);
#ifdef ECHOCARD_HAS_MIDI #ifdef ECHOCARD_HAS_MIDI
static int enable_midi_input(struct echoaudio *chip, char enable); static int enable_midi_input(struct echoaudio *chip, char enable);
......
...@@ -206,12 +206,12 @@ static int load_asic_generic(struct echoaudio *chip, u32 cmd, short asic) ...@@ -206,12 +206,12 @@ static int load_asic_generic(struct echoaudio *chip, u32 cmd, short asic)
} }
DE_INIT(("ASIC loaded\n")); DE_INIT(("ASIC loaded\n"));
free_firmware(fw); free_firmware(fw, chip);
return 0; return 0;
la_error: la_error:
DE_INIT(("failed on write_dsp\n")); DE_INIT(("failed on write_dsp\n"));
free_firmware(fw); free_firmware(fw, chip);
return -EIO; return -EIO;
} }
...@@ -317,11 +317,11 @@ static int install_resident_loader(struct echoaudio *chip) ...@@ -317,11 +317,11 @@ static int install_resident_loader(struct echoaudio *chip)
} }
DE_INIT(("Resident loader successfully installed\n")); DE_INIT(("Resident loader successfully installed\n"));
free_firmware(fw); free_firmware(fw, chip);
return 0; return 0;
irl_error: irl_error:
free_firmware(fw); free_firmware(fw, chip);
return -EIO; return -EIO;
} }
...@@ -491,7 +491,7 @@ static int load_firmware(struct echoaudio *chip) ...@@ -491,7 +491,7 @@ static int load_firmware(struct echoaudio *chip)
if (err < 0) if (err < 0)
return err; return err;
err = load_dsp(chip, (u16 *)fw->data); err = load_dsp(chip, (u16 *)fw->data);
free_firmware(fw); free_firmware(fw, chip);
if (err < 0) if (err < 0)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment