Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2549413ea6c17c94e42ab14611e487d96c787578
Commit:     2549413ea6c17c94e42ab14611e487d96c787578
Parent:     e9024ccc2d54a71dfac583ede6082e265264d871
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 12 12:36:16 2007 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Fri May 11 16:55:48 2007 +0200

    [ALSA] hda-codec - Code clean up of patch_sigmatel.c
    
    - Remove superfluous array member in stac9205_dmic_nids[]
    - Use ARRAY_SIZE() instead of hard-coded numbers
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/patch_sigmatel.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index fef56ef..7a82413 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -175,8 +175,8 @@ static hda_nid_t stac9205_mux_nids[2] = {
         0x19, 0x1a
 };
 
-static hda_nid_t stac9205_dmic_nids[3] = {
-        0x17, 0x18, 0
+static hda_nid_t stac9205_dmic_nids[2] = {
+        0x17, 0x18,
 };
 
 static hda_nid_t stac9200_pin_nids[8] = {
@@ -1931,7 +1931,7 @@ static int patch_stac922x(struct hda_codec *codec)
 
        spec->adc_nids = stac922x_adc_nids;
        spec->mux_nids = stac922x_mux_nids;
-       spec->num_muxes = 2;
+       spec->num_muxes = ARRAY_SIZE(stac922x_mux_nids);
        spec->num_dmics = 0;
 
        spec->init = stac922x_core_init;
@@ -1992,7 +1992,7 @@ static int patch_stac927x(struct hda_codec *codec)
        case STAC_D965_3ST:
                spec->adc_nids = stac927x_adc_nids;
                spec->mux_nids = stac927x_mux_nids;
-               spec->num_muxes = 3;
+               spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
                spec->num_dmics = 0;
                spec->init = d965_core_init;
                spec->mixer = stac9227_mixer;
@@ -2000,7 +2000,7 @@ static int patch_stac927x(struct hda_codec *codec)
        case STAC_D965_5ST:
                spec->adc_nids = stac927x_adc_nids;
                spec->mux_nids = stac927x_mux_nids;
-               spec->num_muxes = 3;
+               spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
                spec->num_dmics = 0;
                spec->init = d965_core_init;
                spec->mixer = stac9227_mixer;
@@ -2008,7 +2008,7 @@ static int patch_stac927x(struct hda_codec *codec)
        default:
                spec->adc_nids = stac927x_adc_nids;
                spec->mux_nids = stac927x_mux_nids;
-               spec->num_muxes = 3;
+               spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
                spec->num_dmics = 0;
                spec->init = stac927x_core_init;
                spec->mixer = stac927x_mixer;
@@ -2067,9 +2067,9 @@ static int patch_stac9205(struct hda_codec *codec)
 
        spec->adc_nids = stac9205_adc_nids;
        spec->mux_nids = stac9205_mux_nids;
-       spec->num_muxes = 2;
+       spec->num_muxes = ARRAY_SIZE(stac9205_mux_nids);
        spec->dmic_nids = stac9205_dmic_nids;
-       spec->num_dmics = 2;
+       spec->num_dmics = ARRAY_SIZE(stac9205_dmic_nids);
        spec->dmux_nid = 0x1d;
 
        spec->init = stac9205_core_init;
-
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