diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:17:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:17:46 +0000 |
commit | 7f3a4257159dea8e7ef66d1a539dc6df708b8ed3 (patch) | |
tree | bcc69b5f4609f348fac49e2f59e210b29eaea783 /drivers/usb/gadget/function/u_audio.c | |
parent | Adding upstream version 6.9.12. (diff) | |
download | linux-7f3a4257159dea8e7ef66d1a539dc6df708b8ed3.tar.xz linux-7f3a4257159dea8e7ef66d1a539dc6df708b8ed3.zip |
Adding upstream version 6.10.3.upstream/6.10.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/usb/gadget/function/u_audio.c')
-rw-r--r-- | drivers/usb/gadget/function/u_audio.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c index ec1dceb087..89af0feb75 100644 --- a/drivers/usb/gadget/function/u_audio.c +++ b/drivers/usb/gadget/function/u_audio.c @@ -1242,7 +1242,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name, if (err < 0) goto snd_fail; - strscpy(pcm->name, pcm_name, sizeof(pcm->name)); + strscpy(pcm->name, pcm_name); pcm->private_data = uac; uac->pcm = pcm; @@ -1256,7 +1256,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name, if ((c_chmask && g_audio->in_ep_fback) || (p_chmask && params->p_fu.id) || (c_chmask && params->c_fu.id)) - strscpy(card->mixername, card_name, sizeof(card->driver)); + strscpy(card->mixername, card_name); if (c_chmask && g_audio->in_ep_fback) { kctl = snd_ctl_new1(&u_audio_controls[UAC_FBACK_CTRL], @@ -1385,9 +1385,10 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name, prm->snd_kctl_rate_id = kctl->id; } - strscpy(card->driver, card_name, sizeof(card->driver)); - strscpy(card->shortname, card_name, sizeof(card->shortname)); - sprintf(card->longname, "%s %i", card_name, card->dev->id); + strscpy(card->driver, card_name); + strscpy(card->shortname, card_name); + snprintf(card->longname, sizeof(card->longname), "%s %i", + card_name, card->dev->id); snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, NULL, 0, BUFF_SIZE_MAX); |