From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: usb audio callback questions. Date: Mon, 07 Jul 2003 12:26:39 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <3F082270.8030605@superbug.demon.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <3F082270.8030605@superbug.demon.co.uk> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: James Courtier-Dutton Cc: alsa-devel List-Id: alsa-devel@alsa-project.org At Sun, 06 Jul 2003 14:21:52 +0100, James Courtier-Dutton wrote: > > 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 > { > > usb_complete_t complete; // pointer to completion routine > > }; > > 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