/*
- * linux/drivers/sound/waveartist.c
+ * linux/sound/oss/waveartist.c
*
* The low level driver for the RWA010 Rockwell Wave Artist
* codec chip used in the Rebel.com NetWinder.
#include <linux/module.h>
#include <linux/init.h>
-#include <linux/config.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
static int nr_waveartist_devs;
static wavnc_info adev_info[MAX_AUDIO_DEV];
-static spinlock_t waveartist_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(waveartist_lock);
#ifndef CONFIG_ARCH_NETWINDER
#define machine_is_netwinder() 0
static irqreturn_t
-waveartist_intr(int irq, void *dev_id, struct pt_regs *regs)
+waveartist_intr(int irq, void *dev_id)
{
wavnc_info *devc = (wavnc_info *)dev_id;
int irqstatus, status;
conf_printf2(dev_name, devc->hw.io_base, devc->hw.irq,
devc->hw.dma, devc->hw.dma2);
- portc = (wavnc_port_info *)kmalloc(sizeof(wavnc_port_info), GFP_KERNEL);
+ portc = kmalloc(sizeof(wavnc_port_info), GFP_KERNEL);
if (portc == NULL)
goto nomem;
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");
return 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",
hw_config->irq);
return 0;
}
if (hw_config->dma != 3) {
+ release_region(hw_config->io_base, 15);
printk(KERN_WARNING "WaveArtist: Bad DMA %d\n",
hw_config->dma);
return 0;
if (hw->dma != hw->dma2 && hw->dma2 != NO_DMA)
devc->audio_flags |= DMA_DUPLEX;
- request_region(hw->io_base, 15, devc->hw.name);
-
devc->mix = mix;
devc->dev_no = waveartist_init(devc);
#endif
MODULE_DESCRIPTION("Rockwell WaveArtist RWA-010 sound driver");
-MODULE_PARM(io, "i"); /* IO base */
-MODULE_PARM(irq, "i"); /* IRQ */
-MODULE_PARM(dma, "i"); /* DMA */
-MODULE_PARM(dma2, "i"); /* DMA2 */
+module_param(io, int, 0); /* IO base */
+module_param(irq, int, 0); /* IRQ */
+module_param(dma, int, 0); /* DMA */
+module_param(dma2, int, 0); /* DMA2 */
MODULE_LICENSE("GPL");