fix usb-* compiler warnings
PATCH 1/1 fix usb-* compiler warnings
The compiler complains that usbaudio.c doesn't use snd_enable[]. Let's make it happy ...
When using modversions, usb_alloc_urb()/_submit_urb()/_set_interface() are defined as macros. #undef'ing them in wrapper.h before redefining them doesn't hurt in the case they aren't macros.
Clemens
Index: usb/usbaudio.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/usb/usbaudio.c,v retrieving revision 1.15
usbaudio.c +1 -1
@@ -1961,7 +1961,7 @@* now look for an empty slot and create a new card instance */ for (i =0 ; i <SNDRV_CARDS ; i++) -if (! usb_chip[i]) { +if (snd_enable[i] && ! usb_chip[i]) { card =snd_card_new (snd_index[i], snd_id[i],THIS_MODULE ,0 );if (card ==NULL ) {snd_printk (KERN_ERR "cannot create a card instance %d\n" , i);
Index: usb/wrapper.h
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/usb/wrapper.h,v retrieving revision 1.2
wrapper.h +3 -0
@@ -10,6 +10,8 @@ {return usb_submit_urb (urb); } +#undef usb_alloc_urb +#undef usb_submit_urb#define usb_alloc_urb (n,flags) usb_alloc_urb_wrapper(n,flags)#define usb_submit_urb (p,flags) usb_submit_urb_wrapper(p,flags)#endif /* LINUX_VERSION_CODE < 2.5.0 */
@@ -82,6 +84,7 @@ return 0; } +#undef usb_set_interface#define usb_set_interface (dev,iface,alt) hack_usb_set_interface(dev,iface,alt)#endif /* LINUX_VERSION < 2.5.24 */
At Mon, 08 Jul 2002 10:19:36 +0200,
Quoted 7 lines · Clemens Ladisch
The compiler complains that
usbaudio.cdoesn't use snd_enable[]. Let's make it happy ...When using modversions, usb_alloc_urb()/_submit_urb()/_set_interface() are defined as macros. #undef'ing them in
wrapper.hbefore redefining them doesn't hurt in the case they aren't macros.
thanks. applied.
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf