From: Takashi Iwai <tiwai@suse.de>
To: pavel.hofman@ivitera.com
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH - ice1724 3/4] ALSA: ice1724 - Allow card info based on model only
Date: Sun, 08 Jan 2012 14:33:06 +0100 [thread overview]
Message-ID: <s5hy5til3ot.wl%tiwai@suse.de> (raw)
In-Reply-To: <1325797318-16333-3-git-send-email-pavel.hofman@ivitera.com>
At Thu, 5 Jan 2012 22:01:57 +0100,
pavel.hofman@ivitera.com wrote:
>
> From: Pavel Hofman <pavel.hofman@ivitera.com>
>
> When two different cards share the same PCI vendor/subvendor
> identification, allow card info based on model only.
> Do not require subvendor ID.
>
> Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
>
> diff --git a/pci/ice1712/ice1724.c b/pci/ice1712/ice1724.c
> index a671377..8c473b1 100644
> --- a/pci/ice1712/ice1724.c
> +++ b/pci/ice1712/ice1724.c
> @@ -2279,7 +2279,7 @@ static int __devinit snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
> }
> }
> for (tbl = card_tables; *tbl; tbl++) {
> - for (c = *tbl; c->subvendor; c++) {
> + for (c = *tbl; c->model; c++) {
This should be also
> + for (c = *tbl; c->name; c++) {
like below. It's a loop for all entries after all.
> if (modelname && c->model &&
> !strcmp(modelname, c->model)) {
> printk(KERN_INFO "ice1724: Using board model %s\n",
> @@ -2588,8 +2588,10 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci,
> ice->ext_clock_count = 0;
>
> for (tbl = card_tables; *tbl; tbl++) {
> - for (c = *tbl; c->subvendor; c++) {
> - if (c->subvendor == ice->eeprom.subvendor) {
> + for (c = *tbl; c->name; c++) {
> + if ((model[dev] && c->model &&
> + !strcmp(model[dev], c->model)) ||
> + (c->subvendor == ice->eeprom.subvendor)) {
If possible, try to indent like indent or Emacs do, i.e. aligning with
parentheses level. It'll make a bit easier to read in this case.
thanks,
Takashi
> strcpy(card->shortname, c->name);
> if (c->driver) /* specific driver? */
> strcpy(card->driver, c->driver);
> --
> 1.7.0.4
>
next prev parent reply other threads:[~2012-01-08 13:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 21:01 [PATCH - ice1724 1/4] ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations pavel.hofman
2012-01-05 21:01 ` [PATCH - ice1724 2/4] ALSA: ice1724 - External clock item only for cards with SPDIF_IN pavel.hofman
2012-01-08 13:33 ` Takashi Iwai
2012-01-05 21:01 ` [PATCH - ice1724 3/4] ALSA: ice1724 - Allow card info based on model only pavel.hofman
2012-01-08 13:33 ` Takashi Iwai [this message]
2012-01-05 21:01 ` [PATCH - ice1724 4/4] ALSA: ice1724 - Support for ooAoo SQ210a pavel.hofman
2012-01-08 9:13 ` Takashi Iwai
2012-01-09 8:32 ` Pavel Hofman
2012-01-09 9:24 ` Clemens Ladisch
2012-01-09 9:59 ` Pavel Hofman
2012-01-08 9:12 ` [PATCH - ice1724 1/4] ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations Takashi Iwai
2012-01-09 7:36 ` Pavel Hofman
2012-01-09 9:27 ` Takashi Iwai
2012-01-09 9:48 ` Pavel Hofman
2012-01-09 9:51 ` Takashi Iwai
2012-01-09 9:53 ` Pavel Hofman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hy5til3ot.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=pavel.hofman@ivitera.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).