--- zzzz-none-000/linux-3.10.107/sound/spi/at73c213.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/spi/at73c213.c 2021-02-04 17:41:59.000000000 +0000 @@ -174,7 +174,7 @@ dac_rate_new = 8 * (ssc_rate / ssc_div); status = clk_round_rate(chip->board->dac_clk, dac_rate_new); - if (status < 0) + if (status <= 0) return status; /* Ignore difference smaller than 256 Hz. */ @@ -927,8 +927,6 @@ if (retval) goto out_snd_dev; - snd_card_set_dev(card, &spi->dev); - goto out; out_snd_dev: @@ -966,8 +964,8 @@ /* Allocate "card" using some unused identifiers. */ snprintf(id, sizeof id, "at73c213_%d", board->ssc_id); - retval = snd_card_create(-1, id, THIS_MODULE, - sizeof(struct snd_at73c213), &card); + retval = snd_card_new(&spi->dev, -1, id, THIS_MODULE, + sizeof(struct snd_at73c213), &card); if (retval < 0) goto out; @@ -1070,7 +1068,6 @@ ssc_free(chip->ssc); snd_card_free(card); - dev_set_drvdata(&spi->dev, NULL); return 0; }