aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss')
-rw-r--r--sound/oss/pss.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/sound/oss/pss.c b/sound/oss/pss.c
index ece428b2ba9f..16ed06950dc1 100644
--- a/sound/oss/pss.c
+++ b/sound/oss/pss.c
@@ -232,14 +232,12 @@ static int set_irq(pss_confdata * devc, int dev, int irq)
232 return 1; 232 return 1;
233} 233}
234 234
235static int set_io_base(pss_confdata * devc, int dev, int base) 235static void set_io_base(pss_confdata * devc, int dev, int base)
236{ 236{
237 unsigned short tmp = inw(REG(dev)) & 0x003f; 237 unsigned short tmp = inw(REG(dev)) & 0x003f;
238 unsigned short bits = (base & 0x0ffc) << 4; 238 unsigned short bits = (base & 0x0ffc) << 4;
239 239
240 outw(bits | tmp, REG(dev)); 240 outw(bits | tmp, REG(dev));
241
242 return 1;
243} 241}
244 242
245static int set_dma(pss_confdata * devc, int dev, int dma) 243static int set_dma(pss_confdata * devc, int dev, int dma)
@@ -673,20 +671,12 @@ static void configure_nonsound_components(void)
673 671
674 /* Configure CDROM port */ 672 /* Configure CDROM port */
675 673
676 if(pss_cdrom_port == -1) /* If cdrom port enablation wasn't requested */ 674 if (pss_cdrom_port == -1) { /* If cdrom port enablation wasn't requested */
677 {
678 printk(KERN_INFO "PSS: CDROM port not enabled.\n"); 675 printk(KERN_INFO "PSS: CDROM port not enabled.\n");
679 } 676 } else if (check_region(pss_cdrom_port, 2)) {
680 else if(check_region(pss_cdrom_port, 2))
681 {
682 printk(KERN_ERR "PSS: CDROM I/O port conflict.\n"); 677 printk(KERN_ERR "PSS: CDROM I/O port conflict.\n");
683 } 678 } else {
684 else if(!set_io_base(devc, CONF_CDROM, pss_cdrom_port)) 679 set_io_base(devc, CONF_CDROM, pss_cdrom_port);
685 {
686 printk(KERN_ERR "PSS: CDROM I/O port could not be set.\n");
687 }
688 else /* CDROM port successfully configured */
689 {
690 printk(KERN_INFO "PSS: CDROM I/O port set to 0x%x.\n", pss_cdrom_port); 680 printk(KERN_INFO "PSS: CDROM I/O port set to 0x%x.\n", pss_cdrom_port);
691 } 681 }
692} 682}
@@ -758,10 +748,7 @@ static int __init probe_pss_mpu(struct address_info *hw_config)
758 printk(KERN_ERR "PSS: MPU I/O port conflict\n"); 748 printk(KERN_ERR "PSS: MPU I/O port conflict\n");
759 return 0; 749 return 0;
760 } 750 }
761 if (!set_io_base(devc, CONF_MIDI, hw_config->io_base)) { 751 set_io_base(devc, CONF_MIDI, hw_config->io_base);
762 printk(KERN_ERR "PSS: MIDI base could not be set.\n");
763 goto fail;
764 }
765 if (!set_irq(devc, CONF_MIDI, hw_config->irq)) { 752 if (!set_irq(devc, CONF_MIDI, hw_config->irq)) {
766 printk(KERN_ERR "PSS: MIDI IRQ allocation error.\n"); 753 printk(KERN_ERR "PSS: MIDI IRQ allocation error.\n");
767 goto fail; 754 goto fail;
@@ -1057,10 +1044,7 @@ static int __init probe_pss_mss(struct address_info *hw_config)
1057 release_region(hw_config->io_base, 4); 1044 release_region(hw_config->io_base, 4);
1058 return 0; 1045 return 0;
1059 } 1046 }
1060 if (!set_io_base(devc, CONF_WSS, hw_config->io_base)) { 1047 set_io_base(devc, CONF_WSS, hw_config->io_base);
1061 printk("PSS: WSS base not settable.\n");
1062 goto fail;
1063 }
1064 if (!set_irq(devc, CONF_WSS, hw_config->irq)) { 1048 if (!set_irq(devc, CONF_WSS, hw_config->irq)) {
1065 printk("PSS: WSS IRQ allocation error.\n"); 1049 printk("PSS: WSS IRQ allocation error.\n");
1066 goto fail; 1050 goto fail;