Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp48200imu; Thu, 8 Nov 2018 14:32:35 -0800 (PST) X-Google-Smtp-Source: AJdET5dfXXN2joMl7ZyqJAHM+bV/1+xjbKh69X9R2VFd62oEk8jOt0Ro3ElhUlLaxv3Yrgjo2E6j X-Received: by 2002:a17:902:788b:: with SMTP id q11-v6mr6570952pll.54.1541716354960; Thu, 08 Nov 2018 14:32:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716354; cv=none; d=google.com; s=arc-20160816; b=RP1sH2vmkWz+o5F7v+mL7Imkj+2INwgjUTcRbMsoKfG4N40b1/945xidEy3Vhp19uD DWEzuhiZS/4/1UzeBvCZ+mcMSL87sZtYhu/r2WlOIeSsCgIZ+FPUgoZmLdxTs8SwMjPT 6A6Kdp97VVKZXhmmqdt10/K9qooZK/zQVjP6WH8Ycm0ONM573CwzyHxYqCxJY99wIM5L T5fgY616cRjhoxR3qeVJ/bC6su5V620RnbN/+N0mt1b3KZW1sGGidXiI/183G6C5rTw9 5awXak+jkUXNgUZARyPyC5gu8mCJL9oi/Q7+zSCM7XCY5/u8+oo8Rpld6K7ntCGzQa/K kE0A== 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=aBwnmiB4PvgP8qFY4gNjnlCcvZ923vzxYYCMih/bGLU=; b=RgoBuoE5vB4ldyidwXY2wSrMaBlStXrvB1Xj4zakK7cJOMTRxXIVyC2qGTOQRrSGPJ rvdB+hrHApxeIr5Tekkm/wT0xm6y3yeaLUbeylh9eeZo+DktQJxGQYpxbUYqbeZ0YpBW C+ze10LraobDHi/737XWNBsROYgMYXZtsr/+JYw84rPqsSb4wTgX0+iuipPWnRXFu4JE Aup4BGOBYNM2u5GANavtaqfj2LnYgep1UlE3s4gGYejdDgs3M6hUuu1N/R7bT2+cb72v nIbhrOby7EMrvHQ8c9uS9SSPF6jXagIF4VZLWDnCpd8ClncodL09sdyiyva6FxItSRn6 B7rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KRo8LlMb; 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 b3-v6si5604951plc.103.2018.11.08.14.32.19; Thu, 08 Nov 2018 14:32:34 -0800 (PST) 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=KRo8LlMb; 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 S1728283AbeKIHhs (ORCPT + 99 others); Fri, 9 Nov 2018 02:37:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:56520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730429AbeKIHhs (ORCPT ); Fri, 9 Nov 2018 02:37:48 -0500 Received: from localhost (unknown [208.72.13.198]) (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 398C9208E3; Thu, 8 Nov 2018 22:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714419; bh=2UB67ox6gxwUH6NKKEoSQPAKnt5QF/kRQV2bUtVlYlQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRo8LlMbyquYLS6zECoxucbcZ+BiwpI5r4a2p3NuGYMXJOm7dRzJqGW0IGHBqu/td yrryyYUqd+K6ogm58ELgkA/hkDOfH0oKy4jBFllTVBlvzSHsWkbs6Pniiy67gFXVw6 JvzvbQ7G1e/oatT40TzL+uxlhB7NdD2gJ8RCrWSM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 4.4 043/114] ASoC: wm8940: Enable cache usage to fix crashes on resume Date: Thu, 8 Nov 2018 13:50:58 -0800 Message-Id: <20181108215105.027594568@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 50c7a0ef2d97e56c7ce2f1ea5fe1d8e25aadc1bb ] The wm8940 driver is using a regmap cache sync to restore the configuration of the chip when switching from OFF to STANDBY, but does not actually define a register cache which means that the restore is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Based on commit d3030d11961a8c10 ("ASoC: ak4642: Enable cache usage to fix crashes on resume") by Mark Brown . Signed-off-by: Geert Uytterhoeven Acked-by: Charles Keepax Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm8940.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index f6f9395ea38e..1c600819f768 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -743,6 +743,7 @@ static const struct regmap_config wm8940_regmap = { .max_register = WM8940_MONOMIX, .reg_defaults = wm8940_reg_defaults, .num_reg_defaults = ARRAY_SIZE(wm8940_reg_defaults), + .cache_type = REGCACHE_RBTREE, .readable_reg = wm8940_readable_register, .volatile_reg = wm8940_volatile_register, -- 2.17.1