Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[pandora-kernel.git] / sound / drivers / vx / vx_hwdep.c
index c4993b0..efd22e9 100644 (file)
@@ -20,7 +20,6 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <sound/driver.h>
 #include <linux/device.h>
 #include <linux/firmware.h>
 #include <linux/vmalloc.h>
 
 #ifdef SND_VX_FW_LOADER
 
-int snd_vx_setup_firmware(vx_core_t *chip)
+MODULE_FIRMWARE("vx/bx_1_vxp.b56");
+MODULE_FIRMWARE("vx/bx_1_vp4.b56");
+MODULE_FIRMWARE("vx/x1_1_vx2.xlx");
+MODULE_FIRMWARE("vx/x1_2_v22.xlx");
+MODULE_FIRMWARE("vx/x1_1_vxp.xlx");
+MODULE_FIRMWARE("vx/x1_1_vp4.xlx");
+MODULE_FIRMWARE("vx/bd56002.boot");
+MODULE_FIRMWARE("vx/bd563v2.boot");
+MODULE_FIRMWARE("vx/bd563s3.boot");
+MODULE_FIRMWARE("vx/l_1_vx2.d56");
+MODULE_FIRMWARE("vx/l_1_v22.d56");
+MODULE_FIRMWARE("vx/l_1_vxp.d56");
+MODULE_FIRMWARE("vx/l_1_vp4.d56");
+
+int snd_vx_setup_firmware(struct vx_core *chip)
 {
        static char *fw_files[VX_TYPE_NUMS][4] = {
                [VX_TYPE_BOARD] = {
@@ -95,7 +108,7 @@ int snd_vx_setup_firmware(vx_core_t *chip)
 }
 
 /* exported */
-void snd_vx_free_firmware(vx_core_t *chip)
+void snd_vx_free_firmware(struct vx_core *chip)
 {
 #ifdef CONFIG_PM
        int i;
@@ -106,17 +119,18 @@ void snd_vx_free_firmware(vx_core_t *chip)
 
 #else /* old style firmware loading */
 
-static int vx_hwdep_open(snd_hwdep_t *hw, struct file *file)
+static int vx_hwdep_open(struct snd_hwdep *hw, struct file *file)
 {
        return 0;
 }
 
-static int vx_hwdep_release(snd_hwdep_t *hw, struct file *file)
+static int vx_hwdep_release(struct snd_hwdep *hw, struct file *file)
 {
        return 0;
 }
 
-static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
+static int vx_hwdep_dsp_status(struct snd_hwdep *hw,
+                              struct snd_hwdep_dsp_status *info)
 {
        static char *type_ids[VX_TYPE_NUMS] = {
                [VX_TYPE_BOARD] = "vxboard",
@@ -125,7 +139,7 @@ static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
                [VX_TYPE_VXPOCKET] = "vxpocket",
                [VX_TYPE_VXP440] = "vxp440",
        };
-       vx_core_t *vx = hw->private_data;
+       struct vx_core *vx = hw->private_data;
 
        snd_assert(type_ids[vx->type], return -EINVAL);
        strcpy(info->id, type_ids[vx->type]);
@@ -147,9 +161,10 @@ static void free_fw(const struct firmware *fw)
        }
 }
 
-static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
+static int vx_hwdep_dsp_load(struct snd_hwdep *hw,
+                            struct snd_hwdep_dsp_image *dsp)
 {
-       vx_core_t *vx = hw->private_data;
+       struct vx_core *vx = hw->private_data;
        int index, err;
        struct firmware *fw;
 
@@ -168,7 +183,7 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
                kfree(fw);
                return -ENOMEM;
        }
-       if (copy_from_user(fw->data, dsp->image, dsp->length)) {
+       if (copy_from_user((void *)fw->data, dsp->image, dsp->length)) {
                free_fw(fw);
                return -EFAULT;
        }
@@ -216,10 +231,10 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
 
 
 /* exported */
-int snd_vx_setup_firmware(vx_core_t *chip)
+int snd_vx_setup_firmware(struct vx_core *chip)
 {
        int err;
-       snd_hwdep_t *hw;
+       struct snd_hwdep *hw;
 
        if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0)
                return err;
@@ -238,7 +253,7 @@ int snd_vx_setup_firmware(vx_core_t *chip)
 }
 
 /* exported */
-void snd_vx_free_firmware(vx_core_t *chip)
+void snd_vx_free_firmware(struct vx_core *chip)
 {
 #ifdef CONFIG_PM
        int i;
@@ -248,3 +263,6 @@ void snd_vx_free_firmware(vx_core_t *chip)
 }
 
 #endif /* SND_VX_FW_LOADER */
+
+EXPORT_SYMBOL(snd_vx_setup_firmware);
+EXPORT_SYMBOL(snd_vx_free_firmware);