On Tue, Aug 18, 2026 at 02:15:20PM +0800, huangjia2hi@163.com wrote:
From: Jiazhi Huang huangjia2hi@163.com
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 huangjia2hi@163.com
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;
Are you sure this is right? How was this tested?
A blind TODO change isn't usually a good idea. If it was this simple, I am pretty sure we would have done this a long time ago :)
thanks,
greg k-h