From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D491DC636D4 for ; Thu, 9 Feb 2023 11:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230376AbjBILX4 (ORCPT ); Thu, 9 Feb 2023 06:23:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230360AbjBILXO (ORCPT ); Thu, 9 Feb 2023 06:23:14 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F2D95ACD2; Thu, 9 Feb 2023 03:18:50 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id 1E2D2CE246B; Thu, 9 Feb 2023 11:18:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2830FC433EF; Thu, 9 Feb 2023 11:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675941525; bh=+Dpc3UPpgbhslDUa1Pjver094CNhUa16gcojS/lg89A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B0Veg2J2WoAjM/4ZGRS5FT5ZcS5rglhFe2zLtZ6RHORbQnVx1VZkAWKiQsiSlh4vH IgCZUsQSbRskc7RdESkwuxIQr7JHZOtmOHVmp7Yry4n0Dbvcwo+tnzoMBYT6kklFwX V6PgsnhoIyTeT4fHWjsuk1o1GOfkE86wUaSDSgDs3f0Gg24I0lmIbgcQrHwQ/Dr2c0 GOtleQCe8E5eCtAPEZ5esj+NE4dMsuZrAZbXKW6JPTRRz5iI1D3vrlw9K/MG0GDb+b 8Fc+xWLUpN5TE45UE6npXUtbGB3p1vSyobCTwdK12/sxSMsPnTEyTPLygzVjHETvzZ fKUuySyDbOM8Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org 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, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, patches@opensource.cirrus.com Subject: [PATCH AUTOSEL 5.10 04/13] ASoC: cs42l56: fix DT probe Date: Thu, 9 Feb 2023 06:18:22 -0500 Message-Id: <20230209111833.1892896-4-sashal@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230209111833.1892896-1-sashal@kernel.org> References: <20230209111833.1892896-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 d41e031931061..3c5ec47a8fe64 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