[PATCH] 2.5.30 Maestro3

From: Marcin Dalecki (dalecki@evision.ag)
Date: Mon Aug 05 2002 - 08:52:27 EST


The attached patch is updating the Maestro3 OSS sound chip driver to

1. The changes in IRQ handline.

2. C99 standard conformant initializers.

Plese apply. (I happen to use such a chip...)

diff -durNp -X /tmp/diff.uRHk8V linux-2.5.30/sound/oss/maestro3.c linux/sound/oss/maestro3.c
--- linux-2.5.30/sound/oss/maestro3.c 2002-08-01 23:16:35.000000000 +0200
+++ linux/sound/oss/maestro3.c 2002-08-03 19:01:34.000000000 +0200
@@ -1605,12 +1605,12 @@ static int m3_ioctl(struct inode *inode,
         spin_lock_irqsave(&s->lock, flags);
         if (file->f_mode & FMODE_WRITE) {
             stop_dac(s);
- synchronize_irq();
+ synchronize_irq(s->card->irq);
             s->dma_dac.swptr = s->dma_dac.hwptr = s->dma_dac.count = s->dma_dac.total_bytes = 0;
         }
         if (file->f_mode & FMODE_READ) {
             stop_adc(s);
- synchronize_irq();
+ synchronize_irq(s->card->irq);
             s->dma_adc.swptr = s->dma_adc.hwptr = s->dma_adc.count = s->dma_adc.total_bytes = 0;
         }
         spin_unlock_irqrestore(&s->lock, flags);
@@ -2172,11 +2172,11 @@ static int m3_ioctl_mixdev(struct inode
 }
 
 static struct file_operations m3_mixer_fops = {
- owner: THIS_MODULE,
- llseek: no_llseek,
- ioctl: m3_ioctl_mixdev,
- open: m3_open_mixdev,
- release: m3_release_mixdev,
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .ioctl = m3_ioctl_mixdev,
+ .open = m3_open_mixdev,
+ .release = m3_release_mixdev,
 };
 
 void remote_codec_config(int io, int isremote)
@@ -2546,15 +2546,15 @@ static void m3_enable_ints(struct m3_car
 }
 
 static struct file_operations m3_audio_fops = {
- owner: THIS_MODULE,
- llseek: &no_llseek,
- read: &m3_read,
- write: &m3_write,
- poll: &m3_poll,
- ioctl: &m3_ioctl,
- mmap: &m3_mmap,
- open: &m3_open,
- release: &m3_release,
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = m3_read,
+ .write = m3_write,
+ .poll = m3_poll,
+ .ioctl = m3_ioctl,
+ .mmap = m3_mmap,
+ .open = m3_open,
+ .release = m3_release,
 };
 
 #ifdef CONFIG_PM
@@ -2777,8 +2777,7 @@ static int m3_suspend(struct pci_dev *pc
     struct m3_card *card = pci_get_drvdata(pci_dev);
 
     /* must be a better way.. */
- save_flags(flags);
- cli();
+ local_irq_save(flags);
 
     DPRINTK(DPMOD, "pm in dev %p\n",card);
 
@@ -2816,7 +2815,7 @@ static int m3_suspend(struct pci_dev *pc
 
     card->in_suspend = 1;
 
- restore_flags(flags);
+ local_irq_restore(flags);
 
     return 0;
 }
@@ -2828,8 +2827,7 @@ static int m3_resume(struct pci_dev *pci
     int i;
     struct m3_card *card = pci_get_drvdata(pci_dev);
 
- save_flags(flags); /* paranoia */
- cli();
+ local_irq_save(flags); /* paranoia */
     card->in_suspend = 0;
 
     DPRINTK(DPMOD, "resuming\n");
@@ -2888,13 +2886,13 @@ static int m3_resume(struct pci_dev *pci
          * called unconditionally..
          */
         DPRINTK(DPMOD, "turning on dacs ind %d\n",i);
- start_dac(s);
- start_adc(s);
+ start_dac(s);
+ start_adc(s);
     }
 
- restore_flags(flags);
+ local_irq_restore(flags);
 
- /*
+ /*
      * all right, we think things are ready,
      * wake up people who were using the device
      * when we suspended
@@ -2914,12 +2912,12 @@ MODULE_PARM(debug,"i");
 MODULE_PARM(external_amp,"i");
 
 static struct pci_driver m3_pci_driver = {
- name: "ess_m3_audio",
- id_table: m3_id_table,
- probe: m3_probe,
- remove: m3_remove,
- suspend: m3_suspend,
- resume: m3_resume,
+ .name = "ess_m3_audio",
+ .id_table = m3_id_table,
+ .probe = m3_probe,
+ .remove = m3_remove,
+ .suspend = m3_suspend,
+ .resume = m3_resume,
 };
 
 static int __init m3_init_module(void)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:27 EST