[patch 1/5] pcmcia: tcic: eleminate deprecated check_region()
Dominik Brodowski
linux at dominikbrodowski.de
Wed Jan 19 17:12:15 EST 2005
From: Randy Dunlap <rddunlap at osdl.org>
tcic: eliminate deprecated check_region();
Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
Signed-off-by: Dominik Brodowski <linux at brodo.de>
---
drivers/pcmcia/tcic.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
Index: 2.6.11-rc1/drivers/pcmcia/tcic.c
===================================================================
--- 2.6.11-rc1.orig/drivers/pcmcia/tcic.c 2005-01-12 10:49:03.000000000 +0100
+++ 2.6.11-rc1/drivers/pcmcia/tcic.c 2005-01-15 10:32:21.000000000 +0100
@@ -344,10 +344,14 @@
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