aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-07-02 04:46:35 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-02 04:58:33 -0400
commit563c2bf59d392357bcc1d99642933cc88c687964 (patch)
treeaeaf25749dad3a5e4b1f2a905858c6074ae438c9 /sound
parent28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff)
ALSA: snd_usb_caiaq: reparent sound device
The sound device instance needs to be a child of the USB interface, not the USB device. Newer udev versions pay attention to that. Signed-off-by: Daniel Mack <daniel@caiaq.de> Reported-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/caiaq/device.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
index 0e5db719de24..de38108f0b28 100644
--- a/sound/usb/caiaq/device.c
+++ b/sound/usb/caiaq/device.c
@@ -35,7 +35,7 @@
35#include "input.h" 35#include "input.h"
36 36
37MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); 37MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
38MODULE_DESCRIPTION("caiaq USB audio, version 1.3.17"); 38MODULE_DESCRIPTION("caiaq USB audio, version 1.3.18");
39MODULE_LICENSE("GPL"); 39MODULE_LICENSE("GPL");
40MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," 40MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2},"
41 "{Native Instruments, RigKontrol3}," 41 "{Native Instruments, RigKontrol3},"
@@ -349,7 +349,9 @@ static void __devinit setup_card(struct snd_usb_caiaqdev *dev)
349 log("Unable to set up control system (ret=%d)\n", ret); 349 log("Unable to set up control system (ret=%d)\n", ret);
350} 350}
351 351
352static int create_card(struct usb_device* usb_dev, struct snd_card **cardp) 352static int create_card(struct usb_device *usb_dev,
353 struct usb_interface *intf,
354 struct snd_card **cardp)
353{ 355{
354 int devnum; 356 int devnum;
355 int err; 357 int err;
@@ -374,7 +376,7 @@ static int create_card(struct usb_device* usb_dev, struct snd_card **cardp)
374 dev->chip.usb_id = USB_ID(le16_to_cpu(usb_dev->descriptor.idVendor), 376 dev->chip.usb_id = USB_ID(le16_to_cpu(usb_dev->descriptor.idVendor),
375 le16_to_cpu(usb_dev->descriptor.idProduct)); 377 le16_to_cpu(usb_dev->descriptor.idProduct));
376 spin_lock_init(&dev->spinlock); 378 spin_lock_init(&dev->spinlock);
377 snd_card_set_dev(card, &usb_dev->dev); 379 snd_card_set_dev(card, &intf->dev);
378 380
379 *cardp = card; 381 *cardp = card;
380 return 0; 382 return 0;
@@ -461,7 +463,7 @@ static int __devinit snd_probe(struct usb_interface *intf,
461 struct snd_card *card; 463 struct snd_card *card;
462 struct usb_device *device = interface_to_usbdev(intf); 464 struct usb_device *device = interface_to_usbdev(intf);
463 465
464 ret = create_card(device, &card); 466 ret = create_card(device, intf, &card);
465 467
466 if (ret < 0) 468 if (ret < 0)
467 return ret; 469 return ret;