X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sound%2Foss%2Fvwsnd.c;h=d25249a932bfa48abe544bfa7dac49ba0a3e17e7;hb=f5ffd4620aba9e55656483ae1ef5c79ba81f5403;hp=b372e88e857f6996615ac1fb6a8c70daf70de164;hpb=debf798b1ed82053689d900670eb27fb2f1b4bd3;p=pandora-kernel.git diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c index b372e88e857f..d25249a932bf 100644 --- a/sound/oss/vwsnd.c +++ b/sound/oss/vwsnd.c @@ -247,27 +247,6 @@ typedef struct lithium { spinlock_t lock; /* protects codec and UST/MSC access */ } lithium_t; -/* - * li_create initializes the lithium_t structure and sets up vm mappings - * to access the registers. - * Returns 0 on success, -errno on failure. - */ - -static int __init li_create(lithium_t *lith, unsigned long baseaddr) -{ - static void li_destroy(lithium_t *); - - spin_lock_init(&lith->lock); - lith->page0 = ioremap_nocache(baseaddr + LI_PAGE0_OFFSET, PAGE_SIZE); - lith->page1 = ioremap_nocache(baseaddr + LI_PAGE1_OFFSET, PAGE_SIZE); - lith->page2 = ioremap_nocache(baseaddr + LI_PAGE2_OFFSET, PAGE_SIZE); - if (!lith->page0 || !lith->page1 || !lith->page2) { - li_destroy(lith); - return -ENOMEM; - } - return 0; -} - /* * li_destroy destroys the lithium_t structure and vm mappings. */ @@ -288,6 +267,25 @@ static void li_destroy(lithium_t *lith) } } +/* + * li_create initializes the lithium_t structure and sets up vm mappings + * to access the registers. + * Returns 0 on success, -errno on failure. + */ + +static int __init li_create(lithium_t *lith, unsigned long baseaddr) +{ + spin_lock_init(&lith->lock); + lith->page0 = ioremap_nocache(baseaddr + LI_PAGE0_OFFSET, PAGE_SIZE); + lith->page1 = ioremap_nocache(baseaddr + LI_PAGE1_OFFSET, PAGE_SIZE); + lith->page2 = ioremap_nocache(baseaddr + LI_PAGE2_OFFSET, PAGE_SIZE); + if (!lith->page0 || !lith->page1 || !lith->page2) { + li_destroy(lith); + return -ENOMEM; + } + return 0; +} + /* * basic register accessors - read/write long/byte */ @@ -2235,12 +2233,12 @@ static void vwsnd_audio_write_intr(vwsnd_dev_t *devc, unsigned int status) pcm_output(devc, underflown, 0); } -static irqreturn_t vwsnd_audio_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t vwsnd_audio_intr(int irq, void *dev_id) { - vwsnd_dev_t *devc = (vwsnd_dev_t *) dev_id; + vwsnd_dev_t *devc = dev_id; unsigned int status; - DBGEV("(irq=%d, dev_id=0x%p, regs=0x%p)\n", irq, dev_id, regs); + DBGEV("(irq=%d, dev_id=0x%p)\n", irq, dev_id); status = li_get_clear_intr_status(&devc->lith); vwsnd_audio_read_intr(devc, status); @@ -3037,7 +3035,7 @@ static int vwsnd_audio_release(struct inode *inode, struct file *file) return err; } -static struct file_operations vwsnd_audio_fops = { +static const struct file_operations vwsnd_audio_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = vwsnd_audio_read, @@ -3227,7 +3225,7 @@ static int vwsnd_mixer_ioctl(struct inode *ioctl, return retval; } -static struct file_operations vwsnd_mixer_fops = { +static const struct file_operations vwsnd_mixer_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = vwsnd_mixer_ioctl,