diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-07-02 11:48:32 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-07-02 11:48:32 -0400 |
commit | cfbc78003e2b12e60a1d594ce192c30aea44eb2a (patch) | |
tree | 03c650f0f144f81b21a93b5278daa36dc2cc6c50 /sound | |
parent | dc8a4f3fc3c32954c9fd46cb027b959380be2d65 (diff) | |
parent | 3f5d3465be8f6e04f43d9b6d543fe28d4be07d78 (diff) |
Merge branch 'fix/caiaq' into for-linus
* fix/caiaq:
ALSA: usx2y - reparent sound device
ALSA: snd_usb_caiaq: reparent sound device
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/caiaq/device.c | 10 | ||||
-rw-r--r-- | sound/usb/usx2y/us122l.c | 2 | ||||
-rw-r--r-- | sound/usb/usx2y/usbusx2y.c | 2 |
3 files changed, 8 insertions, 6 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 | ||
37 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); | 37 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
38 | MODULE_DESCRIPTION("caiaq USB audio, version 1.3.17"); | 38 | MODULE_DESCRIPTION("caiaq USB audio, version 1.3.18"); |
39 | MODULE_LICENSE("GPL"); | 39 | MODULE_LICENSE("GPL"); |
40 | MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," | 40 | MODULE_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 | ||
352 | static int create_card(struct usb_device* usb_dev, struct snd_card **cardp) | 352 | static 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; |
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index a5aae9d67f31..fd44946ce4b3 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c | |||
@@ -514,7 +514,6 @@ static int usx2y_create_card(struct usb_device *device, struct snd_card **cardp) | |||
514 | US122L(card)->chip.dev->bus->busnum, | 514 | US122L(card)->chip.dev->bus->busnum, |
515 | US122L(card)->chip.dev->devnum | 515 | US122L(card)->chip.dev->devnum |
516 | ); | 516 | ); |
517 | snd_card_set_dev(card, &device->dev); | ||
518 | *cardp = card; | 517 | *cardp = card; |
519 | return 0; | 518 | return 0; |
520 | } | 519 | } |
@@ -531,6 +530,7 @@ static int us122l_usb_probe(struct usb_interface *intf, | |||
531 | if (err < 0) | 530 | if (err < 0) |
532 | return err; | 531 | return err; |
533 | 532 | ||
533 | snd_card_set_dev(card, &intf->dev); | ||
534 | if (!us122l_create_card(card)) { | 534 | if (!us122l_create_card(card)) { |
535 | snd_card_free(card); | 535 | snd_card_free(card); |
536 | return -EINVAL; | 536 | return -EINVAL; |
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index 5ce0da23ee96..cb4bb8373ca2 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c | |||
@@ -364,7 +364,6 @@ static int usX2Y_create_card(struct usb_device *device, struct snd_card **cardp) | |||
364 | 0,//us428(card)->usbmidi.ifnum, | 364 | 0,//us428(card)->usbmidi.ifnum, |
365 | usX2Y(card)->chip.dev->bus->busnum, usX2Y(card)->chip.dev->devnum | 365 | usX2Y(card)->chip.dev->bus->busnum, usX2Y(card)->chip.dev->devnum |
366 | ); | 366 | ); |
367 | snd_card_set_dev(card, &device->dev); | ||
368 | *cardp = card; | 367 | *cardp = card; |
369 | return 0; | 368 | return 0; |
370 | } | 369 | } |
@@ -388,6 +387,7 @@ static int usX2Y_usb_probe(struct usb_device *device, | |||
388 | err = usX2Y_create_card(device, &card); | 387 | err = usX2Y_create_card(device, &card); |
389 | if (err < 0) | 388 | if (err < 0) |
390 | return err; | 389 | return err; |
390 | snd_card_set_dev(card, &intf->dev); | ||
391 | if ((err = usX2Y_hwdep_new(card, device)) < 0 || | 391 | if ((err = usX2Y_hwdep_new(card, device)) < 0 || |
392 | (err = snd_card_register(card)) < 0) { | 392 | (err = snd_card_register(card)) < 0) { |
393 | snd_card_free(card); | 393 | snd_card_free(card); |