diff options
author | Alexander Viro <viro@www.linux.org.uk> | 2004-07-26 06:58:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-26 06:58:06 -0700 |
commit | 66390192f392e8b0333a88eebb8b77b28f25265b (patch) | |
tree | eb55651b33ebe323d7fc0a5cbb92d773d4b148ad /sound | |
parent | b5578b5e83e5b7d8401ee832b6142775d2f1f6fa (diff) | |
download | history-66390192f392e8b0333a88eebb8b77b28f25265b.tar.gz |
[PATCH] more NULL noise removal in sound/*
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/oss/pcm_oss.c | 6 | ||||
-rw-r--r-- | sound/core/pcm.c | 12 | ||||
-rw-r--r-- | sound/drivers/vx/vx_pcm.c | 16 | ||||
-rw-r--r-- | sound/isa/gus/gus_mem.c | 2 | ||||
-rw-r--r-- | sound/isa/sb/emu8000_pcm.c | 2 | ||||
-rw-r--r-- | sound/isa/sb/sb8_main.c | 4 | ||||
-rw-r--r-- | sound/isa/wavefront/wavefront_synth.c | 24 | ||||
-rw-r--r-- | sound/oss/ad1816.c | 4 | ||||
-rw-r--r-- | sound/oss/ad1848.c | 2 | ||||
-rw-r--r-- | sound/oss/ad1889.c | 6 | ||||
-rw-r--r-- | sound/oss/ali5455.c | 4 | ||||
-rw-r--r-- | sound/oss/cs46xx.c | 4 | ||||
-rw-r--r-- | sound/oss/cs46xxpm-24.h | 2 | ||||
-rw-r--r-- | sound/oss/dmasound/dmasound_awacs.c | 24 | ||||
-rw-r--r-- | sound/oss/dmasound/dmasound_core.c | 4 | ||||
-rw-r--r-- | sound/oss/emu10k1/main.c | 8 | ||||
-rw-r--r-- | sound/oss/emu10k1/midi.c | 2 | ||||
-rw-r--r-- | sound/oss/forte.c | 6 | ||||
-rw-r--r-- | sound/oss/i810_audio.c | 4 | ||||
-rw-r--r-- | sound/oss/sb_common.c | 2 | ||||
-rw-r--r-- | sound/oss/wavfront.c | 24 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1712.c | 2 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1724.c | 2 | ||||
-rw-r--r-- | sound/pci/intel8x0m.c | 2 | ||||
-rw-r--r-- | sound/pci/maestro3.c | 2 | ||||
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 14 | ||||
-rw-r--r-- | sound/pci/sonicvibes.c | 2 | ||||
-rw-r--r-- | sound/ppc/pmac.c | 4 |
28 files changed, 95 insertions, 95 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 6130c578afacf7..099d230f3e0715 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -672,7 +672,7 @@ snd_pcm_sframes_t snd_pcm_oss_read3(snd_pcm_substream_t *substream, char *ptr, s else printk("pcm_oss: read: recovering from SUSPEND\n"); #endif - ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, 0); + ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL); if (ret < 0) break; } else if (runtime->status->state == SNDRV_PCM_STATE_SETUP) { @@ -693,7 +693,7 @@ snd_pcm_sframes_t snd_pcm_oss_read3(snd_pcm_substream_t *substream, char *ptr, s } if (ret == -EPIPE) { if (runtime->status->state == SNDRV_PCM_STATE_DRAINING) { - ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, 0); + ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL); if (ret < 0) break; } @@ -754,7 +754,7 @@ snd_pcm_sframes_t snd_pcm_oss_readv3(snd_pcm_substream_t *substream, void **bufs else printk("pcm_oss: readv: recovering from SUSPEND\n"); #endif - ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, 0); + ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL); if (ret < 0) break; } else if (runtime->status->state == SNDRV_PCM_STATE_SETUP) { diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 7f1bf94e0e4cd1..8ee8fa7090125f 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -202,37 +202,37 @@ char *snd_pcm_tstamp_mode_names[] = { const char *snd_pcm_stream_name(snd_pcm_stream_t stream) { - snd_assert(stream <= SNDRV_PCM_STREAM_LAST, return 0); + snd_assert(stream <= SNDRV_PCM_STREAM_LAST, return NULL); return snd_pcm_stream_names[stream]; } const char *snd_pcm_access_name(snd_pcm_access_t access) { - snd_assert(access <= SNDRV_PCM_ACCESS_LAST, return 0); + snd_assert(access <= SNDRV_PCM_ACCESS_LAST, return NULL); return snd_pcm_access_names[access]; } const char *snd_pcm_format_name(snd_pcm_format_t format) { - snd_assert(format <= SNDRV_PCM_FORMAT_LAST, return 0); + snd_assert(format <= SNDRV_PCM_FORMAT_LAST, return NULL); return snd_pcm_format_names[format]; } const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat) { - snd_assert(subformat <= SNDRV_PCM_SUBFORMAT_LAST, return 0); + snd_assert(subformat <= SNDRV_PCM_SUBFORMAT_LAST, return NULL); return snd_pcm_subformat_names[subformat]; } const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode) { - snd_assert(mode <= SNDRV_PCM_TSTAMP_LAST, return 0); + snd_assert(mode <= SNDRV_PCM_TSTAMP_LAST, return NULL); return snd_pcm_tstamp_mode_names[mode]; } const char *snd_pcm_state_name(snd_pcm_state_t state) { - snd_assert(state <= SNDRV_PCM_STATE_LAST, return 0); + snd_assert(state <= SNDRV_PCM_STATE_LAST, return NULL); return snd_pcm_state_names[state]; } diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 9ee1c80efb6ae4..2f7d85f64f134c 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -465,7 +465,7 @@ static int vx_alloc_pipe(vx_core_t *chip, int capture, struct vx_rmh rmh; int data_mode; - *pipep = 0; + *pipep = NULL; vx_init_rmh(&rmh, CMD_RES_PIPE); vx_set_pipe_cmd_params(&rmh, capture, audioid, num_audio); #if 0 // NYI @@ -581,7 +581,7 @@ static int vx_pcm_playback_open(snd_pcm_substream_t *subs) { snd_pcm_runtime_t *runtime = subs->runtime; vx_core_t *chip = snd_pcm_substream_chip(subs); - vx_pipe_t *pipe = 0; + vx_pipe_t *pipe = NULL; unsigned int audio; int err; @@ -632,7 +632,7 @@ static int vx_pcm_playback_close(snd_pcm_substream_t *subs) pipe = snd_magic_cast(vx_pipe_t, subs->runtime->private_data, return -EINVAL); if (--pipe->references == 0) { - chip->playback_pipes[pipe->number] = 0; + chip->playback_pipes[pipe->number] = NULL; vx_free_pipe(chip, pipe); } @@ -1038,7 +1038,7 @@ static int vx_pcm_capture_close(snd_pcm_substream_t *subs) if (! subs->runtime->private_data) return -EINVAL; pipe = snd_magic_cast(vx_pipe_t, subs->runtime->private_data, return -EINVAL); - chip->capture_pipes[pipe->number] = 0; + chip->capture_pipes[pipe->number] = NULL; pipe_out_monitoring = pipe->monitoring_pipe; @@ -1049,8 +1049,8 @@ static int vx_pcm_capture_close(snd_pcm_substream_t *subs) if (pipe_out_monitoring) { if (--pipe_out_monitoring->references == 0) { vx_free_pipe(chip, pipe_out_monitoring); - chip->playback_pipes[pipe->number] = 0; - pipe->monitoring_pipe = 0; + chip->playback_pipes[pipe->number] = NULL; + pipe->monitoring_pipe = NULL; } } @@ -1269,11 +1269,11 @@ static void snd_vx_pcm_free(snd_pcm_t *pcm) chip->pcm[pcm->device] = NULL; if (chip->playback_pipes) { kfree(chip->playback_pipes); - chip->playback_pipes = 0; + chip->playback_pipes = NULL; } if (chip->capture_pipes) { kfree(chip->capture_pipes); - chip->capture_pipes = 0; + chip->capture_pipes = NULL; } } diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index b1f6487c4c950e..783f5dd4fcd3a5 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c @@ -59,7 +59,7 @@ snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc, else nblock->prev->next = nblock; up(&alloc->memory_mutex); - return 0; + return NULL; } pblock = pblock->next; } diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c index 4d84f25198dc68..5c4def8d05c305 100644 --- a/sound/isa/sb/emu8000_pcm.c +++ b/sound/isa/sb/emu8000_pcm.c @@ -264,7 +264,7 @@ static int emu8k_pcm_close(snd_pcm_substream_t *subs) emu8k_pcm_t *rec = subs->runtime->private_data; if (rec) kfree(rec); - subs->runtime->private_data = 0; + subs->runtime->private_data = NULL; return 0; } diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c index 25cdd024b9dc19..bac9f16107250c 100644 --- a/sound/isa/sb/sb8_main.c +++ b/sound/isa/sb/sb8_main.c @@ -452,11 +452,11 @@ int snd_sb8_open(snd_pcm_substream_t *substream) runtime->hw.rate_max = 44100; runtime->hw.channels_max = 2; snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, - snd_sb8_hw_constraint_rate_channels, 0, + snd_sb8_hw_constraint_rate_channels, NULL, SNDRV_PCM_HW_PARAM_CHANNELS, SNDRV_PCM_HW_PARAM_RATE, -1); snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, - snd_sb8_hw_constraint_channels_rate, 0, + snd_sb8_hw_constraint_channels_rate, NULL, SNDRV_PCM_HW_PARAM_RATE, -1); break; case SB_HW_201: diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 9b65db0b194158..814edffd295c42 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c @@ -165,7 +165,7 @@ static struct { { 0x0E, "Bad MIDI channel number" }, { 0x10, "Download Record Error" }, { 0x80, "Success" }, - { 0x0, 0x0 } + { 0x0 } }; #define NEEDS_ACK 1 @@ -361,7 +361,7 @@ snd_wavefront_cmd (snd_wavefront_t *dev, if (cmd == WFC_DOWNLOAD_MULTISAMPLE) { wfcmd->write_cnt = (unsigned long) rbuf; - rbuf = 0; + rbuf = NULL; } DPRINT (WF_DEBUG_CMD, "0x%x [%s] (%d,%d,%d)\n", @@ -612,7 +612,7 @@ wavefront_delete_sample (snd_wavefront_t *dev, int sample_num) wbuf[0] = sample_num & 0x7f; wbuf[1] = sample_num >> 7; - if ((x = snd_wavefront_cmd (dev, WFC_DELETE_SAMPLE, 0, wbuf)) == 0) { + if ((x = snd_wavefront_cmd (dev, WFC_DELETE_SAMPLE, NULL, wbuf)) == 0) { dev->sample_status[sample_num] = WF_ST_EMPTY; } @@ -798,7 +798,7 @@ wavefront_send_patch (snd_wavefront_t *dev, wavefront_patch_info *header) bptr = munge_int32 (header->number, buf, 2); munge_buf ((unsigned char *)&header->hdr.p, bptr, WF_PATCH_BYTES); - if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_PATCH, 0, buf)) { + if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_PATCH, NULL, buf)) { snd_printk ("download patch failed\n"); return -(EIO); } @@ -836,7 +836,7 @@ wavefront_send_program (snd_wavefront_t *dev, wavefront_patch_info *header) buf[0] = header->number; munge_buf ((unsigned char *)&header->hdr.pr, &buf[1], WF_PROGRAM_BYTES); - if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_PROGRAM, 0, buf)) { + if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_PROGRAM, NULL, buf)) { snd_printk ("download patch failed\n"); return -(EIO); } @@ -850,7 +850,7 @@ wavefront_freemem (snd_wavefront_t *dev) { char rbuf[8]; - if (snd_wavefront_cmd (dev, WFC_REPORT_FREE_MEMORY, rbuf, 0)) { + if (snd_wavefront_cmd (dev, WFC_REPORT_FREE_MEMORY, rbuf, NULL)) { snd_printk ("can't get memory stats.\n"); return -1; } else { @@ -876,7 +876,7 @@ wavefront_send_sample (snd_wavefront_t *dev, u16 sample_short; u32 length; - u16 __user *data_end = 0; + u16 __user *data_end = NULL; unsigned int i; const unsigned int max_blksize = 4096/2; unsigned int written; @@ -1053,7 +1053,7 @@ wavefront_send_sample (snd_wavefront_t *dev, if (snd_wavefront_cmd (dev, header->size ? WFC_DOWNLOAD_SAMPLE : WFC_DOWNLOAD_SAMPLE_HEADER, - 0, sample_hdr)) { + NULL, sample_hdr)) { snd_printk ("sample %sdownload refused.\n", header->size ? "" : "header "); return -(EIO); @@ -1079,7 +1079,7 @@ wavefront_send_sample (snd_wavefront_t *dev, blocksize = ((length-written+7)&~0x7); } - if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_BLOCK, 0, 0)) { + if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_BLOCK, NULL, NULL)) { snd_printk ("download block " "request refused.\n"); return -(EIO); @@ -1186,7 +1186,7 @@ wavefront_send_alias (snd_wavefront_t *dev, wavefront_patch_info *header) munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3); munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2); - if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_SAMPLE_ALIAS, 0, alias_hdr)) { + if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_SAMPLE_ALIAS, NULL, alias_hdr)) { snd_printk ("download alias failed.\n"); return -(EIO); } @@ -1314,7 +1314,7 @@ wavefront_send_drum (snd_wavefront_t *dev, wavefront_patch_info *header) munge_int32 (((unsigned char *)drum)[i], &drumbuf[1+(i*2)], 2); } - if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_EDRUM_PROGRAM, 0, drumbuf)) { + if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_EDRUM_PROGRAM, NULL, drumbuf)) { snd_printk ("download drum failed.\n"); return -(EIO); } @@ -2085,7 +2085,7 @@ wavefront_do_reset (snd_wavefront_t *dev) voices[0] = 32; - if (snd_wavefront_cmd (dev, WFC_SET_NVOICES, 0, voices)) { + if (snd_wavefront_cmd (dev, WFC_SET_NVOICES, NULL, voices)) { snd_printk ("cannot set number of voices to 32.\n"); goto gone_bad; } diff --git a/sound/oss/ad1816.c b/sound/oss/ad1816.c index c2abdddd7fe2fe..442506444b4183 100644 --- a/sound/oss/ad1816.c +++ b/sound/oss/ad1816.c @@ -1235,10 +1235,10 @@ static struct { } isapnp_ad1816_list[] __initdata = { { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A','D','S'), ISAPNP_FUNCTION(0x7150), - 0 }, + NULL }, { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A','D','S'), ISAPNP_FUNCTION(0x7180), - 0 }, + NULL }, {0} }; diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c index 7e9e30e5b75117..af1225d9fd4e1d 100644 --- a/sound/oss/ad1848.c +++ b/sound/oss/ad1848.c @@ -2962,7 +2962,7 @@ static struct { ISAPNP_VENDOR('G','R','V'), ISAPNP_DEVICE(0x0001), ISAPNP_VENDOR('G','R','V'), ISAPNP_FUNCTION(0x0000), 0, 0, 0, 1, 0}, - {0} + {NULL} }; static struct isapnp_device_id id_table[] __devinitdata = { diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c index a8c195f2c6f060..6e8be40abafe88 100644 --- a/sound/oss/ad1889.c +++ b/sound/oss/ad1889.c @@ -338,7 +338,7 @@ int ad1889_read_proc (char *page, char **start, off_t off, { "AC97_3D_CONTROL", 0x100 + AC97_3D_CONTROL, 16 }, { "AC97_MODEM_RATE", 0x100 + AC97_MODEM_RATE, 16 }, { "AC97_POWER_CONTROL", 0x100 + AC97_POWER_CONTROL, 16 }, - { 0 } + { NULL } }; if (dev == NULL) @@ -1017,7 +1017,7 @@ static int __devinit ad1889_probe(struct pci_dev *pcidev, const struct pci_devic if ((err = ad1889_ac97_init(dev, 0)) != 0) goto err_free_dsp; - if (((proc_root = proc_mkdir("driver/ad1889", 0)) == NULL) || + if (((proc_root = proc_mkdir("driver/ad1889", NULL)) == NULL) || create_proc_read_entry("ac97", S_IFREG|S_IRUGO, proc_root, ac97_read_proc, dev->ac97_codec) == NULL || create_proc_read_entry("info", S_IFREG|S_IRUGO, proc_root, ad1889_read_proc, dev) == NULL) goto err_free_dsp; @@ -1038,7 +1038,7 @@ err_free_irq: err_free_mem: ad1889_free_dev(dev); - pci_set_drvdata(pcidev, 0); + pci_set_drvdata(pcidev, NULL); return -ENODEV; } diff --git a/sound/oss/ali5455.c b/sound/oss/ali5455.c index 3f3a456b3d7ef6..0d1e9dce269e06 100644 --- a/sound/oss/ali5455.c +++ b/sound/oss/ali5455.c @@ -1583,7 +1583,7 @@ static ssize_t ali_read(struct file *file, char __user *buffer, size_t count, loff_t * ppos) { struct ali_state *state = (struct ali_state *) file->private_data; - struct ali_card *card = state ? state->card : 0; + struct ali_card *card = state ? state->card : NULL; struct dmabuf *dmabuf = &state->dmabuf; ssize_t ret; unsigned long flags; @@ -1724,7 +1724,7 @@ static ssize_t ali_write(struct file *file, const char __user *buffer, size_t count, loff_t * ppos) { struct ali_state *state = (struct ali_state *) file->private_data; - struct ali_card *card = state ? state->card : 0; + struct ali_card *card = state ? state->card : NULL; struct dmabuf *dmabuf = &state->dmabuf; ssize_t ret; unsigned long flags; diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c index aa1455a35caf68..676f9881fc78d7 100644 --- a/sound/oss/cs46xx.c +++ b/sound/oss/cs46xx.c @@ -2480,7 +2480,7 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un { struct cs_card *card = (struct cs_card *)file->private_data; struct cs_state *state; - struct dmabuf *dmabuf=0; + struct dmabuf *dmabuf=NULL; unsigned long flags; audio_buf_info abinfo; count_info cinfo; @@ -4271,7 +4271,7 @@ static int __init cs_ac97_init(struct cs_card *card) CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO "cs46xx: cs_ac97_init()- codec number %d not found\n", num_ac97) ); - card->ac97_codec[num_ac97] = 0; + card->ac97_codec[num_ac97] = NULL; break; } CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO diff --git a/sound/oss/cs46xxpm-24.h b/sound/oss/cs46xxpm-24.h index 9774add1d427aa..f1aed86c721a7a 100644 --- a/sound/oss/cs46xxpm-24.h +++ b/sound/oss/cs46xxpm-24.h @@ -38,7 +38,7 @@ */ static int cs46xx_suspend_tbl(struct pci_dev *pcidev, u32 state); static int cs46xx_resume_tbl(struct pci_dev *pcidev); -#define cs_pm_register(a, b, c) 0 +#define cs_pm_register(a, b, c) NULL #define cs_pm_unregister_all(a) #define CS46XX_SUSPEND_TBL cs46xx_suspend_tbl #define CS46XX_RESUME_TBL cs46xx_resume_tbl diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index a434e454e1c954..8d89061f16dbf3 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c @@ -461,7 +461,7 @@ tas_dmasound_init(void) write_audio_gpio(gpio_audio_reset, !gpio_audio_reset_pol); msleep(100); if (gpio_headphone_irq) { - if (request_irq(gpio_headphone_irq,headphone_intr,0,"Headphone detect",0) < 0) { + if (request_irq(gpio_headphone_irq,headphone_intr,0,"Headphone detect",NULL) < 0) { printk(KERN_ERR "tumbler: Can't request headphone interrupt\n"); gpio_headphone_irq = 0; } else { @@ -470,7 +470,7 @@ tas_dmasound_init(void) val = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio_headphone_detect, 0); pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio_headphone_detect, val | 0x80); /* Trigger it */ - headphone_intr(0,0,0); + headphone_intr(0,NULL,NULL); } } if (!gpio_headphone_irq) { @@ -487,7 +487,7 @@ static int tas_dmasound_cleanup(void) { if (gpio_headphone_irq) - free_irq(gpio_headphone_irq, 0); + free_irq(gpio_headphone_irq, NULL); return 0; } @@ -627,10 +627,10 @@ static void PMacFree(void *ptr, unsigned int size) static int __init PMacIrqInit(void) { if (awacs) - if (request_irq(awacs_irq, pmac_awacs_intr, 0, "Built-in Sound misc", 0)) + if (request_irq(awacs_irq, pmac_awacs_intr, 0, "Built-in Sound misc", NULL)) return 0; - if (request_irq(awacs_tx_irq, pmac_awacs_tx_intr, 0, "Built-in Sound out", 0) - || request_irq(awacs_rx_irq, pmac_awacs_rx_intr, 0, "Built-in Sound in", 0)) + if (request_irq(awacs_tx_irq, pmac_awacs_tx_intr, 0, "Built-in Sound out", NULL) + || request_irq(awacs_rx_irq, pmac_awacs_rx_intr, 0, "Built-in Sound in", NULL)) return 0; return 1; } @@ -656,9 +656,9 @@ static void PMacIrqCleanup(void) msleep(200); } if (awacs) - free_irq(awacs_irq, 0); - free_irq(awacs_tx_irq, 0); - free_irq(awacs_rx_irq, 0); + free_irq(awacs_irq, NULL); + free_irq(awacs_tx_irq, NULL); + free_irq(awacs_rx_irq, NULL); if (awacs) iounmap((void *)awacs); @@ -1504,7 +1504,7 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when) write_audio_gpio(gpio_audio_reset, !gpio_audio_reset_pol); msleep(150); tas_leave_sleep(); /* Stub for now */ - headphone_intr(0,0,0); + headphone_intr(0,NULL,NULL); break; case AWACS_DACA: msleep(10); /* Check this !!! */ @@ -2969,7 +2969,7 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev); sound_device_id = 0; /* device ID appears post g3 b&w */ - prop = (unsigned int *)get_property(info, "device-id", 0); + prop = (unsigned int *)get_property(info, "device-id", NULL); if (prop != 0) sound_device_id = *prop; @@ -3080,7 +3080,7 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev); } else if (is_pbook_g3) { struct device_node* mio; - macio_base = 0; + macio_base = NULL; for (mio = io->parent; mio; mio = mio->parent) { if (strcmp(mio->name, "mac-io") == 0 && mio->n_addrs > 0) { diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 758ea0cd5cd21d..46b5c514a7bb52 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c @@ -425,7 +425,7 @@ static int sq_allocate_buffers(struct sound_queue *sq, int num, int size) while (i--) dmasound.mach.dma_free(sq->buffers[i], size); kfree(sq->buffers); - sq->buffers = 0; + sq->buffers = NULL; return -ENOMEM; } } @@ -447,7 +447,7 @@ static void sq_release_buffers(struct sound_queue *sq) static int sq_setup(struct sound_queue *sq) { - int (*setup_func)(void) = 0; + int (*setup_func)(void) = NULL; int hard_frame ; if (sq->locked) { /* are we already set? - and not changeable */ diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c index f899b8d07da592..8f6f2df002d5b5 100644 --- a/sound/oss/emu10k1/main.c +++ b/sound/oss/emu10k1/main.c @@ -342,26 +342,26 @@ static int __devinit emu10k1_proc_init(struct emu10k1_card *card) { char s[48]; - if (!proc_mkdir ("driver/emu10k1", 0)) { + if (!proc_mkdir ("driver/emu10k1", NULL)) { printk(KERN_ERR "emu10k1: unable to create proc directory driver/emu10k1\n"); goto err_out; } sprintf(s, "driver/emu10k1/%s", pci_name(card->pci_dev)); - if (!proc_mkdir (s, 0)) { + if (!proc_mkdir (s, NULL)) { printk(KERN_ERR "emu10k1: unable to create proc directory %s\n", s); goto err_emu10k1_proc; } sprintf(s, "driver/emu10k1/%s/info", pci_name(card->pci_dev)); - if (!create_proc_read_entry (s, 0, 0, emu10k1_info_proc, card)) { + if (!create_proc_read_entry (s, 0, NULL, emu10k1_info_proc, card)) { printk(KERN_ERR "emu10k1: unable to create proc entry %s\n", s); goto err_dev_proc; } if (!card->is_aps) { sprintf(s, "driver/emu10k1/%s/ac97", pci_name(card->pci_dev)); - if (!create_proc_read_entry (s, 0, 0, ac97_read_proc, card->ac97)) { + if (!create_proc_read_entry (s, 0, NULL, ac97_read_proc, card->ac97)) { printk(KERN_ERR "emu10k1: unable to create proc entry %s\n", s); goto err_proc_ac97; } diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c index 1aa768f2eaa762..0f220081e878ed 100644 --- a/sound/oss/emu10k1/midi.c +++ b/sound/oss/emu10k1/midi.c @@ -532,7 +532,7 @@ void emu10k1_seq_midi_close(int dev) if (card->seq_mididev) { kfree(card->seq_mididev); - card->seq_mididev = 0; + card->seq_mididev = NULL; } } diff --git a/sound/oss/forte.c b/sound/oss/forte.c index c7e23fc3c69daa..0d91bbf832f2f0 100644 --- a/sound/oss/forte.c +++ b/sound/oss/forte.c @@ -1847,15 +1847,15 @@ forte_proc_read (char *page, char **start, off_t off, int count, static int __init forte_proc_init (void) { - if (!proc_mkdir ("driver/forte", 0)) + if (!proc_mkdir ("driver/forte", NULL)) return -EIO; - if (!create_proc_read_entry ("driver/forte/chip", 0, 0, forte_proc_read, forte)) { + if (!create_proc_read_entry ("driver/forte/chip", 0, NULL, forte_proc_read, forte)) { remove_proc_entry ("driver/forte", NULL); return -EIO; } - if (!create_proc_read_entry("driver/forte/ac97", 0, 0, ac97_read_proc, forte->ac97)) { + if (!create_proc_read_entry("driver/forte/ac97", 0, NULL, ac97_read_proc, forte->ac97)) { remove_proc_entry ("driver/forte/chip", NULL); remove_proc_entry ("driver/forte", NULL); return -EIO; diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index e4f8542b320cf8..0470288432e05b 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -1396,7 +1396,7 @@ static irqreturn_t i810_interrupt(int irq, void *dev_id, struct pt_regs *regs) static ssize_t i810_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) { struct i810_state *state = (struct i810_state *)file->private_data; - struct i810_card *card=state ? state->card : 0; + struct i810_card *card=state ? state->card : NULL; struct dmabuf *dmabuf = &state->dmabuf; ssize_t ret; unsigned long flags; @@ -1536,7 +1536,7 @@ static ssize_t i810_read(struct file *file, char __user *buffer, size_t count, l static ssize_t i810_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { struct i810_state *state = (struct i810_state *)file->private_data; - struct i810_card *card=state ? state->card : 0; + struct i810_card *card=state ? state->card : NULL; struct dmabuf *dmabuf = &state->dmabuf; ssize_t ret; unsigned long flags; diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c index 249d69cbb8a6e3..1ab1eb129ff67c 100644 --- a/sound/oss/sb_common.c +++ b/sound/oss/sb_common.c @@ -1206,7 +1206,7 @@ int probe_sbmpu(struct address_info *hw_config, struct module *owner) if (last_devc == NULL) return 0; - last_devc = 0; + last_devc = NULL; if (hw_config->io_base <= 0) { diff --git a/sound/oss/wavfront.c b/sound/oss/wavfront.c index e7932229e6b6f4..e0ecd44a3577e1 100644 --- a/sound/oss/wavfront.c +++ b/sound/oss/wavfront.c @@ -312,7 +312,7 @@ static struct { { 0x0E, "Bad MIDI channel number" }, { 0x10, "Download Record Error" }, { 0x80, "Success" }, - { 0x0, 0x0 } + { 0 } }; #define NEEDS_ACK 1 @@ -493,7 +493,7 @@ wavefront_cmd (int cmd, unsigned char *rbuf, unsigned char *wbuf) if (cmd == WFC_DOWNLOAD_MULTISAMPLE) { wfcmd->write_cnt = (unsigned int) rbuf; - rbuf = 0; + rbuf = NULL; } DPRINT (WF_DEBUG_CMD, "0x%x [%s] (%d,%d,%d)\n", @@ -745,7 +745,7 @@ wavefront_delete_sample (int sample_num) wbuf[0] = sample_num & 0x7f; wbuf[1] = sample_num >> 7; - if ((x = wavefront_cmd (WFC_DELETE_SAMPLE, 0, wbuf)) == 0) { + if ((x = wavefront_cmd (WFC_DELETE_SAMPLE, NULL, wbuf)) == 0) { dev.sample_status[sample_num] = WF_ST_EMPTY; } @@ -934,7 +934,7 @@ wavefront_send_patch (wavefront_patch_info *header) bptr = munge_int32 (header->number, buf, 2); munge_buf ((unsigned char *)&header->hdr.p, bptr, WF_PATCH_BYTES); - if (wavefront_cmd (WFC_DOWNLOAD_PATCH, 0, buf)) { + if (wavefront_cmd (WFC_DOWNLOAD_PATCH, NULL, buf)) { printk (KERN_ERR LOGNAME "download patch failed\n"); return -(EIO); } @@ -972,7 +972,7 @@ wavefront_send_program (wavefront_patch_info *header) buf[0] = header->number; munge_buf ((unsigned char *)&header->hdr.pr, &buf[1], WF_PROGRAM_BYTES); - if (wavefront_cmd (WFC_DOWNLOAD_PROGRAM, 0, buf)) { + if (wavefront_cmd (WFC_DOWNLOAD_PROGRAM, NULL, buf)) { printk (KERN_WARNING LOGNAME "download patch failed\n"); return -(EIO); } @@ -986,7 +986,7 @@ wavefront_freemem (void) { char rbuf[8]; - if (wavefront_cmd (WFC_REPORT_FREE_MEMORY, rbuf, 0)) { + if (wavefront_cmd (WFC_REPORT_FREE_MEMORY, rbuf, NULL)) { printk (KERN_WARNING LOGNAME "can't get memory stats.\n"); return -1; } else { @@ -1011,7 +1011,7 @@ wavefront_send_sample (wavefront_patch_info *header, UINT16 sample_short; UINT32 length; - UINT16 __user *data_end = 0; + UINT16 __user *data_end = NULL; unsigned int i; const int max_blksize = 4096/2; unsigned int written; @@ -1188,7 +1188,7 @@ wavefront_send_sample (wavefront_patch_info *header, if (wavefront_cmd (header->size ? WFC_DOWNLOAD_SAMPLE : WFC_DOWNLOAD_SAMPLE_HEADER, - 0, sample_hdr)) { + NULL, sample_hdr)) { printk (KERN_WARNING LOGNAME "sample %sdownload refused.\n", header->size ? "" : "header "); return -(EIO); @@ -1214,7 +1214,7 @@ wavefront_send_sample (wavefront_patch_info *header, blocksize = ((length-written+7)&~0x7); } - if (wavefront_cmd (WFC_DOWNLOAD_BLOCK, 0, 0)) { + if (wavefront_cmd (WFC_DOWNLOAD_BLOCK, NULL, NULL)) { printk (KERN_WARNING LOGNAME "download block " "request refused.\n"); return -(EIO); @@ -1321,7 +1321,7 @@ wavefront_send_alias (wavefront_patch_info *header) munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3); munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2); - if (wavefront_cmd (WFC_DOWNLOAD_SAMPLE_ALIAS, 0, alias_hdr)) { + if (wavefront_cmd (WFC_DOWNLOAD_SAMPLE_ALIAS, NULL, alias_hdr)) { printk (KERN_ERR LOGNAME "download alias failed.\n"); return -(EIO); } @@ -1445,7 +1445,7 @@ wavefront_send_drum (wavefront_patch_info *header) munge_int32 (((unsigned char *)drum)[i], &drumbuf[1+(i*2)], 2); } - if (wavefront_cmd (WFC_DOWNLOAD_EDRUM_PROGRAM, 0, drumbuf)) { + if (wavefront_cmd (WFC_DOWNLOAD_EDRUM_PROGRAM, NULL, drumbuf)) { printk (KERN_ERR LOGNAME "download drum failed.\n"); return -(EIO); } @@ -2738,7 +2738,7 @@ static int __init wavefront_do_reset (int atboot) voices[0] = 32; - if (wavefront_cmd (WFC_SET_NVOICES, 0, voices)) { + if (wavefront_cmd (WFC_SET_NVOICES, NULL, voices)) { printk (KERN_WARNING LOGNAME "cannot set number of voices to 32.\n"); goto gone_bad; diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 08b94db6892fb6..d1f1ec28a8bee7 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c @@ -2295,7 +2295,7 @@ static struct snd_ice1712_card_info *card_tables[] __devinitdata = { snd_ice1712_hoontech_cards, snd_ice1712_delta_cards, snd_ice1712_ews_cards, - 0, + NULL, }; static unsigned char __devinit snd_ice1712_read_i2c(ice1712_t *ice, diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index d36739ec977ee4..60fb189807e101 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c @@ -1815,7 +1815,7 @@ static struct snd_ice1712_card_info *card_tables[] __devinitdata = { snd_vt1724_revo_cards, snd_vt1724_amp_cards, snd_vt1724_aureon_cards, - 0, + NULL, }; diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 6046ac13a6da7e..b09b6f7f80d4f4 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c @@ -1328,7 +1328,7 @@ static struct shortname_table { { 0x5455, "ALi M5455" }, { 0x746d, "AMD AMD8111" }, #endif - { 0, 0 }, + { 0 }, }; static int __devinit snd_intel8x0m_probe(struct pci_dev *pci, diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 8c0bc769499aeb..eabfcd30db353d 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c @@ -968,7 +968,7 @@ static struct m3_quirk m3_quirk_list[] = { .amp_gpio = 0x03, }, /* END */ - { 0 } + { NULL } }; diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index c91602c1226eb6..628516c8b4816a 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c @@ -4971,16 +4971,16 @@ static int __devinit snd_hdsp_create(snd_card_t *card, hdsp->irq = -1; hdsp->state = 0; - hdsp->midi[0].rmidi = 0; - hdsp->midi[1].rmidi = 0; - hdsp->midi[0].input = 0; - hdsp->midi[1].input = 0; - hdsp->midi[0].output = 0; - hdsp->midi[1].output = 0; + hdsp->midi[0].rmidi = NULL; + hdsp->midi[1].rmidi = NULL; + hdsp->midi[0].input = NULL; + hdsp->midi[1].input = NULL; + hdsp->midi[0].output = NULL; + hdsp->midi[1].output = NULL; spin_lock_init(&hdsp->midi[0].lock); spin_lock_init(&hdsp->midi[1].lock); hdsp->iobase = 0; - hdsp->res_port = 0; + hdsp->res_port = NULL; hdsp->control_register = 0; hdsp->control2_register = 0; hdsp->io_type = Undefined; diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index 5f9475d2abdbbf..af77bd8035ffed 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c @@ -805,7 +805,7 @@ static int snd_sonicvibes_playback_open(snd_pcm_substream_t * substream) sonic->mode |= SV_MODE_PLAY; sonic->playback_substream = substream; runtime->hw = snd_sonicvibes_playback; - snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, snd_sonicvibes_hw_constraint_dac_rate, 0, SNDRV_PCM_HW_PARAM_RATE, -1); + snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, snd_sonicvibes_hw_constraint_dac_rate, NULL, SNDRV_PCM_HW_PARAM_RATE, -1); return 0; } diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 4f80fec4f5c7cf..6b307b064598f6 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -896,7 +896,7 @@ static int __init snd_pmac_detect(pmac_t *chip) sound = sound->next; if (! sound) return -ENODEV; - prop = (unsigned int *) get_property(sound, "sub-frame", 0); + prop = (unsigned int *) get_property(sound, "sub-frame", NULL); if (prop && *prop < 16) chip->subframe = *prop; /* This should be verified on older screamers */ @@ -938,7 +938,7 @@ static int __init snd_pmac_detect(pmac_t *chip) // chip->can_byte_swap = 0; /* FIXME: check this */ chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ } - prop = (unsigned int *)get_property(sound, "device-id", 0); + prop = (unsigned int *)get_property(sound, "device-id", NULL); if (prop) chip->device_id = *prop; chip->has_iic = (find_devices("perch") != NULL); |