Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8bdfacb authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'fix/misc' into topic/misc

parents add7c0a6 a7a13d06
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -829,6 +829,8 @@ static int snd_rawmidi_control_ioctl(struct snd_card *card,
		
		
		if (get_user(device, (int __user *)argp))
		if (get_user(device, (int __user *)argp))
			return -EFAULT;
			return -EFAULT;
		if (device >= SNDRV_RAWMIDI_DEVICES) /* next device is -1 */
			device = SNDRV_RAWMIDI_DEVICES - 1;
		mutex_lock(&register_mutex);
		mutex_lock(&register_mutex);
		device = device < 0 ? 0 : device + 1;
		device = device < 0 ? 0 : device + 1;
		while (device < SNDRV_RAWMIDI_DEVICES) {
		while (device < SNDRV_RAWMIDI_DEVICES) {
+4 −5
Original line number Original line Diff line number Diff line
@@ -281,13 +281,10 @@ snd_seq_oss_open(struct file *file, int level)
	return 0;
	return 0;


 _error:
 _error:
	snd_seq_oss_writeq_delete(dp->writeq);
	snd_seq_oss_readq_delete(dp->readq);
	snd_seq_oss_synth_cleanup(dp);
	snd_seq_oss_synth_cleanup(dp);
	snd_seq_oss_midi_cleanup(dp);
	snd_seq_oss_midi_cleanup(dp);
	delete_port(dp);
	delete_seq_queue(dp->queue);
	delete_seq_queue(dp->queue);
	kfree(dp);
	delete_port(dp);


	return rc;
	return rc;
}
}
@@ -350,8 +347,10 @@ create_port(struct seq_oss_devinfo *dp)
static int
static int
delete_port(struct seq_oss_devinfo *dp)
delete_port(struct seq_oss_devinfo *dp)
{
{
	if (dp->port < 0)
	if (dp->port < 0) {
		kfree(dp);
		return 0;
		return 0;
	}


	debug_printk(("delete_port %i\n", dp->port));
	debug_printk(("delete_port %i\n", dp->port));
	return snd_seq_event_port_detach(dp->cseq, dp->port);
	return snd_seq_event_port_detach(dp->cseq, dp->port);
+6 −2
Original line number Original line Diff line number Diff line
@@ -764,9 +764,9 @@ static long io[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
static long mem[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
static long mem[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;


#ifndef MSND_CLASSIC
static long cfg[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
static long cfg[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;


#ifndef MSND_CLASSIC
/* Extra Peripheral Configuration (Default: Disable) */
/* Extra Peripheral Configuration (Default: Disable) */
static long ide_io0[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
static long ide_io0[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
static long ide_io1[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
static long ide_io1[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
@@ -894,7 +894,11 @@ static int __devinit snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
	struct snd_card *card;
	struct snd_card *card;
	struct snd_msnd *chip;
	struct snd_msnd *chip;


	if (has_isapnp(idx) || cfg[idx] == SNDRV_AUTO_PORT) {
	if (has_isapnp(idx)
#ifndef MSND_CLASSIC
	    || cfg[idx] == SNDRV_AUTO_PORT
#endif
	    ) {
		printk(KERN_INFO LOGNAME ": Assuming PnP mode\n");
		printk(KERN_INFO LOGNAME ": Assuming PnP mode\n");
		return -ENODEV;
		return -ENODEV;
	}
	}
+1 −0
Original line number Original line Diff line number Diff line
@@ -155,6 +155,7 @@ void oxygen_pci_remove(struct pci_dev *pci);
int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state);
int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state);
int oxygen_pci_resume(struct pci_dev *pci);
int oxygen_pci_resume(struct pci_dev *pci);
#endif
#endif
void oxygen_pci_shutdown(struct pci_dev *pci);


/* oxygen_mixer.c */
/* oxygen_mixer.c */


+18 −3
Original line number Original line Diff line number Diff line
@@ -519,16 +519,21 @@ static void oxygen_init(struct oxygen *chip)
	}
	}
}
}


static void oxygen_card_free(struct snd_card *card)
static void oxygen_shutdown(struct oxygen *chip)
{
{
	struct oxygen *chip = card->private_data;

	spin_lock_irq(&chip->reg_lock);
	spin_lock_irq(&chip->reg_lock);
	chip->interrupt_mask = 0;
	chip->interrupt_mask = 0;
	chip->pcm_running = 0;
	chip->pcm_running = 0;
	oxygen_write16(chip, OXYGEN_DMA_STATUS, 0);
	oxygen_write16(chip, OXYGEN_DMA_STATUS, 0);
	oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0);
	oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0);
	spin_unlock_irq(&chip->reg_lock);
	spin_unlock_irq(&chip->reg_lock);
}

static void oxygen_card_free(struct snd_card *card)
{
	struct oxygen *chip = card->private_data;

	oxygen_shutdown(chip);
	if (chip->irq >= 0)
	if (chip->irq >= 0)
		free_irq(chip->irq, chip);
		free_irq(chip->irq, chip);
	flush_scheduled_work();
	flush_scheduled_work();
@@ -778,3 +783,13 @@ int oxygen_pci_resume(struct pci_dev *pci)
}
}
EXPORT_SYMBOL(oxygen_pci_resume);
EXPORT_SYMBOL(oxygen_pci_resume);
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */

void oxygen_pci_shutdown(struct pci_dev *pci)
{
	struct snd_card *card = pci_get_drvdata(pci);
	struct oxygen *chip = card->private_data;

	oxygen_shutdown(chip);
	chip->model.cleanup(chip);
}
EXPORT_SYMBOL(oxygen_pci_shutdown);
Loading