--- zzzz-none-000/linux-3.10.107/sound/isa/cmi8328.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/isa/cmi8328.c 2021-02-04 17:41:59.000000000 +0000 @@ -126,6 +126,7 @@ outb(val, port + 3); /* yes, value goes to the same port as index */ } +#ifdef CONFIG_PM static void snd_cmi8328_cfg_save(u16 port, u8 cfg[]) { cfg[0] = snd_cmi8328_cfg_read(port, CFG1); @@ -139,6 +140,7 @@ snd_cmi8328_cfg_write(port, CFG2, cfg[1]); snd_cmi8328_cfg_write(port, CFG3, cfg[2]); } +#endif /* CONFIG_PM */ static int snd_cmi8328_mixer(struct snd_wss *chip) { @@ -291,22 +293,21 @@ } outb(val, port); - err = snd_card_create(index[ndev], id[ndev], THIS_MODULE, - sizeof(struct snd_cmi8328), &card); + err = snd_card_new(pdev, index[ndev], id[ndev], THIS_MODULE, + sizeof(struct snd_cmi8328), &card); if (err < 0) return err; cmi = card->private_data; cmi->card = card; cmi->port = port; cmi->wss_cfg = val; - snd_card_set_dev(card, pdev); err = snd_wss_create(card, port + 4, -1, irq[ndev], dma1[ndev], dma2[ndev], WSS_HW_DETECT, 0, &cmi->wss); if (err < 0) goto error; - err = snd_wss_pcm(cmi->wss, 0, NULL); + err = snd_wss_pcm(cmi->wss, 0); if (err < 0) goto error; @@ -317,7 +318,7 @@ if (err < 0) goto error; - if (snd_wss_timer(cmi->wss, 0, NULL) < 0) + if (snd_wss_timer(cmi->wss, 0) < 0) snd_printk(KERN_WARNING "error initializing WSS timer\n"); if (mpuport[ndev] == SNDRV_AUTO_PORT) { @@ -418,7 +419,6 @@ snd_cmi8328_cfg_write(cmi->port, CFG2, 0); snd_cmi8328_cfg_write(cmi->port, CFG3, 0); snd_card_free(card); - dev_set_drvdata(pdev, NULL); return 0; }