Commit 77c9a7be authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Fix compilation errors

Digigram VX core,MIXART driver
Fix compilation errors when built without hotplug fw loader.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a7c9c7df
...@@ -137,7 +137,7 @@ static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info) ...@@ -137,7 +137,7 @@ static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
return 0; return 0;
} }
static void free_fw(struct firmware *fw) static void free_fw(const struct firmware *fw)
{ {
if (fw) { if (fw) {
vfree(fw->data); vfree(fw->data);
...@@ -180,7 +180,7 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) ...@@ -180,7 +180,7 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
return err; return err;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
chip->firmware[index] = fw; vx->firmware[index] = fw;
#else #else
free_fw(fw); free_fw(fw);
#endif #endif
......
...@@ -525,8 +525,6 @@ static int mixart_dsp_load(mixart_mgr_t* mgr, int index, const struct firmware * ...@@ -525,8 +525,6 @@ static int mixart_dsp_load(mixart_mgr_t* mgr, int index, const struct firmware *
#ifdef SND_MIXART_FW_LOADER #ifdef SND_MIXART_FW_LOADER
#include <linux/firmware.h>
int snd_mixart_setup_firmware(mixart_mgr_t *mgr) int snd_mixart_setup_firmware(mixart_mgr_t *mgr)
{ {
static char *fw_files[3] = { static char *fw_files[3] = {
...@@ -588,19 +586,19 @@ static int mixart_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) ...@@ -588,19 +586,19 @@ static int mixart_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
struct firmware fw; struct firmware fw;
int err; int err;
fw->size = dsp->length; fw.size = dsp->length;
fw->data = vmalloc(dsp->length); fw.data = vmalloc(dsp->length);
if (! fw->data) { if (! fw.data) {
snd_printk(KERN_ERR "miXart: cannot allocate image size %d\n", snd_printk(KERN_ERR "miXart: cannot allocate image size %d\n",
(int)dsp->length); (int)dsp->length);
return -ENOMEM; return -ENOMEM;
} }
if (copy_from_user(fw->data, dsp->image, dsp->length)) { if (copy_from_user(fw.data, dsp->image, dsp->length)) {
vfree(fw->data); vfree(fw.data);
return -EFAULT; return -EFAULT;
} }
err = mixart_dsp_load(mgr, dsp->index, &fw); err = mixart_dsp_load(mgr, dsp->index, &fw);
vfree(fw->data); vfree(fw.data);
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