diff mbox

[2/5] ALSA: control: use dev_dbg() for warning to add duplicated controls

Message ID 1423651213-19829-3-git-send-email-o-takashi@sakamocchi.jp (mailing list archive)
State New, archived
Headers show

Commit Message

Takashi Sakamoto Feb. 11, 2015, 10:40 a.m. UTC
When duplicated controls are added, snd module generates message and
the callers receive -EBUSY. The messaging is redundant, especially for
userspace applications because it's caller's fault and callers get
the status code.

This commit change its messaging level to suppress messages in normal
usage.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/core/control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/sound/core/control.c b/sound/core/control.c
index d98b990..1edd6c5 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -349,7 +349,7 @@  int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
 	down_write(&card->controls_rwsem);
 	if (snd_ctl_find_id(card, &id)) {
 		up_write(&card->controls_rwsem);
-		dev_err(card->dev,
+		dev_dbg(card->dev,
 			"control %i:%i:%i:%s:%i is already present\n",
 			id.iface, id.device, id.subdevice, id.name, id.index);
 		err = -EBUSY;