Commit c3e6f7d8 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[ALSA] Remove superfluous pcm_free callbacks



Remove superflous pcm_free callbacks.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f31a31b9
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -662,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;
@@ -681,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));
+0 −8
Original line number Diff line number Diff line
@@ -959,13 +959,6 @@ static snd_pcm_ops_t snd_ad1848_capture_ops = {
	.pointer =	snd_ad1848_capture_pointer,
};

static void snd_ad1848_pcm_free(snd_pcm_t *pcm)
{
	ad1848_t *chip = pcm->private_data;
	chip->pcm = NULL;
	snd_pcm_lib_preallocate_free_for_all(pcm);
}

int snd_ad1848_pcm(ad1848_t *chip, int device, snd_pcm_t **rpcm)
{
	snd_pcm_t *pcm;
@@ -977,7 +970,6 @@ int snd_ad1848_pcm(ad1848_t *chip, int device, snd_pcm_t **rpcm)
	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ad1848_playback_ops);
	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ad1848_capture_ops);

	pcm->private_free = snd_ad1848_pcm_free;
	pcm->private_data = chip;
	pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX;
	strcpy(pcm->name, snd_ad1848_chip_id(chip));
+0 −6
Original line number Diff line number Diff line
@@ -388,11 +388,6 @@ static int snd_cmi8330_capture_open(snd_pcm_substream_t * substream)
	return chip->streams[SNDRV_PCM_STREAM_CAPTURE].open(substream);
}

static void snd_cmi8330_pcm_free(snd_pcm_t *pcm)
{
	snd_pcm_lib_preallocate_free_for_all(pcm);
}

static int __devinit snd_cmi8330_pcm(snd_card_t *card, struct snd_cmi8330 *chip)
{
	snd_pcm_t *pcm;
@@ -407,7 +402,6 @@ static int __devinit snd_cmi8330_pcm(snd_card_t *card, struct snd_cmi8330 *chip)
		return err;
	strcpy(pcm->name, "CMI8330");
	pcm->private_data = chip;
	pcm->private_free = snd_cmi8330_pcm_free;
	
	/* SB16 */
	ops = snd_sb16dsp_get_pcm_ops(CMI_SB_STREAM);
+0 −8
Original line number Diff line number Diff line
@@ -1605,13 +1605,6 @@ static snd_pcm_ops_t snd_cs4231_capture_ops = {
	.pointer =	snd_cs4231_capture_pointer,
};

static void snd_cs4231_pcm_free(snd_pcm_t *pcm)
{
	cs4231_t *chip = pcm->private_data;
	chip->pcm = NULL;
	snd_pcm_lib_preallocate_free_for_all(pcm);
}

int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
{
	snd_pcm_t *pcm;
@@ -1629,7 +1622,6 @@ int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
	
	/* global setup */
	pcm->private_data = chip;
	pcm->private_free = snd_cs4231_pcm_free;
	pcm->info_flags = 0;
	if (chip->single_dma)
		pcm->info_flags |= SNDRV_PCM_INFO_HALF_DUPLEX;
+0 −8
Original line number Diff line number Diff line
@@ -724,13 +724,6 @@ static snd_pcm_ops_t snd_es1688_capture_ops = {
	.pointer =		snd_es1688_capture_pointer,
};

static void snd_es1688_pcm_free(snd_pcm_t *pcm)
{
	es1688_t *chip = pcm->private_data;
	chip->pcm = NULL;
	snd_pcm_lib_preallocate_free_for_all(pcm);
}

int snd_es1688_pcm(es1688_t * chip, int device, snd_pcm_t ** rpcm)
{
	snd_pcm_t *pcm;
@@ -743,7 +736,6 @@ int snd_es1688_pcm(es1688_t * chip, int device, snd_pcm_t ** rpcm)
	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_es1688_capture_ops);

	pcm->private_data = chip;
	pcm->private_free = snd_es1688_pcm_free;
	pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX;
	sprintf(pcm->name, snd_es1688_chip_id(chip));
	chip->pcm = pcm;
Loading