Skip to content

Commit

Permalink
ALSA: usx2y - reparent sound device
Browse files Browse the repository at this point in the history
Fix the parent device to be the USB interface, not the USB device.
A similiar commit like 563c2bf.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jul 2, 2009
1 parent 563c2bf commit 3f5d346
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sound/usb/usx2y/us122l.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,6 @@ static int usx2y_create_card(struct usb_device *device, struct snd_card **cardp)
US122L(card)->chip.dev->bus->busnum,
US122L(card)->chip.dev->devnum
);
snd_card_set_dev(card, &device->dev);
*cardp = card;
return 0;
}
Expand All @@ -531,6 +530,7 @@ static int us122l_usb_probe(struct usb_interface *intf,
if (err < 0)
return err;

snd_card_set_dev(card, &intf->dev);
if (!us122l_create_card(card)) {
snd_card_free(card);
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion sound/usb/usx2y/usbusx2y.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ static int usX2Y_create_card(struct usb_device *device, struct snd_card **cardp)
0,//us428(card)->usbmidi.ifnum,
usX2Y(card)->chip.dev->bus->busnum, usX2Y(card)->chip.dev->devnum
);
snd_card_set_dev(card, &device->dev);
*cardp = card;
return 0;
}
Expand All @@ -388,6 +387,7 @@ static int usX2Y_usb_probe(struct usb_device *device,
err = usX2Y_create_card(device, &card);
if (err < 0)
return err;
snd_card_set_dev(card, &intf->dev);
if ((err = usX2Y_hwdep_new(card, device)) < 0 ||
(err = snd_card_register(card)) < 0) {
snd_card_free(card);
Expand Down

0 comments on commit 3f5d346

Please sign in to comment.