From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753151AbcFIVT0 (ORCPT ); Thu, 9 Jun 2016 17:19:26 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:51233 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161116AbcFIVTW (ORCPT ); Thu, 9 Jun 2016 17:19:22 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Mark Brown , Kamal Mostafa Subject: [PATCH 4.2.y-ckt 123/206] ASoC: ak4642: Enable cache usage to fix crashes on resume Date: Thu, 9 Jun 2016 14:15:32 -0700 Message-Id: <1465507015-23052-124-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1465507015-23052-1-git-send-email-kamal@canonical.com> References: <1465507015-23052-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 4.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.2.8-ckt12 -stable review patch. If anyone has any objections, please let me know. ---8<------------------------------------------------------------ From: Mark Brown commit d3030d11961a8c103cf07aed59905276ddfc06c2 upstream. The ak4642 driver is using a regmap cache sync to restore the configuration of the chip on resume but (as Peter observed) does not actually define a register cache which means that the resume is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Reported-by: Geert Uytterhoeven Reported-by: Peter Ujfalusi Tested-by: Geert Uytterhoeven Signed-off-by: Mark Brown [ kamal: backport to 4.2-stable: no separate ak4643_regmap ] Signed-off-by: Kamal Mostafa --- sound/soc/codecs/ak4642.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 7c0f6552..d41708f 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c @@ -538,6 +538,7 @@ static const struct regmap_config ak4642_regmap = { .max_register = ARRAY_SIZE(ak4642_reg) + 1, .reg_defaults = ak4642_reg, .num_reg_defaults = ARRAY_SIZE(ak4642_reg), + .cache_type = REGCACHE_RBTREE, }; static const struct regmap_config ak4648_regmap = { @@ -546,6 +547,7 @@ static const struct regmap_config ak4648_regmap = { .max_register = ARRAY_SIZE(ak4648_reg) + 1, .reg_defaults = ak4648_reg, .num_reg_defaults = ARRAY_SIZE(ak4648_reg), + .cache_type = REGCACHE_RBTREE, }; static const struct ak4642_drvdata ak4642_drvdata = { -- 2.7.4