From 8776301de9af91c41e0606f5bd2be85fef39a934 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 29 Oct 2008 14:40:30 +0000 Subject: [PATCH] --- yaml --- r: 118062 b: refs/heads/master c: 366840d7e1ece4331bb3ccc2a53e3bc355529f21 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/core/control.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 824c8704808e..ac4b242b4663 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 78fad343a4fd4c837e3034dcbca13269a783e0f6 +refs/heads/master: 366840d7e1ece4331bb3ccc2a53e3bc355529f21 diff --git a/trunk/sound/core/control.c b/trunk/sound/core/control.c index 6d71f9a7ccbb..b0bf42691047 100644 --- a/trunk/sound/core/control.c +++ b/trunk/sound/core/control.c @@ -225,8 +225,13 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, kctl.id.iface = ncontrol->iface; kctl.id.device = ncontrol->device; kctl.id.subdevice = ncontrol->subdevice; - if (ncontrol->name) + if (ncontrol->name) { strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); + if (strcmp(ncontrol->name, kctl.id.name) != 0) + snd_printk(KERN_WARNING + "Control name '%s' truncated to '%s'\n", + ncontrol->name, kctl.id.name); + } kctl.id.index = ncontrol->index; kctl.count = ncontrol->count ? ncontrol->count : 1; access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :