[ALSA] Remove superfluous pcm_free callbacks
[powerpc.git] / sound / isa / ad1816a / ad1816a_lib.c
index ae86036..170409e 100644 (file)
@@ -542,10 +542,7 @@ static int snd_ad1816a_probe(ad1816a_t *chip)
 
 static int snd_ad1816a_free(ad1816a_t *chip)
 {
-       if (chip->res_port) {
-               release_resource(chip->res_port);
-               kfree_nocheck(chip->res_port);
-       }
+       release_and_free_resource(chip->res_port);
        if (chip->irq >= 0)
                free_irq(chip->irq, (void *) chip);
        if (chip->dma1 >= 0) {
@@ -591,7 +588,7 @@ int snd_ad1816a_create(snd_card_t *card,
 
        *rchip = NULL;
 
-       chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
+       chip = kzalloc(sizeof(*chip), GFP_KERNEL);
        if (chip == NULL)
                return -ENOMEM;
        chip->irq = -1;
@@ -665,13 +662,6 @@ static snd_pcm_ops_t snd_ad1816a_capture_ops = {
        .pointer =      snd_ad1816a_capture_pointer,
 };
 
-static void snd_ad1816a_pcm_free(snd_pcm_t *pcm)
-{
-       ad1816a_t *chip = pcm->private_data;
-       chip->pcm = NULL;
-       snd_pcm_lib_preallocate_free_for_all(pcm);
-}
-
 int snd_ad1816a_pcm(ad1816a_t *chip, int device, snd_pcm_t **rpcm)
 {
        int error;
@@ -684,7 +674,6 @@ int snd_ad1816a_pcm(ad1816a_t *chip, int device, snd_pcm_t **rpcm)
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ad1816a_capture_ops);
 
        pcm->private_data = chip;
-       pcm->private_free = snd_ad1816a_pcm_free;
        pcm->info_flags = (chip->dma1 == chip->dma2 ) ? SNDRV_PCM_INFO_JOINT_DUPLEX : 0;
 
        strcpy(pcm->name, snd_ad1816a_chip_id(chip));