mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.19 1/6] ASoC: cs42l56: fix DT probe
@ 2023-02-09 11:19 Sasha Levin
  2023-02-09 11:19 ` [PATCH AUTOSEL 4.19 2/6] tools/virtio: fix the vringh test for virtio ring changes Sasha Levin
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sasha Levin @ 2023-02-09 11:19 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Arnd Bergmann, Charles Keepax, Mark Brown, Sasha Levin,
	james.schulman, david.rhodes, tanureal, rf, lgirdwood, perex,
	tiwai, alsa-devel, patches

From: Arnd Bergmann <arnd@arndb.de>

[ 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 <arnd@arndb.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230126162203.2986339-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 deaad703a7dbf..a4826a7d0a98c 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -1204,18 +1204,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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-09 11:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 11:19 [PATCH AUTOSEL 4.19 1/6] ASoC: cs42l56: fix DT probe Sasha Levin
2023-02-09 11:19 ` [PATCH AUTOSEL 4.19 2/6] tools/virtio: fix the vringh test for virtio ring changes Sasha Levin
2023-02-09 11:19 ` [PATCH AUTOSEL 4.19 3/6] net/rose: Fix to not accept on connected socket Sasha Levin
2023-02-09 11:19 ` [PATCH AUTOSEL 4.19 4/6] powerpc/85xx: Fix unannotated intra-function call warning Sasha Levin
2023-02-09 11:19 ` [PATCH AUTOSEL 4.19 5/6] powerpc/kvm: " Sasha Levin
2023-02-09 11:19 ` [PATCH AUTOSEL 4.19 6/6] nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®