Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7149999ybi; Mon, 8 Jul 2019 15:38:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4ucnzgm1bezyjX/lOigXkd496iBX8ZYkZYTaVQ3pp5n50WMzyb4lLNBcgWCdrhwbBgD6Z X-Received: by 2002:a63:374a:: with SMTP id g10mr26207330pgn.31.1562625538862; Mon, 08 Jul 2019 15:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625538; cv=none; d=google.com; s=arc-20160816; b=QTF6pHWQZveUfuX0eNdvoVAhU4JaHosqtcomta83d15dRctqRrZgTS4sWaCrwQSbda wTeQZsHV3C0ZYfyh53tHorZpY0ex6LbeLdG0I4NEfVQu7hZ7jlKbxn0O5KOQwtwcuGCz +jdvWAoOs+OIOILvXtTLlxkthIlGsJiAW2MP0PzAnQItZFSgprZKIZI32dpn6ibNwWvL ofwsuyxytmdPiVmHL5W7slnWoI2OT8wkGeRO1fLocPPV3Ib1M+UylQtbexgs3zXUdLjx TeoejiLwOLq2sC0Jwpal2io/TCAuvbJ2m1cZx/XGgLNEOvU4hO4vE7HYm/nTj3wNk244 W9PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3krBhH5zrhgkIZmF6I1FxFW+du5Y7c2pSbvdYU18rCc=; b=a8xClhjO42wM+hC5vp4TjJwdpdjLrjzmGDqhDAvGSAeTH8h3x2QdYg6xO3yV5yRWQH l1rAOhRndtRFvEOIXnvHlgGXvrMgBPjkC5hRHbqFomDQ8/iznTB7N0RS0/JTrJuFp0T/ mSAcBGU07OMK2OO4Cgt7PXTI9V5mxQNzfmwMNytSpMV9CoyRC2pM1v+li7GUSSKth5jv oUc+hmzsnnURifv/7uxqc/AuBKpfjXIv31poj6dkQQ6T4lmWP7V8B3fZeiS8AJhvCkuO u+3wL1IEeJ5IHbr1Rp55xjtpaDimmXwQklDvxkVpIwyj0cbv8spwRCh6+Q28l7QM8Oex OKxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r4mbpYld; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x61si2113559plb.336.2019.07.08.15.38.44; Mon, 08 Jul 2019 15:38:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r4mbpYld; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389232AbfGHP2K (ORCPT + 99 others); Mon, 8 Jul 2019 11:28:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:56618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730098AbfGHP2K (ORCPT ); Mon, 8 Jul 2019 11:28:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 818F520645; Mon, 8 Jul 2019 15:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599689; bh=wulHnAKnIRQXmD5SlTRtiU7beGLqGFFGxwlQru+CWj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r4mbpYldFBMk0qiyzuYKghfFNuWYXnnrqR9//1gFPpj3vpQo0mbE9pD7YKb1chwHG sLLo8gIjq2S8D7WnMNM4riAaaDVXsM+ZRhUCbqnZF03e0bFBrhvu9LpEgvyyHW9ot2 IJzRO4zpB9gsgX6HM+uyKaOzFzvor4wRjqvqsCvc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matt Flax , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 4.19 08/90] ASoC : cs4265 : readable register too low Date: Mon, 8 Jul 2019 17:12:35 +0200 Message-Id: <20190708150522.952943044@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150521.829733162@linuxfoundation.org> References: <20190708150521.829733162@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit f3df05c805983427319eddc2411a2105ee1757cf ] The cs4265_readable_register function stopped short of the maximum register. An example bug is taken from : https://github.com/Audio-Injector/Ultra/issues/25 Where alsactl store fails with : Cannot read control '2,0,0,C Data Buffer,0': Input/output error This patch fixes the bug by setting the cs4265 to have readable registers up to the maximum hardware register CS4265_MAX_REGISTER. Signed-off-by: Matt Flax Reviewed-by: Charles Keepax Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cs4265.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c index 407554175282..68d18aca397d 100644 --- a/sound/soc/codecs/cs4265.c +++ b/sound/soc/codecs/cs4265.c @@ -60,7 +60,7 @@ static const struct reg_default cs4265_reg_defaults[] = { static bool cs4265_readable_register(struct device *dev, unsigned int reg) { switch (reg) { - case CS4265_CHIP_ID ... CS4265_SPDIF_CTL2: + case CS4265_CHIP_ID ... CS4265_MAX_REGISTER: return true; default: return false; -- 2.20.1