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

[ALSA] Fix invalid schedule_timeout_interruptible()



Fixed the invalid use of schedule_timeout_interruptible() without
checking pending signals.  Simply replaced with schedule_timeout().
Suggestions thanks to Jeff Garzik.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent c12aad6e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list_ptr)
			spin_lock_irqsave(&list->lock, flags);
			while (instr->use) {
				spin_unlock_irqrestore(&list->lock, flags);
				schedule_timeout_interruptible(1);
				schedule_timeout(1);
				spin_lock_irqsave(&list->lock, flags);
			}				
			spin_unlock_irqrestore(&list->lock, flags);
@@ -199,7 +199,7 @@ int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
			instr = flist;
			flist = instr->next;
			while (instr->use)
				schedule_timeout_interruptible(1);
				schedule_timeout(1);
			if (snd_seq_instr_free(instr, atomic)<0)
				snd_printk(KERN_WARNING "instrument free problem\n");
			instr = next;
@@ -555,7 +555,7 @@ static int instr_free(struct snd_seq_kinstr_ops *ops,
					   SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
		while (instr->use) {
			spin_unlock_irqrestore(&list->lock, flags);
			schedule_timeout_interruptible(1);
			schedule_timeout(1);
			spin_lock_irqsave(&list->lock, flags);
		}				
		spin_unlock_irqrestore(&list->lock, flags);
+2 −2
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
			snd_printk(KERN_ERR "mce_down - auto calibration time out (2)\n");
			return;
		}
		time = schedule_timeout_interruptible(time);
		time = schedule_timeout(time);
		spin_lock_irqsave(&chip->reg_lock, flags);
	}
#if 0
@@ -258,7 +258,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
			snd_printk(KERN_ERR "mce_down - auto calibration time out (3)\n");
			return;
		}
		time = schedule_timeout_interruptible(time);
		time = schedule_timeout(time);
		spin_lock_irqsave(&chip->reg_lock, flags);
	}
	spin_unlock_irqrestore(&chip->reg_lock, flags);
+2 −2
Original line number Diff line number Diff line
@@ -382,7 +382,7 @@ static int obp_startup_ack(struct soundscape *s, unsigned timeout)
		unsigned long flags;
		unsigned char x;

		schedule_timeout_interruptible(1);
		schedule_timeout(1);

		spin_lock_irqsave(&s->lock, flags);
		x = inb(HOST_DATA_IO(s->io_base));
@@ -409,7 +409,7 @@ static int host_startup_ack(struct soundscape *s, unsigned timeout)
		unsigned long flags;
		unsigned char x;

		schedule_timeout_interruptible(1);
		schedule_timeout(1);

		spin_lock_irqsave(&s->lock, flags);
		x = inb(HOST_DATA_IO(s->io_base));
+1 −1
Original line number Diff line number Diff line
@@ -1780,7 +1780,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev,
	outb (val,port);
	spin_unlock_irq(&dev->irq_lock);
	while (1) {
		if ((timeout = schedule_timeout_interruptible(timeout)) == 0)
		if ((timeout = schedule_timeout(timeout)) == 0)
			return;
		if (dev->irq_ok)
			return;
+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec)
		}
		if (! chip->rirb.cmds)
			return chip->rirb.res; /* the last value */
		schedule_timeout_interruptible(1);
		schedule_timeout(1);
	} while (time_after_eq(timeout, jiffies));

	if (chip->msi) {
Loading