ALSA: echoaudio: add reference of struct echoaudio
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 3 Nov 2014 10:34:12 +0000 (16:04 +0530)
committerTakashi Iwai <tiwai@suse.de>
Mon, 3 Nov 2014 13:02:33 +0000 (14:02 +0100)
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>
sound/pci/echoaudio/echoaudio.c
sound/pci/echoaudio/echoaudio.h
sound/pci/echoaudio/echoaudio_dsp.c

index d82321ff549b2ba1f35664c24f11858b23c40931..db1b247d85872dc61e08a89db364b54fccc08337 100644 (file)
@@ -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
        DE_ACT(("firmware not released (kept in cache)\n"));
index b86b88da81cd92eb793610c6802ba12c2c13b277..a4f112aa78e22f8cc2494f2f7b5b302cf9dbecdb 100644 (file)
@@ -468,7 +468,8 @@ static int wait_handshake(struct echoaudio *chip);
 static int send_vector(struct echoaudio *chip, u32 command);
 static int get_firmware(const struct firmware **fw_entry,
                        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
 static int enable_midi_input(struct echoaudio *chip, char enable);
index 5a6a217b82e0ae47cd43607a9908663530a1bf1d..977b2bd2e72f0159bc1be3451e604a43d8a235c6 100644 (file)
@@ -206,12 +206,12 @@ static int load_asic_generic(struct echoaudio *chip, u32 cmd, short asic)
        }
 
        DE_INIT(("ASIC loaded\n"));
-       free_firmware(fw);
+       free_firmware(fw, chip);
        return 0;
 
 la_error:
        DE_INIT(("failed on write_dsp\n"));
-       free_firmware(fw);
+       free_firmware(fw, chip);
        return -EIO;
 }
 
@@ -317,11 +317,11 @@ static int install_resident_loader(struct echoaudio *chip)
        }
 
        DE_INIT(("Resident loader successfully installed\n"));
-       free_firmware(fw);
+       free_firmware(fw, chip);
        return 0;
 
 irl_error:
-       free_firmware(fw);
+       free_firmware(fw, chip);
        return -EIO;
 }
 
@@ -491,7 +491,7 @@ static int load_firmware(struct echoaudio *chip)
        if (err < 0)
                return err;
        err = load_dsp(chip, (u16 *)fw->data);
-       free_firmware(fw);
+       free_firmware(fw, chip);
        if (err < 0)
                return err;
 
This page took 0.030578 seconds and 5 git commands to generate.