diff options
| -rw-r--r-- | sound/core/control.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 6d71f9a7ccbb..b0bf42691047 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, | |||
| 225 | kctl.id.iface = ncontrol->iface; | 225 | kctl.id.iface = ncontrol->iface; |
| 226 | kctl.id.device = ncontrol->device; | 226 | kctl.id.device = ncontrol->device; |
| 227 | kctl.id.subdevice = ncontrol->subdevice; | 227 | kctl.id.subdevice = ncontrol->subdevice; |
| 228 | if (ncontrol->name) | 228 | if (ncontrol->name) { |
| 229 | strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); | 229 | strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); |
| 230 | if (strcmp(ncontrol->name, kctl.id.name) != 0) | ||
| 231 | snd_printk(KERN_WARNING | ||
| 232 | "Control name '%s' truncated to '%s'\n", | ||
| 233 | ncontrol->name, kctl.id.name); | ||
| 234 | } | ||
| 230 | kctl.id.index = ncontrol->index; | 235 | kctl.id.index = ncontrol->index; |
| 231 | kctl.count = ncontrol->count ? ncontrol->count : 1; | 236 | kctl.count = ncontrol->count ? ncontrol->count : 1; |
| 232 | access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : | 237 | access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : |
