Skip to contentSkip to conversation

usb audio callback questions.

DISCUSSION James Courtier-Dutton 2 participants 2 messages Jul 6, 2003 – Jul 7, 2003

lore
Share & tools
lore
#0 lore raw

I have a question regarding the callbacks in the usbaudio.c driver. The callback is defined as: -

/*
* complete callback from data urb
*/
static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)

The callback is set up with: -
u->urb->complete = snd_usb_complete_callback(snd_complete_urb);

The issue I have is that urb->complete is of type: - struct urb;
typedef void (*usb_complete_t)(struct urb *);

struct urb
{
<snip>
usb_complete_t complete; // pointer to completion routine
<snip>
};

So, why is the "struct pt_regs *regs" there ?
I would think that
static void snd_complete_urb(struct urb *urb, struct pt_regs *regs) should change to
static void snd_complete_urb(struct urb *urb)

Cheers
James

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01

#1 lore raw

At Sun, 06 Jul 2003 14:21:52 +0100,

Quoted 24 lines · James Courtier-Dutton

I have a question regarding the callbacks in the usbaudio.c driver. The callback is defined as: -

/*
* complete callback from data urb
*/
static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)

The callback is set up with: -
u->urb->complete = snd_usb_complete_callback(snd_complete_urb);

The issue I have is that urb->complete is of type: - struct urb;
typedef void (*usb_complete_t)(struct urb *);

struct urb
{
<snip>
usb_complete_t complete; // pointer to completion routine
<snip>
};

Quoted 5 lines

So, why is the "struct pt_regs *regs" there ?
I would think that
static void snd_complete_urb(struct urb *urb, struct pt_regs *regs) should change to
static void snd_complete_urb(struct urb *urb)

the second argument is added in the 2.5 USB-driver stack. we have a (rather complex) wrapper for that, to compile the same source both for 2.4 and 2.5 (even 2.2) kernels.
yeah, it needs more clean up...

Takashi

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01