diff options
Diffstat (limited to 'sound/oss')
-rw-r--r-- | sound/oss/ad1848.c | 2 | ||||
-rw-r--r-- | sound/oss/cs4232.c | 2 | ||||
-rw-r--r-- | sound/oss/emu10k1/audio.c | 6 | ||||
-rw-r--r-- | sound/oss/emu10k1/cardmi.c | 2 | ||||
-rw-r--r-- | sound/oss/emu10k1/cardmo.c | 2 | ||||
-rw-r--r-- | sound/oss/emu10k1/midi.c | 10 | ||||
-rw-r--r-- | sound/oss/emu10k1/mixer.c | 2 | ||||
-rw-r--r-- | sound/oss/hal2.c | 2 | ||||
-rw-r--r-- | sound/oss/mpu401.c | 2 | ||||
-rw-r--r-- | sound/oss/opl3.c | 2 | ||||
-rw-r--r-- | sound/oss/sb_common.c | 2 | ||||
-rw-r--r-- | sound/oss/sb_midi.c | 4 | ||||
-rw-r--r-- | sound/oss/sb_mixer.c | 2 | ||||
-rw-r--r-- | sound/oss/v_midi.c | 2 | ||||
-rw-r--r-- | sound/oss/waveartist.c | 2 |
15 files changed, 22 insertions, 22 deletions
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c index 0ffa9970bf0f..7cf9913a47b2 100644 --- a/sound/oss/ad1848.c +++ b/sound/oss/ad1848.c | |||
@@ -1992,7 +1992,7 @@ int ad1848_init (char *name, struct resource *ports, int irq, int dma_playback, | |||
1992 | devc->audio_flags |= DMA_DUPLEX; | 1992 | devc->audio_flags |= DMA_DUPLEX; |
1993 | } | 1993 | } |
1994 | 1994 | ||
1995 | portc = (ad1848_port_info *) kmalloc(sizeof(ad1848_port_info), GFP_KERNEL); | 1995 | portc = kmalloc(sizeof(ad1848_port_info), GFP_KERNEL); |
1996 | if(portc==NULL) { | 1996 | if(portc==NULL) { |
1997 | release_region(devc->base, 4); | 1997 | release_region(devc->base, 4); |
1998 | return -1; | 1998 | return -1; |
diff --git a/sound/oss/cs4232.c b/sound/oss/cs4232.c index b6924c7f1484..de40e21bf279 100644 --- a/sound/oss/cs4232.c +++ b/sound/oss/cs4232.c | |||
@@ -408,7 +408,7 @@ static int __init cs4232_pnp_probe(struct pnp_dev *dev, const struct pnp_device_ | |||
408 | { | 408 | { |
409 | struct address_info *isapnpcfg; | 409 | struct address_info *isapnpcfg; |
410 | 410 | ||
411 | isapnpcfg=(struct address_info*)kmalloc(sizeof(*isapnpcfg),GFP_KERNEL); | 411 | isapnpcfg = kmalloc(sizeof(*isapnpcfg),GFP_KERNEL); |
412 | if (!isapnpcfg) | 412 | if (!isapnpcfg) |
413 | return -ENOMEM; | 413 | return -ENOMEM; |
414 | 414 | ||
diff --git a/sound/oss/emu10k1/audio.c b/sound/oss/emu10k1/audio.c index 49f902f35c28..efcf589d7083 100644 --- a/sound/oss/emu10k1/audio.c +++ b/sound/oss/emu10k1/audio.c | |||
@@ -1139,7 +1139,7 @@ static int emu10k1_audio_open(struct inode *inode, struct file *file) | |||
1139 | 1139 | ||
1140 | match: | 1140 | match: |
1141 | 1141 | ||
1142 | wave_dev = (struct emu10k1_wavedevice *) kmalloc(sizeof(struct emu10k1_wavedevice), GFP_KERNEL); | 1142 | wave_dev = kmalloc(sizeof(struct emu10k1_wavedevice), GFP_KERNEL); |
1143 | 1143 | ||
1144 | if (wave_dev == NULL) { | 1144 | if (wave_dev == NULL) { |
1145 | ERROR(); | 1145 | ERROR(); |
@@ -1155,7 +1155,7 @@ match: | |||
1155 | /* Recording */ | 1155 | /* Recording */ |
1156 | struct wiinst *wiinst; | 1156 | struct wiinst *wiinst; |
1157 | 1157 | ||
1158 | if ((wiinst = (struct wiinst *) kmalloc(sizeof(struct wiinst), GFP_KERNEL)) == NULL) { | 1158 | if ((wiinst = kmalloc(sizeof(struct wiinst), GFP_KERNEL)) == NULL) { |
1159 | ERROR(); | 1159 | ERROR(); |
1160 | kfree(wave_dev); | 1160 | kfree(wave_dev); |
1161 | return -ENOMEM; | 1161 | return -ENOMEM; |
@@ -1211,7 +1211,7 @@ match: | |||
1211 | struct woinst *woinst; | 1211 | struct woinst *woinst; |
1212 | int i; | 1212 | int i; |
1213 | 1213 | ||
1214 | if ((woinst = (struct woinst *) kmalloc(sizeof(struct woinst), GFP_KERNEL)) == NULL) { | 1214 | if ((woinst = kmalloc(sizeof(struct woinst), GFP_KERNEL)) == NULL) { |
1215 | ERROR(); | 1215 | ERROR(); |
1216 | kfree(wave_dev); | 1216 | kfree(wave_dev); |
1217 | return -ENOMEM; | 1217 | return -ENOMEM; |
diff --git a/sound/oss/emu10k1/cardmi.c b/sound/oss/emu10k1/cardmi.c index 0545814cc67d..57674f8c8a2e 100644 --- a/sound/oss/emu10k1/cardmi.c +++ b/sound/oss/emu10k1/cardmi.c | |||
@@ -157,7 +157,7 @@ int emu10k1_mpuin_add_buffer(struct emu10k1_mpuin *card_mpuin, struct midi_hdr * | |||
157 | midihdr->flags |= MIDIBUF_INQUEUE; /* set */ | 157 | midihdr->flags |= MIDIBUF_INQUEUE; /* set */ |
158 | midihdr->flags &= ~MIDIBUF_DONE; /* clear */ | 158 | midihdr->flags &= ~MIDIBUF_DONE; /* clear */ |
159 | 159 | ||
160 | if ((midiq = (struct midi_queue *) kmalloc(sizeof(struct midi_queue), GFP_ATOMIC)) == NULL) { | 160 | if ((midiq = kmalloc(sizeof(struct midi_queue), GFP_ATOMIC)) == NULL) { |
161 | /* Message lost */ | 161 | /* Message lost */ |
162 | return -1; | 162 | return -1; |
163 | } | 163 | } |
diff --git a/sound/oss/emu10k1/cardmo.c b/sound/oss/emu10k1/cardmo.c index 5938d31f9e21..a8cc75db3e45 100644 --- a/sound/oss/emu10k1/cardmo.c +++ b/sound/oss/emu10k1/cardmo.c | |||
@@ -117,7 +117,7 @@ int emu10k1_mpuout_add_buffer(struct emu10k1_card *card, struct midi_hdr *midihd | |||
117 | midihdr->flags |= MIDIBUF_INQUEUE; | 117 | midihdr->flags |= MIDIBUF_INQUEUE; |
118 | midihdr->flags &= ~MIDIBUF_DONE; | 118 | midihdr->flags &= ~MIDIBUF_DONE; |
119 | 119 | ||
120 | if ((midiq = (struct midi_queue *) kmalloc(sizeof(struct midi_queue), GFP_KERNEL)) == NULL) { | 120 | if ((midiq = kmalloc(sizeof(struct midi_queue), GFP_KERNEL)) == NULL) { |
121 | /* Message lost */ | 121 | /* Message lost */ |
122 | return -1; | 122 | return -1; |
123 | } | 123 | } |
diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c index 8ac77df86397..cca3dad2bdf4 100644 --- a/sound/oss/emu10k1/midi.c +++ b/sound/oss/emu10k1/midi.c | |||
@@ -58,7 +58,7 @@ static int midiin_add_buffer(struct emu10k1_mididevice *midi_dev, struct midi_hd | |||
58 | { | 58 | { |
59 | struct midi_hdr *midihdr; | 59 | struct midi_hdr *midihdr; |
60 | 60 | ||
61 | if ((midihdr = (struct midi_hdr *) kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) { | 61 | if ((midihdr = kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) { |
62 | ERROR(); | 62 | ERROR(); |
63 | return -EINVAL; | 63 | return -EINVAL; |
64 | } | 64 | } |
@@ -128,7 +128,7 @@ match: | |||
128 | mutex_lock(&card->open_sem); | 128 | mutex_lock(&card->open_sem); |
129 | } | 129 | } |
130 | 130 | ||
131 | if ((midi_dev = (struct emu10k1_mididevice *) kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL) | 131 | if ((midi_dev = kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL) |
132 | return -EINVAL; | 132 | return -EINVAL; |
133 | 133 | ||
134 | midi_dev->card = card; | 134 | midi_dev->card = card; |
@@ -328,7 +328,7 @@ static ssize_t emu10k1_midi_write(struct file *file, const char __user *buffer, | |||
328 | if (!access_ok(VERIFY_READ, buffer, count)) | 328 | if (!access_ok(VERIFY_READ, buffer, count)) |
329 | return -EFAULT; | 329 | return -EFAULT; |
330 | 330 | ||
331 | if ((midihdr = (struct midi_hdr *) kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) | 331 | if ((midihdr = kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) |
332 | return -EINVAL; | 332 | return -EINVAL; |
333 | 333 | ||
334 | midihdr->bufferlength = count; | 334 | midihdr->bufferlength = count; |
@@ -490,7 +490,7 @@ int emu10k1_seq_midi_open(int dev, int mode, | |||
490 | 490 | ||
491 | DPF(2, "emu10k1_seq_midi_open()\n"); | 491 | DPF(2, "emu10k1_seq_midi_open()\n"); |
492 | 492 | ||
493 | if ((midi_dev = (struct emu10k1_mididevice *) kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL) | 493 | if ((midi_dev = kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL) |
494 | return -EINVAL; | 494 | return -EINVAL; |
495 | 495 | ||
496 | midi_dev->card = card; | 496 | midi_dev->card = card; |
@@ -540,7 +540,7 @@ int emu10k1_seq_midi_out(int dev, unsigned char midi_byte) | |||
540 | 540 | ||
541 | card = midi_devs[dev]->devc; | 541 | card = midi_devs[dev]->devc; |
542 | 542 | ||
543 | if ((midihdr = (struct midi_hdr *) kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) | 543 | if ((midihdr = kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) |
544 | return -EINVAL; | 544 | return -EINVAL; |
545 | 545 | ||
546 | midihdr->bufferlength = 1; | 546 | midihdr->bufferlength = 1; |
diff --git a/sound/oss/emu10k1/mixer.c b/sound/oss/emu10k1/mixer.c index cbcaaa34189a..6419796c2ed7 100644 --- a/sound/oss/emu10k1/mixer.c +++ b/sound/oss/emu10k1/mixer.c | |||
@@ -194,7 +194,7 @@ static int emu10k1_private_mixer(struct emu10k1_card *card, unsigned int cmd, un | |||
194 | 194 | ||
195 | case SOUND_MIXER_PRIVATE3: | 195 | case SOUND_MIXER_PRIVATE3: |
196 | 196 | ||
197 | ctl = (struct mixer_private_ioctl *) kmalloc(sizeof(struct mixer_private_ioctl), GFP_KERNEL); | 197 | ctl = kmalloc(sizeof(struct mixer_private_ioctl), GFP_KERNEL); |
198 | if (ctl == NULL) | 198 | if (ctl == NULL) |
199 | return -ENOMEM; | 199 | return -ENOMEM; |
200 | 200 | ||
diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c index 784bdd707055..d18286ccc14d 100644 --- a/sound/oss/hal2.c +++ b/sound/oss/hal2.c | |||
@@ -1435,7 +1435,7 @@ static int hal2_init_card(struct hal2_card **phal2, struct hpc3_regs *hpc3) | |||
1435 | int ret = 0; | 1435 | int ret = 0; |
1436 | struct hal2_card *hal2; | 1436 | struct hal2_card *hal2; |
1437 | 1437 | ||
1438 | hal2 = (struct hal2_card *) kmalloc(sizeof(struct hal2_card), GFP_KERNEL); | 1438 | hal2 = kmalloc(sizeof(struct hal2_card), GFP_KERNEL); |
1439 | if (!hal2) | 1439 | if (!hal2) |
1440 | return -ENOMEM; | 1440 | return -ENOMEM; |
1441 | memset(hal2, 0, sizeof(struct hal2_card)); | 1441 | memset(hal2, 0, sizeof(struct hal2_card)); |
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c index e96220541971..2796c0ef985f 100644 --- a/sound/oss/mpu401.c +++ b/sound/oss/mpu401.c | |||
@@ -1023,7 +1023,7 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner) | |||
1023 | devc->capabilities |= MPU_CAP_INTLG; /* Supports intelligent mode */ | 1023 | devc->capabilities |= MPU_CAP_INTLG; /* Supports intelligent mode */ |
1024 | 1024 | ||
1025 | 1025 | ||
1026 | mpu401_synth_operations[m] = (struct synth_operations *)kmalloc(sizeof(struct synth_operations), GFP_KERNEL); | 1026 | mpu401_synth_operations[m] = kmalloc(sizeof(struct synth_operations), GFP_KERNEL); |
1027 | 1027 | ||
1028 | if (mpu401_synth_operations[m] == NULL) | 1028 | if (mpu401_synth_operations[m] == NULL) |
1029 | { | 1029 | { |
diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c index 4799bc77f987..2e8cfa5481f2 100644 --- a/sound/oss/opl3.c +++ b/sound/oss/opl3.c | |||
@@ -166,7 +166,7 @@ int opl3_detect(int ioaddr, int *osp) | |||
166 | return 0; | 166 | return 0; |
167 | } | 167 | } |
168 | 168 | ||
169 | devc = (struct opl_devinfo *)kmalloc(sizeof(*devc), GFP_KERNEL); | 169 | devc = kmalloc(sizeof(*devc), GFP_KERNEL); |
170 | 170 | ||
171 | if (devc == NULL) | 171 | if (devc == NULL) |
172 | { | 172 | { |
diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c index 440537c72604..07cbacf63824 100644 --- a/sound/oss/sb_common.c +++ b/sound/oss/sb_common.c | |||
@@ -625,7 +625,7 @@ int sb_dsp_detect(struct address_info *hw_config, int pci, int pciio, struct sb_ | |||
625 | */ | 625 | */ |
626 | 626 | ||
627 | 627 | ||
628 | detected_devc = (sb_devc *)kmalloc(sizeof(sb_devc), GFP_KERNEL); | 628 | detected_devc = kmalloc(sizeof(sb_devc), GFP_KERNEL); |
629 | if (detected_devc == NULL) | 629 | if (detected_devc == NULL) |
630 | { | 630 | { |
631 | printk(KERN_ERR "sb: Can't allocate memory for device information\n"); | 631 | printk(KERN_ERR "sb: Can't allocate memory for device information\n"); |
diff --git a/sound/oss/sb_midi.c b/sound/oss/sb_midi.c index 2e3bc045caba..8b796704e112 100644 --- a/sound/oss/sb_midi.c +++ b/sound/oss/sb_midi.c | |||
@@ -173,7 +173,7 @@ void sb_dsp_midi_init(sb_devc * devc, struct module *owner) | |||
173 | return; | 173 | return; |
174 | } | 174 | } |
175 | std_midi_synth.midi_dev = devc->my_mididev = dev; | 175 | std_midi_synth.midi_dev = devc->my_mididev = dev; |
176 | midi_devs[dev] = (struct midi_operations *)kmalloc(sizeof(struct midi_operations), GFP_KERNEL); | 176 | midi_devs[dev] = kmalloc(sizeof(struct midi_operations), GFP_KERNEL); |
177 | if (midi_devs[dev] == NULL) | 177 | if (midi_devs[dev] == NULL) |
178 | { | 178 | { |
179 | printk(KERN_WARNING "Sound Blaster: failed to allocate MIDI memory.\n"); | 179 | printk(KERN_WARNING "Sound Blaster: failed to allocate MIDI memory.\n"); |
@@ -189,7 +189,7 @@ void sb_dsp_midi_init(sb_devc * devc, struct module *owner) | |||
189 | midi_devs[dev]->devc = devc; | 189 | midi_devs[dev]->devc = devc; |
190 | 190 | ||
191 | 191 | ||
192 | midi_devs[dev]->converter = (struct synth_operations *)kmalloc(sizeof(struct synth_operations), GFP_KERNEL); | 192 | midi_devs[dev]->converter = kmalloc(sizeof(struct synth_operations), GFP_KERNEL); |
193 | if (midi_devs[dev]->converter == NULL) | 193 | if (midi_devs[dev]->converter == NULL) |
194 | { | 194 | { |
195 | printk(KERN_WARNING "Sound Blaster: failed to allocate MIDI memory.\n"); | 195 | printk(KERN_WARNING "Sound Blaster: failed to allocate MIDI memory.\n"); |
diff --git a/sound/oss/sb_mixer.c b/sound/oss/sb_mixer.c index 238e2cf44b08..fad1a4f25ad6 100644 --- a/sound/oss/sb_mixer.c +++ b/sound/oss/sb_mixer.c | |||
@@ -734,7 +734,7 @@ int sb_mixer_init(sb_devc * devc, struct module *owner) | |||
734 | if (m == -1) | 734 | if (m == -1) |
735 | return 0; | 735 | return 0; |
736 | 736 | ||
737 | mixer_devs[m] = (struct mixer_operations *)kmalloc(sizeof(struct mixer_operations), GFP_KERNEL); | 737 | mixer_devs[m] = kmalloc(sizeof(struct mixer_operations), GFP_KERNEL); |
738 | if (mixer_devs[m] == NULL) | 738 | if (mixer_devs[m] == NULL) |
739 | { | 739 | { |
740 | printk(KERN_ERR "sb_mixer: Can't allocate memory\n"); | 740 | printk(KERN_ERR "sb_mixer: Can't allocate memory\n"); |
diff --git a/sound/oss/v_midi.c b/sound/oss/v_midi.c index d952b2264da1..103940fd5b4f 100644 --- a/sound/oss/v_midi.c +++ b/sound/oss/v_midi.c | |||
@@ -183,7 +183,7 @@ static void __init attach_v_midi (struct address_info *hw_config) | |||
183 | return; | 183 | return; |
184 | } | 184 | } |
185 | 185 | ||
186 | m=(struct vmidi_memory *)kmalloc(sizeof(struct vmidi_memory), GFP_KERNEL); | 186 | m = kmalloc(sizeof(struct vmidi_memory), GFP_KERNEL); |
187 | if (m == NULL) | 187 | if (m == NULL) |
188 | { | 188 | { |
189 | printk(KERN_WARNING "Loopback MIDI: Failed to allocate memory\n"); | 189 | printk(KERN_WARNING "Loopback MIDI: Failed to allocate memory\n"); |
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c index c5bf363d32c2..26a7c6af95bc 100644 --- a/sound/oss/waveartist.c +++ b/sound/oss/waveartist.c | |||
@@ -1267,7 +1267,7 @@ static int __init waveartist_init(wavnc_info *devc) | |||
1267 | conf_printf2(dev_name, devc->hw.io_base, devc->hw.irq, | 1267 | conf_printf2(dev_name, devc->hw.io_base, devc->hw.irq, |
1268 | devc->hw.dma, devc->hw.dma2); | 1268 | devc->hw.dma, devc->hw.dma2); |
1269 | 1269 | ||
1270 | portc = (wavnc_port_info *)kmalloc(sizeof(wavnc_port_info), GFP_KERNEL); | 1270 | portc = kmalloc(sizeof(wavnc_port_info), GFP_KERNEL); |
1271 | if (portc == NULL) | 1271 | if (portc == NULL) |
1272 | goto nomem; | 1272 | goto nomem; |
1273 | 1273 | ||