Skip to contentSkip to conversation

ALSA: hda/tas2781: Add bus name in device name check

PATCH In review Baojun Xu 2 participants 2 messages Jul 3, 2025 Sound

lore
Share & tools
lore

Baojun Xu

author
#0 lore raw

PATCH 1/1 ALSA: hda/tas2781: Add bus name in device name check

Device name start from bus name, as we use strstarts() to do compare, need add it for TXNW2781 device.

---
 sound/pci/hda/tas2781_hda_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/tas2781_hda_i2c.c +1 -1
index b9cdbca95..530c2266a 100644
@@ -588,7 +588,7 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt)
 		hda_priv->save_calibration = tas2781_save_calibration;
 		tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;
 	} else if (strstarts(dev_name(&clt->dev),
-			     "TXNW2781:00-tas2781-hda.0")) {
+			     "i2c-TXNW2781:00-tas2781-hda.0")) {
 		device_name = "TXNW2781";
 		hda_priv->save_calibration = tas2781_save_calibration;
 		tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 5 lines · Baojun Xu

Device name start from bus name, as we use strstarts() to do compare, need add it for TXNW2781 device.

Could you give the proper Fixes tag if it's a fix of the previous changes?

thanks,

Takashi

Quoted 20 lines
---
 sound/pci/hda/tas2781_hda_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/tas2781_hda_i2c.c +1 -1
index b9cdbca95..530c2266a 100644
@@ -588,7 +588,7 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt)
 		hda_priv->save_calibration = tas2781_save_calibration;
 		tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;
 	} else if (strstarts(dev_name(&clt->dev),
-			     "TXNW2781:00-tas2781-hda.0")) {
+			     "i2c-TXNW2781:00-tas2781-hda.0")) {
 		device_name = "TXNW2781";
 		hda_priv->save_calibration = tas2781_save_calibration;
 		tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;
Signature · 1 line
2.43.0