From 2a7cc20a9b9502a92286da0ede94aa62aa72331d Mon Sep 17 00:00:00 2001 From: Dominik Brodowski <linux@dominikbrodowski.de> Date: Tue, 25 Jan 2005 04:49:39 -0800 Subject: [PATCH] [PATCH] pcmcia: tcic: eleminate deprecated check_region() From: Randy Dunlap <rddunlap@osdl.org> tcic: eliminate deprecated check_region(); Signed-off-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Dominik Brodowski <linux@brodo.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> --- drivers/pcmcia/tcic.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c index e20438a7408f..c2406d04206b 100644 --- a/drivers/pcmcia/tcic.c +++ b/drivers/pcmcia/tcic.c @@ -344,10 +344,14 @@ static int __init is_active(int s) if ((sstat & TCIC_SSTAT_CD) && (pwr & TCIC_PWR_VCC(s)) && (scf1 & TCIC_SCF1_IOSTS) && (ioctl & TCIC_ICTL_ENA) && - (check_region(base, num) != 0) && ((base & 0xfeef) != 0x02e8)) - return 1; - else - return 0; + ((base & 0xfeef) != 0x02e8)) { + struct resource *res = request_region(base, num, "tcic-2"); + if (!res) /* region is busy */ + return 1; + release_region(base, num); + } + + return 0; } /*====================================================================== -- 2.30.9