]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ALSA: usb-audio: Use setup_timer() and mod_timer()
authorTakashi Iwai <tiwai@suse.de>
Mon, 19 Jan 2015 10:43:50 +0000 (11:43 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 19 Jan 2015 10:43:50 +0000 (11:43 +0100)
No functional change, refactoring with the standard helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/midi.c

index 5bfb695547f832e22c8ad80042bf382292460e64..417ebb11cf4896b8009c0aa86c7dab71c34d61a4 100644 (file)
@@ -2292,14 +2292,13 @@ int snd_usbmidi_create(struct snd_card *card,
        umidi->iface = iface;
        umidi->quirk = quirk;
        umidi->usb_protocol_ops = &snd_usbmidi_standard_ops;
-       init_timer(&umidi->error_timer);
        spin_lock_init(&umidi->disc_lock);
        init_rwsem(&umidi->disc_rwsem);
        mutex_init(&umidi->mutex);
        umidi->usb_id = USB_ID(le16_to_cpu(umidi->dev->descriptor.idVendor),
                               le16_to_cpu(umidi->dev->descriptor.idProduct));
-       umidi->error_timer.function = snd_usbmidi_error_timer;
-       umidi->error_timer.data = (unsigned long)umidi;
+       setup_timer(&umidi->error_timer, snd_usbmidi_error_timer,
+                   (unsigned long)umidi);
 
        /* detect the endpoint(s) to use */
        memset(endpoints, 0, sizeof(endpoints));