[PATCH] tcic: eliminate deprecated check_region()

Randy.Dunlap rddunlap at osdl.org
Fri Jan 14 17:36:13 EST 2005


tcic: eliminate deprecated check_region();

Signed-off-by: Randy Dunlap <rddunlap at osdl.org>

diffstat:=
 drivers/pcmcia/tcic.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff -Naurp ./drivers/pcmcia/tcic.c~check_region ./drivers/pcmcia/tcic.c
--- ./drivers/pcmcia/tcic.c~check_region	2004-12-24 13:34:58.000000000 -0800
+++ ./drivers/pcmcia/tcic.c	2005-01-14 13:39:57.573262744 -0800
@@ -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;
 }
 
 /*======================================================================

---



More information about the linux-pcmcia mailing list