[PATCH] staging: greybus: audio: use dynamic vendor and product IDs

[email protected]
Newsgroups gmane.linux.kernel
Message-ID <[email protected]>
From: Jiazhi Huang <[email protected]>

Replace hardcoded magic numbers for Vendor ID (vid) and Product ID (pid)
in gb_audio_mgmt_node_desc with dynamic values obtained from the
greybus interface.

This resolves the associated TODO comments by using the actual vendor and
product IDs provided by the interface structure.

Signed-off-by: Jiazhi Huang <[email protected]>
---
 drivers/staging/greybus/audio_module.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/audio_module.c b/drivers/staging/greybus/audio_module.c
index 4cd1f42c11f0..9eed3ac0c49d 100644
--- a/drivers/staging/greybus/audio_module.c
+++ b/drivers/staging/greybus/audio_module.c
@@ -358,8 +358,8 @@ static int gb_audio_probe(struct gb_bundle *bundle,
 	dev_dbg(dev, "Inform set_event:%d to above layer\n", 1);
 	/* prepare for the audio manager */
 	strscpy(desc.name, gbmodule->name, sizeof(desc.name));
-	desc.vid = 2; /* todo */
-	desc.pid = 3; /* todo */
+	desc.vid = bundle->intf->vendor_id;
+	desc.pid = bundle->intf->product_id;
 	desc.intf_id = gbmodule->dev_id;
 	desc.op_devices = gbmodule->op_devices;
 	desc.ip_devices = gbmodule->ip_devices;
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.