aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/sound')
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl29
1 files changed, 1 insertions, 28 deletions
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index df699e4323ef..b54cb5048dfa 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -6135,38 +6135,11 @@ struct _snd_pcm_runtime {
6135 </para> 6135 </para>
6136 </section> 6136 </section>
6137 6137
6138 <section id="useful-functions-snd-assert">
6139 <title><function>snd_assert()</function></title>
6140 <para>
6141 <function>snd_assert()</function> macro is similar with the
6142 normal <function>assert()</function> macro. For example,
6143
6144 <informalexample>
6145 <programlisting>
6146<![CDATA[
6147 snd_assert(pointer != NULL, return -EINVAL);
6148]]>
6149 </programlisting>
6150 </informalexample>
6151 </para>
6152
6153 <para>
6154 The first argument is the expression to evaluate, and the
6155 second argument is the action if it fails. When
6156 <constant>CONFIG_SND_DEBUG</constant>, is set, it will show an
6157 error message such as <computeroutput>BUG? (xxx)</computeroutput>
6158 together with stack trace.
6159 </para>
6160 <para>
6161 When no debug flag is set, this macro is ignored.
6162 </para>
6163 </section>
6164
6165 <section id="useful-functions-snd-bug"> 6138 <section id="useful-functions-snd-bug">
6166 <title><function>snd_BUG()</function></title> 6139 <title><function>snd_BUG()</function></title>
6167 <para> 6140 <para>
6168 It shows the <computeroutput>BUG?</computeroutput> message and 6141 It shows the <computeroutput>BUG?</computeroutput> message and
6169 stack trace as well as <function>snd_assert</function> at the point. 6142 stack trace as well as <function>snd_BUG_ON</function> at the point.
6170 It's useful to show that a fatal error happens there. 6143 It's useful to show that a fatal error happens there.
6171 </para> 6144 </para>
6172 <para> 6145 <para>