Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0ef6ce7b6acddc3dc9e898125b3bada98a21130a
Commit:     0ef6ce7b6acddc3dc9e898125b3bada98a21130a
Parent:     ca7cfae9eb91c012ac448dc6816ded6285f6f39a
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 22 15:35:37 2008 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Thu Jan 31 17:30:10 2008 +0100

    [ALSA] hda-codec - Optimize snd_hda_pser_pin_def_config()
    
    Don't read the widget list again as we already have it at the beginning.
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/hda_codec.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index d4fd948..f6a9a5d 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2671,8 +2671,7 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
                                 struct auto_pin_cfg *cfg,
                                 hda_nid_t *ignore_nids)
 {
-       hda_nid_t nid, nid_start;
-       int nodes;
+       hda_nid_t nid, end_nid;
        short seq, assoc_line_out, assoc_speaker;
        short sequences_line_out[ARRAY_SIZE(cfg->line_out_pins)];
        short sequences_speaker[ARRAY_SIZE(cfg->speaker_pins)];
@@ -2685,8 +2684,8 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
        memset(sequences_hp, 0, sizeof(sequences_hp));
        assoc_line_out = assoc_speaker = 0;
 
-       nodes = snd_hda_get_sub_nodes(codec, codec->afg, &nid_start);
-       for (nid = nid_start; nid < nodes + nid_start; nid++) {
+       end_nid = codec->start_nid + codec->num_nodes;
+       for (nid = codec->start_nid; nid < end_nid; nid++) {
                unsigned int wid_caps = get_wcaps(codec, nid);
                unsigned int wid_type =
                        (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to