Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: audio: use dynamic vendor and product IDs
@ 2026-08-18  6:15 huangjia2hi
  2026-08-25 15:36 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: huangjia2hi @ 2026-08-18  6:15 UTC (permalink / raw)
  To: Vaibhav Agarwal, Mark Greer
  Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, greybus-dev,
	linux-staging, linux-kernel, Jiazhi Huang

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;
 	desc.intf_id = gbmodule->dev_id;
 	desc.op_devices = gbmodule->op_devices;
 	desc.ip_devices = gbmodule->ip_devices;
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: greybus: audio: use dynamic vendor and product IDs
  2026-08-18  6:15 [PATCH] staging: greybus: audio: use dynamic vendor and product IDs huangjia2hi
@ 2026-08-25 15:36 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-08-25 15:36 UTC (permalink / raw)
  To: huangjia2hi
  Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
	greybus-dev, linux-staging, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-25 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18  6:15 [PATCH] staging: greybus: audio: use dynamic vendor and product IDs huangjia2hi
2026-08-25 15:36 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox