mqueue: remove unneeded info->messages initialization
[safe/jmp/linux-2.6] / sound / oss / pss.c
index 37ee234..e19dd5d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * sound/pss.c
+ * sound/oss/pss.c
  *
  * The low level driver for the Personal Sound System (ECHO ESC614).
  *
@@ -46,7 +46,7 @@
  *          load the driver as it did in previous versions.
  * 04-07-1999: Anthony Barbachan <barbcode@xmen.cis.fordham.edu>
  *          Added module parameter pss_firmware to allow the user to tell 
- *          the driver where the fireware file is located.  The default 
+ *          the driver where the firmware file is located.  The default 
  *          setting is the previous hardcoded setting "/etc/sound/pss_synth".
  * 00-03-03: Christoph Hellwig <chhellwig@infradead.org>
  *         Adapted to module_init/module_exit
@@ -232,14 +232,12 @@ static int set_irq(pss_confdata * devc, int dev, int irq)
        return 1;
 }
 
-static int set_io_base(pss_confdata * devc, int dev, int base)
+static void set_io_base(pss_confdata * devc, int dev, int base)
 {
        unsigned short  tmp = inw(REG(dev)) & 0x003f;
        unsigned short  bits = (base & 0x0ffc) << 4;
 
        outw(bits | tmp, REG(dev));
-
-       return 1;
 }
 
 static int set_dma(pss_confdata * devc, int dev, int dma)
@@ -271,7 +269,7 @@ static int pss_reset_dsp(pss_confdata * devc)
        unsigned long   i, limit = jiffies + HZ/10;
 
        outw(0x2000, REG(PSS_CONTROL));
-       for (i = 0; i < 32768 && (limit-jiffies >= 0); i++)
+       for (i = 0; i < 32768 && time_after_eq(limit, jiffies); i++)
                inw(REG(PSS_CONTROL));
        outw(0x0000, REG(PSS_CONTROL));
        return 1;
@@ -371,11 +369,11 @@ static int pss_download_boot(pss_confdata * devc, unsigned char *block, int size
                outw(0, REG(PSS_DATA));
 
                limit = jiffies + HZ/10;
-               for (i = 0; i < 32768 && (limit - jiffies >= 0); i++)
+               for (i = 0; i < 32768 && time_after_eq(limit, jiffies); i++)
                        val = inw(REG(PSS_STATUS));
 
                limit = jiffies + HZ/10;
-               for (i = 0; i < 32768 && (limit-jiffies >= 0); i++)
+               for (i = 0; i < 32768 && time_after_eq(limit, jiffies); i++)
                {
                        val = inw(REG(PSS_STATUS));
                        if (val & 0x4000)
@@ -459,10 +457,9 @@ static void pss_mixer_reset(pss_confdata *devc)
        }
 }
 
-static int set_volume_mono(unsigned __user *p, int *aleft)
+static int set_volume_mono(unsigned __user *p, unsigned int *aleft)
 {
-       int left;
-       unsigned volume;
+       unsigned int left, volume;
        if (get_user(volume, p))
                return -EFAULT;
        
@@ -473,10 +470,11 @@ static int set_volume_mono(unsigned __user *p, int *aleft)
        return 0;
 }
 
-static int set_volume_stereo(unsigned __user *p, int *aleft, int *aright)
+static int set_volume_stereo(unsigned __user *p,
+                            unsigned int *aleft,
+                            unsigned int *aright)
 {
-       int left, right;
-       unsigned volume;
+       unsigned int left, right, volume;
        if (get_user(volume, p))
                return -EFAULT;
 
@@ -673,20 +671,12 @@ static void configure_nonsound_components(void)
 
        /* Configure CDROM port */
 
-       if(pss_cdrom_port == -1)        /* If cdrom port enablation wasn't requested */
-       {
+       if (pss_cdrom_port == -1) {     /* If cdrom port enablation wasn't requested */
                printk(KERN_INFO "PSS: CDROM port not enabled.\n");
-       }
-       else if(check_region(pss_cdrom_port, 2))
-       {
+       } else if (check_region(pss_cdrom_port, 2)) {
                printk(KERN_ERR "PSS: CDROM I/O port conflict.\n");
-       }
-       else if(!set_io_base(devc, CONF_CDROM, pss_cdrom_port))
-       {
-               printk(KERN_ERR "PSS: CDROM I/O port could not be set.\n");
-       }
-       else                                    /* CDROM port successfully configured */
-       {
+       } else {
+               set_io_base(devc, CONF_CDROM, pss_cdrom_port);
                printk(KERN_INFO "PSS: CDROM I/O port set to 0x%x.\n", pss_cdrom_port);
        }
 }
@@ -758,10 +748,7 @@ static int __init probe_pss_mpu(struct address_info *hw_config)
                printk(KERN_ERR "PSS: MPU I/O port conflict\n");
                return 0;
        }
-       if (!set_io_base(devc, CONF_MIDI, hw_config->io_base)) {
-               printk(KERN_ERR "PSS: MIDI base could not be set.\n");
-               goto fail;
-       }
+       set_io_base(devc, CONF_MIDI, hw_config->io_base);
        if (!set_irq(devc, CONF_MIDI, hw_config->irq)) {
                printk(KERN_ERR "PSS: MIDI IRQ allocation error.\n");
                goto fail;
@@ -1057,10 +1044,7 @@ static int __init probe_pss_mss(struct address_info *hw_config)
                release_region(hw_config->io_base, 4);
                return 0;
        }
-       if (!set_io_base(devc, CONF_WSS, hw_config->io_base)) {
-               printk("PSS: WSS base not settable.\n");
-               goto fail;
-       }
+       set_io_base(devc, CONF_WSS, hw_config->io_base);
        if (!set_irq(devc, CONF_WSS, hw_config->irq)) {
                printk("PSS: WSS IRQ allocation error.\n");
                goto fail;