ALSA: vx_core: Drop unused dev field
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Aug 2024 13:34:00 +0000 (15:34 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 8 Aug 2024 05:47:23 +0000 (07:47 +0200)
The vx_core.dev field has never been set but referred incorrectly at
firmware loading.  Pass the proper device pointer from card->dev at
request_firmware(), and drop the unused dev field from vx_core, too.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240807133452.9424-11-tiwai@suse.de
include/sound/vx_core.h
sound/drivers/vx/vx_hwdep.c

index 1ddd3036bdfc75bfd83a28fb5ddd0b40ae1bd517..ca87fa6a8135489f3cbead61efd597cd5afc0613 100644 (file)
@@ -155,7 +155,6 @@ struct vx_core {
        unsigned int chip_status;
        unsigned int pcm_running;
 
-       struct device *dev;
        struct snd_hwdep *hwdep;
 
        struct vx_rmh irq_rmh;  /* RMH used in interrupts */
index efbb644edba1f8b9c3f19b8d432bb93ca5c28e8f..74f7ab330c7fb967f5576832d77b1b708d9f61d2 100644 (file)
@@ -58,7 +58,7 @@ int snd_vx_setup_firmware(struct vx_core *chip)
                if (! fw_files[chip->type][i])
                        continue;
                sprintf(path, "vx/%s", fw_files[chip->type][i]);
-               if (request_firmware(&fw, path, chip->dev)) {
+               if (request_firmware(&fw, path, chip->card->dev)) {
                        snd_printk(KERN_ERR "vx: can't load firmware %s\n", path);
                        return -ENOENT;
                }