cs4231.c (e3ee1e123183ca9847e74b7b8e2694c9e3b817a6) cs4231.c (bd7dd77c2a05c530684eea2e3af16449ae9c5d52)
1/*
2 * Driver for CS4231 sound chips found on Sparcs.
3 * Copyright (C) 2002, 2008 David S. Miller <davem@davemloft.net>
4 *
5 * Based entirely upon drivers/sbus/audio/cs4231.c which is:
6 * Copyright (C) 1996, 1997, 1998 Derrick J Brashear (shadow@andrew.cmu.edu)
7 * and also sound/isa/cs423x/cs4231_lib.c which is:
8 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>

--- 1549 unchanged lines hidden (view full) ---

1558}
1559
1560static int dev;
1561
1562static int __init cs4231_attach_begin(struct snd_card **rcard)
1563{
1564 struct snd_card *card;
1565 struct snd_cs4231 *chip;
1/*
2 * Driver for CS4231 sound chips found on Sparcs.
3 * Copyright (C) 2002, 2008 David S. Miller <davem@davemloft.net>
4 *
5 * Based entirely upon drivers/sbus/audio/cs4231.c which is:
6 * Copyright (C) 1996, 1997, 1998 Derrick J Brashear (shadow@andrew.cmu.edu)
7 * and also sound/isa/cs423x/cs4231_lib.c which is:
8 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>

--- 1549 unchanged lines hidden (view full) ---

1558}
1559
1560static int dev;
1561
1562static int __init cs4231_attach_begin(struct snd_card **rcard)
1563{
1564 struct snd_card *card;
1565 struct snd_cs4231 *chip;
1566 int err;
1566
1567 *rcard = NULL;
1568
1569 if (dev >= SNDRV_CARDS)
1570 return -ENODEV;
1571
1572 if (!enable[dev]) {
1573 dev++;
1574 return -ENOENT;
1575 }
1576
1567
1568 *rcard = NULL;
1569
1570 if (dev >= SNDRV_CARDS)
1571 return -ENODEV;
1572
1573 if (!enable[dev]) {
1574 dev++;
1575 return -ENOENT;
1576 }
1577
1577 card = snd_card_new(index[dev], id[dev], THIS_MODULE,
1578 sizeof(struct snd_cs4231));
1579 if (card == NULL)
1580 return -ENOMEM;
1578 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
1579 sizeof(struct snd_cs4231), &card);
1580 if (err < 0)
1581 return err;
1581
1582 strcpy(card->driver, "CS4231");
1583 strcpy(card->shortname, "Sun CS4231");
1584
1585 chip = card->private_data;
1586 chip->card = card;
1587
1588 *rcard = card;

--- 541 unchanged lines hidden ---
1582
1583 strcpy(card->driver, "CS4231");
1584 strcpy(card->shortname, "Sun CS4231");
1585
1586 chip = card->private_data;
1587 chip->card = card;
1588
1589 *rcard = card;

--- 541 unchanged lines hidden ---