Re: [PATCH v3 27/28] sound: usb: card: Allow for rediscovery of connected USB SND devices

From: Oliver Neukum
Date: Thu Mar 09 2023 - 06:33:04 EST


On 09.03.23 00:57, Wesley Cheng wrote:
+/*
+ * in case the platform driver was not ready at the time of USB SND
+ * device connect, expose an API to discover all connected USB devices
+ * so it can populate any dependent resources/structures.
+ */
+void snd_usb_rediscover_devices(void)
+{
+ int i;
+
+ mutex_lock(&register_mutex);
+ for (i = 0; i < SNDRV_CARDS; i++) {
+ if (usb_chip[i])
+ if (platform_ops && platform_ops->connect_cb)

Really check this every time?

Regards
Oliver