From: Takashi Iwai Subject: Re: [PATCH] sscape: drop redundant fields from soundscape struct (2nd rev) Date: Mon, 02 Feb 2009 19:54:28 +0100 Message-ID: References: <20090202082011.5349745B990@f49.poczta.interia.pl> <20090202195257.6a58627f.krzysztof.h1@poczta.fm> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id A962110384B for ; Mon, 2 Feb 2009 19:54:28 +0100 (CET) In-Reply-To: <20090202195257.6a58627f.krzysztof.h1@poczta.fm> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Krzysztof Helt Cc: Alsa-devel List-Id: alsa-devel@alsa-project.org At Mon, 2 Feb 2009 19:52:57 +0100, Krzysztof Helt wrote: > > From: Krzysztof Helt > > The wss_base is disguised parameter for one function. > It is converted to a function parameter. > > The code_type is only set but never read. > It is removed. > > The midi_vol is set only to 0 so it does not work > as detection of change in midi volume. It is fixed. > > The xport variable is alias to the port[dev]. Use > the port[dev] directly to increase readability. > > Signed-off-by: Krzysztof Helt > --- > > diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c > index 681e223..dca0830 100644 > --- a/sound/isa/sscape.c > +++ b/sound/isa/sscape.c > @@ -135,8 +135,6 @@ enum card_type { > struct soundscape { > spinlock_t lock; > unsigned io_base; > - unsigned wss_base; > - int codec_type; > int ic_type; > enum card_type type; > struct resource *io_res; > @@ -767,6 +765,7 @@ static int sscape_midi_put(struct snd_kcontrol *kctl, > change = (host_write_ctrl_unsafe(s->io_base, CMD_SET_MIDI_VOL, 100) > && host_write_ctrl_unsafe(s->io_base, ((unsigned char) uctl->value.integer. value[0]) & 127, 100) > && host_write_ctrl_unsafe(s->io_base, CMD_XXX_MIDI_VOL, 100)); > + s->midi_vol = (unsigned char) uctl->value.integer.value[0] & 127; > __skip_change: > > /* You can change sscape_midi_get() to just return s->midi_vol instead of probing the hardware value. That's why I suggested it'd be less code. thanks, Takashi