All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Dalecki <dalecki@evision.ag>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@transmeta.com>
Subject: [PATCH] 2.5.30 Maestro3
Date: Mon, 05 Aug 2002 15:52:27 +0200	[thread overview]
Message-ID: <3D4E831B.30000@evision.ag> (raw)

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

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...)

[-- Attachment #2: maestro3-2.5.30.diff --]
[-- Type: text/plain, Size: 3731 bytes --]

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)

             reply	other threads:[~2002-08-05 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05 13:52 Marcin Dalecki [this message]
2002-08-05 15:25 ` [PATCH] 2.5.30 Maestro3 Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D4E831B.30000@evision.ag \
    --to=dalecki@evision.ag \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@dalecki.de \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.