Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148338
b: refs/heads/master
c: 1a1df6f
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Takashi Iwai committed Jun 2, 2009
1 parent f554a21 commit 48c9fc7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3873a1be9f2d497e9ff013e4a83a2a4d9f1d22d
refs/heads/master: 1a1df6f0434fc35c9bf6ca25f9c5115713d77291
25 changes: 6 additions & 19 deletions trunk/sound/usb/caiaq/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ static int create_card(struct usb_device* usb_dev, struct snd_card **cardp)

static int __devinit init_card(struct snd_usb_caiaqdev *dev)
{
char *c;
char usbpath[32];
struct usb_device *usb_dev = dev->chip.dev;
struct snd_card *card = dev->chip.card;
int err, len;
int err;

if (usb_set_interface(usb_dev, 0, 1) != 0) {
log("can't set alt interface.\n");
Expand Down Expand Up @@ -424,27 +424,14 @@ static int __devinit init_card(struct snd_usb_caiaqdev *dev)
usb_string(usb_dev, usb_dev->descriptor.iProduct,
dev->product_name, CAIAQ_USB_STR_LEN);

usb_string(usb_dev, usb_dev->descriptor.iSerialNumber,
dev->serial, CAIAQ_USB_STR_LEN);

/* terminate serial string at first white space occurence */
c = strchr(dev->serial, ' ');
if (c)
*c = '\0';

strlcpy(card->driver, MODNAME, sizeof(card->driver));
strlcpy(card->shortname, dev->product_name, sizeof(card->shortname));

len = snprintf(card->longname, sizeof(card->longname),
"%s %s (serial %s, ",
dev->vendor_name, dev->product_name, dev->serial);

if (len < sizeof(card->longname) - 2)
len += usb_make_path(usb_dev, card->longname + len,
sizeof(card->longname) - len);
usb_make_path(usb_dev, usbpath, sizeof(usbpath));
snprintf(card->longname, sizeof(card->longname),
"%s %s (%s)",
dev->vendor_name, dev->product_name, usbpath);

card->longname[len++] = ')';
card->longname[len] = '\0';
setup_card(dev);
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/usb/caiaq/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ struct snd_usb_caiaqdev {

char vendor_name[CAIAQ_USB_STR_LEN];
char product_name[CAIAQ_USB_STR_LEN];
char serial[CAIAQ_USB_STR_LEN];

int n_streams, n_audio_in, n_audio_out;
int streaming, first_packet, output_running;
Expand Down

0 comments on commit 48c9fc7

Please sign in to comment.