Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 561b220a authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[ALSA] Replace with kzalloc() - others



Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3
OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers
AK4114 receiver,AK4117 receiver,PDAudioCF driver,PPC PMAC driver
SPARC AMD7930 driver,SPARC cs4231 driver,Synth,Common EMU synth
USB generic driver,USB USX2Y
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e560d8d8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@
          ....

          /* allocate a chip-specific data with zero filled */
          chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
          chip = kzalloc(sizeof(*chip), GFP_KERNEL);
          if (chip == NULL)
                  return -ENOMEM;

@@ -949,7 +949,7 @@
          After allocating a card instance via
          <function>snd_card_new()</function> (with
          <constant>NULL</constant> on the 4th arg), call
          <function>kcalloc()</function>. 
          <function>kzalloc()</function>. 

          <informalexample>
            <programlisting>
@@ -958,7 +958,7 @@
  mychip_t *chip;
  card = snd_card_new(index[dev], id[dev], THIS_MODULE, NULL);
  .....
  chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
  chip = kzalloc(sizeof(*chip), GFP_KERNEL);
]]>
            </programlisting>
          </informalexample>
@@ -1136,7 +1136,7 @@
                  return -ENXIO;
          }

          chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
          chip = kzalloc(sizeof(*chip), GFP_KERNEL);
          if (chip == NULL) {
                  pci_disable_device(pci);
                  return -ENOMEM;
@@ -1292,7 +1292,7 @@
      need to initialize this number as -1 before actual allocation,
      since irq 0 is valid. The port address and its resource pointer
      can be initialized as null by
      <function>kcalloc()</function> automatically, so you
      <function>kzalloc()</function> automatically, so you
      don't have to take care of resetting them. 
      </para>

+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
 *                              merged HAL layer (patches from Brian)
 */

/* $Id: sa11xx-uda1341.c,v 1.22 2005/09/05 16:17:58 tiwai Exp $ */
/* $Id: sa11xx-uda1341.c,v 1.23 2005/09/09 13:22:34 tiwai Exp $ */

/***************************************************************************************************
*
@@ -918,7 +918,7 @@ static int __init sa11xx_uda1341_init(void)
	if (card == NULL)
		return -ENOMEM;

	sa11xx_uda1341 = kcalloc(1, sizeof(*sa11xx_uda1341), GFP_KERNEL);
	sa11xx_uda1341 = kzalloc(sizeof(*sa11xx_uda1341), GFP_KERNEL);
	if (sa11xx_uda1341 == NULL)
		return -ENOMEM;	
	spin_lock_init(&chip->s[0].dma_lock);
+2 −2
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream)
	snd_card_dummy_pcm_t *dpcm;
	int err;

	dpcm = kcalloc(1, sizeof(*dpcm), GFP_KERNEL);
	dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
	if (dpcm == NULL)
		return -ENOMEM;
	init_timer(&dpcm->timer);
@@ -368,7 +368,7 @@ static int snd_card_dummy_capture_open(snd_pcm_substream_t * substream)
	snd_card_dummy_pcm_t *dpcm;
	int err;

	dpcm = kcalloc(1, sizeof(*dpcm), GFP_KERNEL);
	dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
	if (dpcm == NULL)
		return -ENOMEM;
	init_timer(&dpcm->timer);
+1 −1
Original line number Diff line number Diff line
@@ -463,7 +463,7 @@ int snd_mpu401_uart_new(snd_card_t * card, int device,
		*rrawmidi = NULL;
	if ((err = snd_rawmidi_new(card, "MPU-401U", device, 1, 1, &rmidi)) < 0)
		return err;
	mpu = kcalloc(1, sizeof(*mpu), GFP_KERNEL);
	mpu = kzalloc(sizeof(*mpu), GFP_KERNEL);
	if (mpu == NULL) {
		snd_device_free(card, rmidi);
		return -ENOMEM;
+1 −1
Original line number Diff line number Diff line
@@ -688,7 +688,7 @@ static int snd_mtpav_get_RAWMIDI(mtpav_t * mcard)

static mtpav_t *new_mtpav(void)
{
	mtpav_t *ncrd = kcalloc(1, sizeof(*ncrd), GFP_KERNEL);
	mtpav_t *ncrd = kzalloc(sizeof(*ncrd), GFP_KERNEL);
	if (ncrd != NULL) {
		spin_lock_init(&ncrd->spinlock);

Loading