[ALSA] usb-audio: remove old compatibility wrappers (2/2)

Modules: USB generic driver

Move the usb_complete_callback() compatibility wrapper out of the
kernel tree.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
Clemens Ladisch 2005-09-26 10:03:09 +02:00 committed by Jaroslav Kysela
parent 3cfc1eb181
commit 3527a008cb
3 changed files with 8 additions and 14 deletions

View File

@ -1044,7 +1044,7 @@ static int init_substream_urbs(snd_usb_substream_t *subs, unsigned int period_by
u->urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; u->urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
u->urb->interval = 1 << subs->datainterval; u->urb->interval = 1 << subs->datainterval;
u->urb->context = u; u->urb->context = u;
u->urb->complete = snd_usb_complete_callback(snd_complete_urb); u->urb->complete = snd_complete_urb;
} }
if (subs->syncpipe) { if (subs->syncpipe) {
@ -1070,7 +1070,7 @@ static int init_substream_urbs(snd_usb_substream_t *subs, unsigned int period_by
u->urb->number_of_packets = 1; u->urb->number_of_packets = 1;
u->urb->interval = 1 << subs->syncinterval; u->urb->interval = 1 << subs->syncinterval;
u->urb->context = u; u->urb->context = u;
u->urb->complete = snd_usb_complete_callback(snd_complete_sync_urb); u->urb->complete = snd_complete_sync_urb;
} }
} }
return 0; return 0;

View File

@ -249,10 +249,6 @@ void snd_usbmidi_disconnect(struct list_head *p);
#define get_cfg_desc(cfg) (&(cfg)->desc) #define get_cfg_desc(cfg) (&(cfg)->desc)
#endif #endif
#ifndef snd_usb_complete_callback
#define snd_usb_complete_callback(x) (x)
#endif
#ifndef snd_usb_get_speed #ifndef snd_usb_get_speed
#define snd_usb_get_speed(dev) ((dev)->speed) #define snd_usb_get_speed(dev) ((dev)->speed)
#endif #endif

View File

@ -861,13 +861,12 @@ static int snd_usbmidi_in_endpoint_create(snd_usb_midi_t* umidi,
return -ENOMEM; return -ENOMEM;
} }
if (ep_info->in_interval) if (ep_info->in_interval)
usb_fill_int_urb(ep->urb, umidi->chip->dev, pipe, buffer, length, usb_fill_int_urb(ep->urb, umidi->chip->dev, pipe, buffer,
snd_usb_complete_callback(snd_usbmidi_in_urb_complete), length, snd_usbmidi_in_urb_complete, ep,
ep, ep_info->in_interval); ep_info->in_interval);
else else
usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer, length, usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer,
snd_usb_complete_callback(snd_usbmidi_in_urb_complete), length, snd_usbmidi_in_urb_complete, ep);
ep);
ep->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP; ep->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
rep->in = ep; rep->in = ep;
@ -931,8 +930,7 @@ static int snd_usbmidi_out_endpoint_create(snd_usb_midi_t* umidi,
return -ENOMEM; return -ENOMEM;
} }
usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer, usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer,
ep->max_transfer, ep->max_transfer, snd_usbmidi_out_urb_complete, ep);
snd_usb_complete_callback(snd_usbmidi_out_urb_complete), ep);
ep->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP; ep->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
spin_lock_init(&ep->buffer_lock); spin_lock_init(&ep->buffer_lock);