[alsa-devel] [PATCH RFT] ASoC: wm8904: Make undocumented registers non-readable

Axel Lin axel.lin at ingics.com
Sat Oct 17 05:11:10 CEST 2015


Signed-off-by: Axel Lin <axel.lin at ingics.com>
---
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





More information about the Alsa-devel mailing list