summaryrefslogtreecommitdiffstats
path: root/sound/oss/pss.c
diff options
context:
space:
mode:
authorWang Shaoyan <wangshaoyan.pt@taobao.com>2011-08-08 13:10:26 +0200
committerTakashi Iwai <tiwai@suse.de>2011-08-08 14:29:36 +0200
commit8039290a91c5dc4414093c086987a5d7738fe2fd (patch)
treea65f34216339311dc3513e4f46cc93cda5403148 /sound/oss/pss.c
parentALSA: timer - Add NULL-check for invalid slave timer (diff)
downloadlinux-8039290a91c5dc4414093c086987a5d7738fe2fd.tar.xz
linux-8039290a91c5dc4414093c086987a5d7738fe2fd.zip
sound: pss - don't use the deprecated function check_region
sound/oss/pss.c: In function 'configure_nonsound_components': sound/oss/pss.c:676: warning: 'check_region' is deprecated (declared at include/linux/ioport.h:201) Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/oss/pss.c')
-rw-r--r--sound/oss/pss.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/oss/pss.c b/sound/oss/pss.c
index 9b800ce5100e..2fc0624024b5 100644
--- a/sound/oss/pss.c
+++ b/sound/oss/pss.c
@@ -673,7 +673,8 @@ static void configure_nonsound_components(void)
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 (!request_region(pss_cdrom_port, 2, "PSS CDROM")) {
+ pss_cdrom_port = -1;
printk(KERN_ERR "PSS: CDROM I/O port conflict.\n");
} else {
set_io_base(devc, CONF_CDROM, pss_cdrom_port);
@@ -1232,7 +1233,8 @@ static void __exit cleanup_pss(void)
if(pssmpu)
unload_pss_mpu(&cfg_mpu);
unload_pss(&cfg);
- }
+ } else if (pss_cdrom_port != -1)
+ release_region(pss_cdrom_port, 2);
if(!pss_keep_settings) /* Keep hardware settings if asked */
{