aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl')
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl10
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 0475478c2484..24e85520890b 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -447,7 +447,7 @@
447 .... 447 ....
448 448
449 /* allocate a chip-specific data with zero filled */ 449 /* allocate a chip-specific data with zero filled */
450 chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); 450 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
451 if (chip == NULL) 451 if (chip == NULL)
452 return -ENOMEM; 452 return -ENOMEM;
453 453
@@ -949,7 +949,7 @@
949 After allocating a card instance via 949 After allocating a card instance via
950 <function>snd_card_new()</function> (with 950 <function>snd_card_new()</function> (with
951 <constant>NULL</constant> on the 4th arg), call 951 <constant>NULL</constant> on the 4th arg), call
952 <function>kcalloc()</function>. 952 <function>kzalloc()</function>.
953 953
954 <informalexample> 954 <informalexample>
955 <programlisting> 955 <programlisting>
@@ -958,7 +958,7 @@
958 mychip_t *chip; 958 mychip_t *chip;
959 card = snd_card_new(index[dev], id[dev], THIS_MODULE, NULL); 959 card = snd_card_new(index[dev], id[dev], THIS_MODULE, NULL);
960 ..... 960 .....
961 chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); 961 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
962]]> 962]]>
963 </programlisting> 963 </programlisting>
964 </informalexample> 964 </informalexample>
@@ -1136,7 +1136,7 @@
1136 return -ENXIO; 1136 return -ENXIO;
1137 } 1137 }
1138 1138
1139 chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); 1139 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
1140 if (chip == NULL) { 1140 if (chip == NULL) {
1141 pci_disable_device(pci); 1141 pci_disable_device(pci);
1142 return -ENOMEM; 1142 return -ENOMEM;
@@ -1292,7 +1292,7 @@
1292 need to initialize this number as -1 before actual allocation, 1292 need to initialize this number as -1 before actual allocation,
1293 since irq 0 is valid. The port address and its resource pointer 1293 since irq 0 is valid. The port address and its resource pointer
1294 can be initialized as null by 1294 can be initialized as null by
1295 <function>kcalloc()</function> automatically, so you 1295 <function>kzalloc()</function> automatically, so you
1296 don't have to take care of resetting them. 1296 don't have to take care of resetting them.
1297 </para> 1297 </para>
1298 1298