Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp261179pxx; Wed, 28 Oct 2020 04:23:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw35RVEyi1dOkrMnj164shi5/brNIXhguW5npXAlGsSyn5/Ko07vov2gACg59VYieUVyAs/ X-Received: by 2002:a05:6402:1bc9:: with SMTP id ch9mr7355494edb.386.1603884205905; Wed, 28 Oct 2020 04:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603884205; cv=none; d=google.com; s=arc-20160816; b=E+kG+8ujftDQ3HxW3sMcXH3TdtrzAkB6O0ix73J9mvOdE6AFY4bvYkXZAH87O2pGH9 MHgv8sqBgXmH0SnqyDfdEm0Sj/UIrN2VEzDqnXwPjj8PhIoU7UgM8CTuigpBtwH8/q5s lU2oaRV32dpNKRAxC6S+YLIjhgt3n63gOYXNUkoutaQgLY8umio/uQGg1dMl9sr3hh9T gFsgbGYlNLMgNEH6Zd+qii/KbDrZbRM44vMgyAd+MpYddqXArLlKLumdUO1qeIfhRakH 1WzmGVhpIEtKUZU5GxGTwLqHyZgBLyOY6PBwnXI9sO0bF/KTAPdbObdf9mFFhFB9xutr KL0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3gFUkkTrw+s0d4XFuV/FOBN5tbz347KGgAGGXHe3TWk=; b=FFQbLu334YeUQpA7qiFMEr/+cIeSJmxOFDlubANfNFgmwkq+BzQEOkziPddKCslIDr xzm/dQ4VK5/QGFZRX8zIjzG0ulAnUoxwfaMsW27T0+UEfZ0fr4UbxSaSEaXSDDT8TJyx LBXEw2qOYim+B0dKjDnrn4zZ2a1UXUjwCBDDNgk9jqI1PLnr4rG6NaoB1U4zQayGeC3O rkQSNf6s6CFPokBeDtc4HmSyl5RBO63N86LIJPTwE/NfeoNpWHBSQNd0xxR2EwwNf8m4 dNOUS86qsLXOVTnXkGNBeIgIGrU13sh4916Ce/OOJAXo9LJ2oJe/8ba3CGQxcTK1cDYc zWrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f9R52xQK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt10si1135660edb.503.2020.10.28.04.23.03; Wed, 28 Oct 2020 04:23:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f9R52xQK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502365AbgJ0PDG (ORCPT + 99 others); Tue, 27 Oct 2020 11:03:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:33558 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1787762AbgJ0PAR (ORCPT ); Tue, 27 Oct 2020 11:00:17 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 C69E120714; Tue, 27 Oct 2020 15:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810816; bh=ZqL7zFQymRYCa2Cfx3gmpX6HBILpIoV9aEoS+biScPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f9R52xQK9GI85c5UN6cu+w5cMldORw8XqtLsfrSK1NaUXo9hV4QtI3bYQ1tImOE8H AsL2MRj7Y/wacQJ9myJHDve6I2AyN5U0C9U6YHiEXwU3J8el5yrIWLvpbi47NjKxuc 0HjUidKRikFmiYhJouvk10uM6vU2HnU5cZDxaLfM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Murphy , Mark Brown , Sasha Levin Subject: [PATCH 5.8 246/633] ASoC: tas2770: Fix calling reset in probe Date: Tue, 27 Oct 2020 14:49:49 +0100 Message-Id: <20201027135534.216176789@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Murphy [ Upstream commit b0bcbe615756d5923eec4e95996e4041627e5741 ] tas2770_reset is called during i2c probe. The reset calls the snd_soc_component_write which depends on the tas2770->component being available. The component pointer is not set until codec_probe so move the reset to the codec_probe after the pointer is set. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-1-dmurphy@ti.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/tas2770.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index cf071121c8398..9f759c51ca435 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -574,6 +574,8 @@ static int tas2770_codec_probe(struct snd_soc_component *component) tas2770->component = component; + tas2770_reset(tas2770); + return 0; } @@ -770,8 +772,6 @@ static int tas2770_i2c_probe(struct i2c_client *client, tas2770->channel_size = 0; tas2770->slot_width = 0; - tas2770_reset(tas2770); - result = tas2770_register_codec(tas2770); if (result) dev_err(tas2770->dev, "Register codec failed.\n"); -- 2.25.1