From mboxrd@z Thu Jan 1 00:00:00 1970 From: Axel Lin Subject: [PATCH RFT] ASoC: wm8904: Make undocumented registers non-readable Date: Sat, 17 Oct 2015 11:11:10 +0800 Message-ID: <1445051470.3014.1.camel@ingics.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by alsa0.perex.cz (Postfix) with ESMTP id F147C2606E9 for ; Sat, 17 Oct 2015 05:11:16 +0200 (CEST) Received: by pabrc13 with SMTP id rc13so136575149pab.0 for ; Fri, 16 Oct 2015 20:11:15 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: Charles Keepax , patches@opensource.wolfsonmicro.com, Liam Girdwood , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org Signed-off-by: Axel Lin --- I think the intention of wm8904_readable_register is to return false for undocumented registers, but current code returns true for all cases in wm8904_readable_register. Please review if this patch is correct or not. Thanks. sound/soc/codecs/wm8904.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index b783743..f48b9cb 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -312,7 +312,7 @@ static bool wm8904_readable_register(struct device *dev, unsigned int reg) case WM8904_FLL_NCO_TEST_1: return true; default: - return true; + return false; } } -- 2.1.4