aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/80211.tmpl4
-rw-r--r--Documentation/DocBook/kernel-hacking.tmpl11
-rw-r--r--Documentation/DocBook/kgdb.tmpl6
-rw-r--r--Documentation/DocBook/uio-howto.tmpl2
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl58
5 files changed, 36 insertions, 45 deletions
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index 42e7f030cb16..284ced7a228f 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -107,8 +107,8 @@
107!Finclude/net/cfg80211.h key_params 107!Finclude/net/cfg80211.h key_params
108!Finclude/net/cfg80211.h survey_info_flags 108!Finclude/net/cfg80211.h survey_info_flags
109!Finclude/net/cfg80211.h survey_info 109!Finclude/net/cfg80211.h survey_info
110!Finclude/net/cfg80211.h beacon_parameters 110!Finclude/net/cfg80211.h cfg80211_beacon_data
111!Finclude/net/cfg80211.h plink_actions 111!Finclude/net/cfg80211.h cfg80211_ap_settings
112!Finclude/net/cfg80211.h station_parameters 112!Finclude/net/cfg80211.h station_parameters
113!Finclude/net/cfg80211.h station_info_flags 113!Finclude/net/cfg80211.h station_info_flags
114!Finclude/net/cfg80211.h rate_info_flags 114!Finclude/net/cfg80211.h rate_info_flags
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index eee71426ecb8..d0758b241b23 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -945,7 +945,7 @@ printk(KERN_INFO "my ip: %pI4\n", &ipaddress);
945 945
946 <sect1 id="sym-exportsymbols"> 946 <sect1 id="sym-exportsymbols">
947 <title><function>EXPORT_SYMBOL()</function> 947 <title><function>EXPORT_SYMBOL()</function>
948 <filename class="headerfile">include/linux/module.h</filename></title> 948 <filename class="headerfile">include/linux/export.h</filename></title>
949 949
950 <para> 950 <para>
951 This is the classic method of exporting a symbol: dynamically 951 This is the classic method of exporting a symbol: dynamically
@@ -955,7 +955,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
955 955
956 <sect1 id="sym-exportsymbols-gpl"> 956 <sect1 id="sym-exportsymbols-gpl">
957 <title><function>EXPORT_SYMBOL_GPL()</function> 957 <title><function>EXPORT_SYMBOL_GPL()</function>
958 <filename class="headerfile">include/linux/module.h</filename></title> 958 <filename class="headerfile">include/linux/export.h</filename></title>
959 959
960 <para> 960 <para>
961 Similar to <function>EXPORT_SYMBOL()</function> except that the 961 Similar to <function>EXPORT_SYMBOL()</function> except that the
@@ -1185,13 +1185,6 @@ static struct block_device_operations opt_fops = {
1185 </para> 1185 </para>
1186 1186
1187 <para> 1187 <para>
1188 You may well want to make your CONFIG option only visible if
1189 <symbol>CONFIG_EXPERIMENTAL</symbol> is enabled: this serves as a
1190 warning to users. There many other fancy things you can do: see
1191 the various <filename>Kconfig</filename> files for ideas.
1192 </para>
1193
1194 <para>
1195 In your description of the option, make sure you address both the 1188 In your description of the option, make sure you address both the
1196 expert user and the user who knows nothing about your feature. Mention 1189 expert user and the user who knows nothing about your feature. Mention
1197 incompatibilities and issues here. <emphasis> Definitely 1190 incompatibilities and issues here. <emphasis> Definitely
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index 4ee4ba3509fc..f77358f96930 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -94,10 +94,8 @@
94 <sect1 id="CompileKGDB"> 94 <sect1 id="CompileKGDB">
95 <title>Kernel config options for kgdb</title> 95 <title>Kernel config options for kgdb</title>
96 <para> 96 <para>
97 To enable <symbol>CONFIG_KGDB</symbol> you should first turn on 97 To enable <symbol>CONFIG_KGDB</symbol> you should look under
98 "Prompt for development and/or incomplete code/drivers" 98 "Kernel debugging" and select "KGDB: kernel debugger".
99 (CONFIG_EXPERIMENTAL) in "General setup", then under the
100 "Kernel debugging" select "KGDB: kernel debugger".
101 </para> 99 </para>
102 <para> 100 <para>
103 While it is not a hard requirement that you have symbols in your 101 While it is not a hard requirement that you have symbols in your
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index ddb05e98af0d..95618159e29b 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -984,7 +984,7 @@ int main()
984 return errno; 984 return errno;
985 } 985 }
986 configfd = open(&quot;/sys/class/uio/uio0/device/config&quot;, O_RDWR); 986 configfd = open(&quot;/sys/class/uio/uio0/device/config&quot;, O_RDWR);
987 if (uiofd &lt; 0) { 987 if (configfd &lt; 0) {
988 perror(&quot;config open:&quot;); 988 perror(&quot;config open:&quot;);
989 return errno; 989 return errno;
990 } 990 }
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index fb32aead5a0b..bd6fee22c4dd 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -871,9 +871,8 @@
871 <para> 871 <para>
872 This function itself doesn't allocate the data space. The data 872 This function itself doesn't allocate the data space. The data
873 must be allocated manually beforehand, and its pointer is passed 873 must be allocated manually beforehand, and its pointer is passed
874 as the argument. This pointer is used as the 874 as the argument. This pointer (<parameter>chip</parameter> in the
875 (<parameter>chip</parameter> identifier in the above example) 875 above example) is used as the identifier for the instance.
876 for the instance.
877 </para> 876 </para>
878 877
879 <para> 878 <para>
@@ -2304,7 +2303,7 @@ struct _snd_pcm_runtime {
2304 <constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you 2303 <constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you
2305 have to specify whether the mmap is supported and which 2304 have to specify whether the mmap is supported and which
2306 interleaved format is supported. 2305 interleaved format is supported.
2307 When the is supported, add the 2306 When the hardware supports mmap, add the
2308 <constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the 2307 <constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the
2309 hardware supports the interleaved or the non-interleaved 2308 hardware supports the interleaved or the non-interleaved
2310 formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or 2309 formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or
@@ -2898,7 +2897,7 @@ struct _snd_pcm_runtime {
2898 2897
2899 <para> 2898 <para>
2900 When the pcm supports the pause operation (given in the info 2899 When the pcm supports the pause operation (given in the info
2901 field of the hardware table), the <constant>PAUSE_PUSE</constant> 2900 field of the hardware table), the <constant>PAUSE_PUSH</constant>
2902 and <constant>PAUSE_RELEASE</constant> commands must be 2901 and <constant>PAUSE_RELEASE</constant> commands must be
2903 handled here, too. The former is the command to pause the pcm, 2902 handled here, too. The former is the command to pause the pcm,
2904 and the latter to restart the pcm again. 2903 and the latter to restart the pcm again.
@@ -3085,7 +3084,7 @@ struct _snd_pcm_runtime {
3085 <section id="pcm-interface-interrupt-handler-timer"> 3084 <section id="pcm-interface-interrupt-handler-timer">
3086 <title>High frequency timer interrupts</title> 3085 <title>High frequency timer interrupts</title>
3087 <para> 3086 <para>
3088 This happense when the hardware doesn't generate interrupts 3087 This happens when the hardware doesn't generate interrupts
3089 at the period boundary but issues timer interrupts at a fixed 3088 at the period boundary but issues timer interrupts at a fixed
3090 timer rate (e.g. es1968 or ymfpci drivers). 3089 timer rate (e.g. es1968 or ymfpci drivers).
3091 In this case, you need to check the current hardware 3090 In this case, you need to check the current hardware
@@ -3251,18 +3250,19 @@ struct _snd_pcm_runtime {
3251 <title>Example of Hardware Constraints for Channels</title> 3250 <title>Example of Hardware Constraints for Channels</title>
3252 <programlisting> 3251 <programlisting>
3253<![CDATA[ 3252<![CDATA[
3254 static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params, 3253 static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
3255 struct snd_pcm_hw_rule *rule) 3254 struct snd_pcm_hw_rule *rule)
3256 { 3255 {
3257 struct snd_interval *c = hw_param_interval(params, 3256 struct snd_interval *c = hw_param_interval(params,
3258 SNDRV_PCM_HW_PARAM_CHANNELS); 3257 SNDRV_PCM_HW_PARAM_CHANNELS);
3259 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 3258 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
3260 struct snd_mask fmt; 3259 struct snd_interval ch;
3261 3260
3262 snd_mask_any(&fmt); /* Init the struct */ 3261 snd_interval_any(&ch);
3263 if (c->min < 2) { 3262 if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
3264 fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE; 3263 ch.min = ch.max = 1;
3265 return snd_mask_refine(f, &fmt); 3264 ch.integer = 1;
3265 return snd_interval_refine(c, &ch);
3266 } 3266 }
3267 return 0; 3267 return 0;
3268 } 3268 }
@@ -3278,35 +3278,35 @@ struct _snd_pcm_runtime {
3278 <programlisting> 3278 <programlisting>
3279<![CDATA[ 3279<![CDATA[
3280 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 3280 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
3281 hw_rule_channels_by_format, 0, SNDRV_PCM_HW_PARAM_FORMAT, 3281 hw_rule_channels_by_format, NULL,
3282 -1); 3282 SNDRV_PCM_HW_PARAM_FORMAT, -1);
3283]]> 3283]]>
3284 </programlisting> 3284 </programlisting>
3285 </informalexample> 3285 </informalexample>
3286 </para> 3286 </para>
3287 3287
3288 <para> 3288 <para>
3289 The rule function is called when an application sets the number of 3289 The rule function is called when an application sets the PCM
3290 channels. But an application can set the format before the number of 3290 format, and it refines the number of channels accordingly.
3291 channels. Thus you also need to define the inverse rule: 3291 But an application may set the number of channels before
3292 setting the format. Thus you also need to define the inverse rule:
3292 3293
3293 <example> 3294 <example>
3294 <title>Example of Hardware Constraints for Channels</title> 3295 <title>Example of Hardware Constraints for Formats</title>
3295 <programlisting> 3296 <programlisting>
3296<![CDATA[ 3297<![CDATA[
3297 static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params, 3298 static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
3298 struct snd_pcm_hw_rule *rule) 3299 struct snd_pcm_hw_rule *rule)
3299 { 3300 {
3300 struct snd_interval *c = hw_param_interval(params, 3301 struct snd_interval *c = hw_param_interval(params,
3301 SNDRV_PCM_HW_PARAM_CHANNELS); 3302 SNDRV_PCM_HW_PARAM_CHANNELS);
3302 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 3303 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
3303 struct snd_interval ch; 3304 struct snd_mask fmt;
3304 3305
3305 snd_interval_any(&ch); 3306 snd_mask_any(&fmt); /* Init the struct */
3306 if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) { 3307 if (c->min < 2) {
3307 ch.min = ch.max = 1; 3308 fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
3308 ch.integer = 1; 3309 return snd_mask_refine(f, &fmt);
3309 return snd_interval_refine(c, &ch);
3310 } 3310 }
3311 return 0; 3311 return 0;
3312 } 3312 }
@@ -3321,8 +3321,8 @@ struct _snd_pcm_runtime {
3321 <programlisting> 3321 <programlisting>
3322<![CDATA[ 3322<![CDATA[
3323 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT, 3323 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
3324 hw_rule_format_by_channels, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 3324 hw_rule_format_by_channels, NULL,
3325 -1); 3325 SNDRV_PCM_HW_PARAM_CHANNELS, -1);
3326]]> 3326]]>
3327 </programlisting> 3327 </programlisting>
3328 </informalexample> 3328 </informalexample>