Commit 2ea1470b authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] check_region() removal in waveartist

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 637fa2a0
...@@ -1346,18 +1346,20 @@ static int __init probe_waveartist(struct address_info *hw_config) ...@@ -1346,18 +1346,20 @@ static int __init probe_waveartist(struct address_info *hw_config)
return 0; return 0;
} }
if (check_region(hw_config->io_base, 15)) { if (!request_region(hw_config->io_base, 15, hw_config->name)) {
printk(KERN_WARNING "WaveArtist: I/O port conflict\n"); printk(KERN_WARNING "WaveArtist: I/O port conflict\n");
return 0; return 0;
} }
if (hw_config->irq > 15 || hw_config->irq < 0) { if (hw_config->irq > 15 || hw_config->irq < 0) {
release_region(hw_config->io_base, 15);
printk(KERN_WARNING "WaveArtist: Bad IRQ %d\n", printk(KERN_WARNING "WaveArtist: Bad IRQ %d\n",
hw_config->irq); hw_config->irq);
return 0; return 0;
} }
if (hw_config->dma != 3) { if (hw_config->dma != 3) {
release_region(hw_config->io_base, 15);
printk(KERN_WARNING "WaveArtist: Bad DMA %d\n", printk(KERN_WARNING "WaveArtist: Bad DMA %d\n",
hw_config->dma); hw_config->dma);
return 0; return 0;
...@@ -1392,8 +1394,6 @@ attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *m ...@@ -1392,8 +1394,6 @@ attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *m
if (hw->dma != hw->dma2 && hw->dma2 != NO_DMA) if (hw->dma != hw->dma2 && hw->dma2 != NO_DMA)
devc->audio_flags |= DMA_DUPLEX; devc->audio_flags |= DMA_DUPLEX;
request_region(hw->io_base, 15, devc->hw.name);
devc->mix = mix; devc->mix = mix;
devc->dev_no = waveartist_init(devc); devc->dev_no = waveartist_init(devc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment