[alsa-devel] [PATCH 28/31] ASoC: wm8996: Replace BUG() with snd_BUG()
Takashi Iwai
tiwai at suse.de
Tue Nov 5 18:40:15 CET 2013
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation. For that
purpose, it'd be more convenient to use snd_BUG() instead.
Cc: patches at opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
sound/soc/codecs/wm8996.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index b70379ebd142..7b90f188ecbf 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -610,7 +610,7 @@ static int bg_event(struct snd_soc_dapm_widget *w,
wm8996_bg_disable(codec);
break;
default:
- BUG();
+ snd_BUG();
ret = -EINVAL;
}
@@ -627,7 +627,7 @@ static int cp_event(struct snd_soc_dapm_widget *w,
msleep(5);
break;
default:
- BUG();
+ snd_BUG();
ret = -EINVAL;
}
@@ -648,7 +648,7 @@ static int rmv_short_event(struct snd_soc_dapm_widget *w,
wm8996->hpout_pending |= w->shift;
break;
default:
- BUG();
+ snd_BUG();
return -EINVAL;
}
@@ -769,7 +769,7 @@ static int dcs_start(struct snd_soc_dapm_widget *w,
wm8996->dcs_pending |= 1 << w->shift;
break;
default:
- BUG();
+ snd_BUG();
return -EINVAL;
}
@@ -1658,7 +1658,7 @@ static int wm8996_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
lrclk_rx_reg = WM8996_AIF2_RX_LRCLK_2;
break;
default:
- BUG();
+ snd_BUG();
return -EINVAL;
}
@@ -1770,7 +1770,7 @@ static int wm8996_hw_params(struct snd_pcm_substream *substream,
dsp_shift = WM8996_DSP2_DIV_SHIFT;
break;
default:
- BUG();
+ snd_BUG();
return -EINVAL;
}
--
1.8.4.2
More information about the Alsa-devel
mailing list