ALSA: drivers: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Este cometimento está contido em:

cometido por
Takashi Iwai

ascendente
1a01901575
cometimento
bc47ba90b0
@@ -406,10 +406,10 @@ static void snd_mtpav_input_trigger(struct snd_rawmidi_substream *substream, int
|
||||
* timer interrupt for outputs
|
||||
*/
|
||||
|
||||
static void snd_mtpav_output_timer(unsigned long data)
|
||||
static void snd_mtpav_output_timer(struct timer_list *t)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct mtpav *chip = (struct mtpav *)data;
|
||||
struct mtpav *chip = from_timer(chip, t, timer);
|
||||
int p;
|
||||
|
||||
spin_lock_irqsave(&chip->spinlock, flags);
|
||||
@@ -707,8 +707,7 @@ static int snd_mtpav_probe(struct platform_device *dev)
|
||||
mtp_card->share_irq = 0;
|
||||
mtp_card->inmidistate = 0;
|
||||
mtp_card->outmidihwport = 0xffffffff;
|
||||
setup_timer(&mtp_card->timer, snd_mtpav_output_timer,
|
||||
(unsigned long) mtp_card);
|
||||
timer_setup(&mtp_card->timer, snd_mtpav_output_timer, 0);
|
||||
|
||||
card->private_free = snd_mtpav_free;
|
||||
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador