patch-2.4.19 linux-2.4.19/drivers/usb/audio.c
Next file: linux-2.4.19/drivers/usb/auerswald.c
Previous file: linux-2.4.19/drivers/usb/Makefile
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/usb/audio.c
- Orig date:
Mon Feb 25 11:38:07 2002
diff -urN linux-2.4.18/drivers/usb/audio.c linux-2.4.19/drivers/usb/audio.c
@@ -399,7 +399,7 @@
/* prevent picking up a bogus abs macro */
#undef abs
-extern inline int abs(int x)
+static inline int abs(int x)
{
if (x < 0)
return -x;
@@ -408,7 +408,7 @@
/* --------------------------------------------------------------------- */
-extern inline unsigned ld2(unsigned int x)
+static inline unsigned ld2(unsigned int x)
{
unsigned r = 0;
@@ -1931,13 +1931,13 @@
kfree(s);
}
-extern inline int prog_dmabuf_in(struct usb_audiodev *as)
+static inline int prog_dmabuf_in(struct usb_audiodev *as)
{
usbin_stop(as);
return dmabuf_init(&as->usbin.dma);
}
-extern inline int prog_dmabuf_out(struct usb_audiodev *as)
+static inline int prog_dmabuf_out(struct usb_audiodev *as)
{
usbout_stop(as);
return dmabuf_init(&as->usbout.dma);
@@ -2536,7 +2536,7 @@
if (as->usbin.dma.mapped)
as->usbin.dma.count &= as->usbin.dma.fragsize-1;
spin_unlock_irqrestore(&as->lock, flags);
- return copy_to_user((void *)arg, &cinfo, sizeof(cinfo));
+ return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0;
case SNDCTL_DSP_GETOPTR:
if (!(file->f_mode & FMODE_WRITE))
@@ -2548,7 +2548,7 @@
if (as->usbout.dma.mapped)
as->usbout.dma.count &= as->usbout.dma.fragsize-1;
spin_unlock_irqrestore(&as->lock, flags);
- return copy_to_user((void *)arg, &cinfo, sizeof(cinfo));
+ return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0;
case SNDCTL_DSP_GETBLKSIZE:
if (file->f_mode & FMODE_WRITE) {
@@ -3207,7 +3207,7 @@
static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unitid);
-extern inline int checkmixbmap(unsigned char *bmap, unsigned char flg, unsigned int inidx, unsigned int numoch)
+static inline int checkmixbmap(unsigned char *bmap, unsigned char flg, unsigned int inidx, unsigned int numoch)
{
unsigned int idx;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)