From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:45115 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757976AbcC2UEz (ORCPT ); Tue, 29 Mar 2016 16:04:55 -0400 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Takashi Iwai" Date: Tue, 29 Mar 2016 20:18:22 +0100 Message-ID: Subject: [PATCH 3.2 46/62] ALSA: hdspm: Fix wrong boolean ctl value accesses In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: 3.2.79-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 537e48136295c5860a92138c5ea3959b9542868b upstream. snd-hdspm driver accesses enum item values (int) instead of boolean values (long) wrongly for some ctl elements. This patch fixes them. Signed-off-by: Takashi Iwai [bwh: Backported to 3.2: drop change to snd_hdspm_put_system_sample_rate()] Signed-off-by: Ben Hutchings --- --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -4386,7 +4386,7 @@ static int snd_hdspm_get_tco_word_term(s { struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); - ucontrol->value.enumerated.item[0] = hdspm->tco->term; + ucontrol->value.integer.value[0] = hdspm->tco->term; return 0; } @@ -4397,8 +4397,8 @@ static int snd_hdspm_put_tco_word_term(s { struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); - if (hdspm->tco->term != ucontrol->value.enumerated.item[0]) { - hdspm->tco->term = ucontrol->value.enumerated.item[0]; + if (hdspm->tco->term != ucontrol->value.integer.value[0]) { + hdspm->tco->term = ucontrol->value.integer.value[0]; hdspm_tco_write(hdspm);