Patch "ASoC: cs42l56: fix DT probe" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: cs42l56: fix DT probe

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-cs42l56-fix-dt-probe.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6585acbd105174f9e50d4b4b96aaa6fac83dcd6e
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Thu Jan 26 17:21:24 2023 +0100

    ASoC: cs42l56: fix DT probe
    
    [ 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@xxxxxxxx>
    Acked-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230126162203.2986339-1-arnd@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux