aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tas2781-i2c.c
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-12-02 21:44:00 +0000
committersaturneric <[email protected]>2025-12-02 21:44:00 +0000
commitaa766e96efd6b62fd4dc7750134624f2c633cc55 (patch)
tree06078a9d8cbb6227f541e18545aa68f082d86242 /sound/soc/codecs/tas2781-i2c.c
parentMerge tag 'v6.17.8' into linux-6.17.y (diff)
parentLinux 6.17.10 (diff)
downloadkernel-linux-6.17.y.tar.gz
kernel-linux-6.17.y.zip
Merge tag 'v6.17.10' into linux-6.17.ylinux-6.17.y
This is the 6.17.10 stable release
Diffstat (limited to 'sound/soc/codecs/tas2781-i2c.c')
-rw-r--r--sound/soc/codecs/tas2781-i2c.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index ea3cdb8553de..9890b1a6d292 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -1864,7 +1864,8 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv)
{
struct i2c_client *client = (struct i2c_client *)tas_priv->client;
unsigned int dev_addrs[TASDEVICE_MAX_CHANNELS];
- int i, ndev = 0;
+ int ndev = 0;
+ int i, rc;
if (tas_priv->isacpi) {
ndev = device_property_read_u32_array(&client->dev,
@@ -1875,8 +1876,12 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv)
} else {
ndev = (ndev < ARRAY_SIZE(dev_addrs))
? ndev : ARRAY_SIZE(dev_addrs);
- ndev = device_property_read_u32_array(&client->dev,
+ rc = device_property_read_u32_array(&client->dev,
"ti,audio-slots", dev_addrs, ndev);
+ if (rc != 0) {
+ ndev = 1;
+ dev_addrs[0] = client->addr;
+ }
}
tas_priv->irq =