Skip to content

Commit e18c6da

Browse files
arndbbroonie
authored andcommitted
ASoC: cs42l56: fix DT probe
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 <[email protected]> Acked-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 100c94f commit e18c6da

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

sound/soc/codecs/cs42l56.c

-6
Original file line numberDiff line numberDiff line change
@@ -1191,18 +1191,12 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client)
11911191
if (pdata) {
11921192
cs42l56->pdata = *pdata;
11931193
} else {
1194-
pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata),
1195-
GFP_KERNEL);
1196-
if (!pdata)
1197-
return -ENOMEM;
1198-
11991194
if (i2c_client->dev.of_node) {
12001195
ret = cs42l56_handle_of_data(i2c_client,
12011196
&cs42l56->pdata);
12021197
if (ret != 0)
12031198
return ret;
12041199
}
1205-
cs42l56->pdata = *pdata;
12061200
}
12071201

12081202
if (cs42l56->pdata.gpio_nreset) {

0 commit comments

Comments
 (0)