diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-06-17 08:33:14 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-06-17 08:33:14 +0000 |
commit | 92b5b247fbc13b9f808689b759c908bf90cd9586 (patch) | |
tree | 843888744a0a0513d2a5cb8e2ba1fd014d1e8249 /usb.c | |
parent | cde33da8c3a8406988caa1075ba22aea9a80ac76 (diff) | |
download | ldetect-92b5b247fbc13b9f808689b759c908bf90cd9586.tar ldetect-92b5b247fbc13b9f808689b759c908bf90cd9586.tar.gz ldetect-92b5b247fbc13b9f808689b759c908bf90cd9586.tar.bz2 ldetect-92b5b247fbc13b9f808689b759c908bf90cd9586.tar.xz ldetect-92b5b247fbc13b9f808689b759c908bf90cd9586.zip |
(usb_probe) ask the kernel for module to use with usb devices
Diffstat (limited to 'usb.c')
-rw-r--r-- | usb.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -58,9 +58,12 @@ extern struct pciusb_entries usb_probe(void) { break; } case 'I': if (e->class_ == 0) { + char driver[50]; int class_, sub, prot = 0; - if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%02x Prot=%02x", &class_, &sub, &prot) == 3) { + if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%02x Prot=%02x Driver=%s", &class_, &sub, &prot, driver) == 4) { e->class_ = (class_ * 0x100 + sub) * 0x100 + prot; + if (strncmp(driver, "(none)", 6)) + e->module = strdup(driver); /* see linux/sound/usb/usbaudio.c::usb_audio_ids */ if (e->class_ == (0x1*0x100+ 0x01)) /* USB_AUDIO_CLASS*0x100 + USB_SUBCLASS_AUDIO_CONTROL*/ e->module = "snd-usb-audio"; |