aboutsummaryrefslogtreecommitdiff
path: root/sound/core/control.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-10-31 16:18:02 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-10-31 16:18:02 +0900
commit0803d540db06f53acd2fabf1347d5b665218f14a (patch)
treef5f8e5510a76bb59d3583478961daf5afc32df08 /sound/core/control.c
parenta8884e3415c29c58a5875d54c109c4a7fcaa6fb4 (diff)
parent721d5dfe7e516954c501d5e9d0dfab379cf4241a (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'sound/core/control.c')
-rw-r--r--sound/core/control.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 6d71f9a7ccb..b0bf4269104 100644
--- a/sound/core/control.c
+++ b/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 :