Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B90FC05027 for ; Thu, 9 Feb 2023 11:20:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7AD82DF2; Thu, 9 Feb 2023 12:19:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7AD82DF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675941616; bh=o9dETZN+XatnTtaUJYkJ1hUrimdSH4c3Pm6QWbeDUsc=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=uMn/j7EcUcXiGmH4zmJTOx7h1ogffnoFX7LRZsppqrXPi4GpHzUI5hYAMT5FiZAJL GSHYBLrM9MCzGDntY+kf2i5pzF11sCmnvJTJ2A8zFYVZMI9G2SqxwGPZwK6qc64epK cEzV9rXLcoyVEYFSQ12F67G4u872NRmXoaaOcRcA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5C287F8055A; Thu, 9 Feb 2023 12:18:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5D45BF80552; Thu, 9 Feb 2023 12:17:54 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E8072F8053B for ; Thu, 9 Feb 2023 12:17:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E8072F8053B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=AIbNsO5w Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7930E61A2A; Thu, 9 Feb 2023 11:17:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79698C433A0; Thu, 9 Feb 2023 11:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675941469; bh=o9dETZN+XatnTtaUJYkJ1hUrimdSH4c3Pm6QWbeDUsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AIbNsO5w/7MeEnQWz4GntP9YTfJLgKl5KV8xaaqPIUZ31qrz0j2p1YnqoVo4fGsvO YnAon9dgQdZrrimLlCWtGFkRUSkOHLZsujLp+Kuvr4jP8yBJd00WphmBIIwJwO5MHt pAYrwo0kToUWPiZwC7v4BWEQSB/v1q5zPQPCHC5krGg64msAICCEMqt6MkrThQZ+zw y47iZ9xIjRJwXrDE8Zn1Agsw+dwO8UOfly/uDcI6Oby30dC/oqLeL5erVpe5vdjflG weuUzcjmreaT9gg/vAefUVftPt/PsovodODjeKCY2AgAkH2rg6vZ/5kVRD4HHfXZNo dLrB4M3O4ADag== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 06/17] ASoC: cs42l56: fix DT probe Date: Thu, 9 Feb 2023 06:17:18 -0500 Message-Id: <20230209111731.1892569-6-sashal@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230209111731.1892569-1-sashal@kernel.org> References: <20230209111731.1892569-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Message-ID-Hash: ZBWOXWQZ3QVZTZQXW5MCURN53ENP2MLZ X-Message-ID-Hash: ZBWOXWQZ3QVZTZQXW5MCURN53ENP2MLZ X-MailFrom: sashal@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Arnd Bergmann , Charles Keepax , Mark Brown , Sasha Levin , james.schulman@cirrus.com, david.rhodes@cirrus.com, tanureal@opensource.cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, tiwai@suse.com, alsa-devel@alsa-project.org, patches@opensource.cirrus.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Arnd Bergmann [ Upstream commit e18c6da62edc780e4f4f3c9ce07bdacd69505182 ] While looking through legacy platform data users, I noticed that the DT probing never uses data from the DT properties, as the platform_data structure gets overwritten directly after it is initialized. There have never been any boards defining the platform_data in the mainline kernel either, so this driver so far only worked with patched kernels or with the default values. For the benefit of possible downstream users, fix the DT probe by no longer overwriting the data. Signed-off-by: Arnd Bergmann Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230126162203.2986339-1-arnd@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cs42l56.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index b39c25409c239..f0af8c18e5efa 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c @@ -1193,18 +1193,12 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client, if (pdata) { cs42l56->pdata = *pdata; } else { - pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata), - GFP_KERNEL); - if (!pdata) - return -ENOMEM; - if (i2c_client->dev.of_node) { ret = cs42l56_handle_of_data(i2c_client, &cs42l56->pdata); if (ret != 0) return ret; } - cs42l56->pdata = *pdata; } if (cs42l56->pdata.gpio_nreset) { -- 2.39.0