diff options
Diffstat (limited to 'drivers/pcmcia/i82365.c')
-rw-r--r-- | drivers/pcmcia/i82365.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index 90a335a5d9fa..a713015e8228 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #include <asm/io.h> | 53 | #include <asm/io.h> |
54 | #include <asm/system.h> | 54 | #include <asm/system.h> |
55 | 55 | ||
56 | #include <pcmcia/version.h> | ||
57 | #include <pcmcia/cs_types.h> | 56 | #include <pcmcia/cs_types.h> |
58 | #include <pcmcia/ss.h> | 57 | #include <pcmcia/ss.h> |
59 | #include <pcmcia/cs.h> | 58 | #include <pcmcia/cs.h> |
@@ -669,11 +668,13 @@ static int __init is_alive(u_short sock) | |||
669 | if ((stat & I365_CS_DETECT) && (stat & I365_CS_POWERON) && | 668 | if ((stat & I365_CS_DETECT) && (stat & I365_CS_POWERON) && |
670 | (i365_get(sock, I365_INTCTL) & I365_PC_IOCARD) && | 669 | (i365_get(sock, I365_INTCTL) & I365_PC_IOCARD) && |
671 | (i365_get(sock, I365_ADDRWIN) & I365_ENA_IO(0)) && | 670 | (i365_get(sock, I365_ADDRWIN) & I365_ENA_IO(0)) && |
672 | (check_region(start, stop-start+1) != 0) && | 671 | ((start & 0xfeef) != 0x02e8)) { |
673 | ((start & 0xfeef) != 0x02e8)) | 672 | if (!request_region(start, stop-start+1, "i82365")) |
674 | return 1; | 673 | return 1; |
675 | else | 674 | release_region(start, stop-start+1); |
676 | return 0; | 675 | } |
676 | |||
677 | return 0; | ||
677 | } | 678 | } |
678 | 679 | ||
679 | /*====================================================================*/ | 680 | /*====================================================================*/ |
@@ -696,8 +697,6 @@ static void __init add_pcic(int ns, int type) | |||
696 | struct i82365_socket *t = &socket[sockets-ns]; | 697 | struct i82365_socket *t = &socket[sockets-ns]; |
697 | 698 | ||
698 | base = sockets-ns; | 699 | base = sockets-ns; |
699 | if (t->ioaddr > 0) request_region(t->ioaddr, 2, "i82365"); | ||
700 | |||
701 | if (base == 0) printk("\n"); | 700 | if (base == 0) printk("\n"); |
702 | printk(KERN_INFO " %s", pcic[type].name); | 701 | printk(KERN_INFO " %s", pcic[type].name); |
703 | printk(" ISA-to-PCMCIA at port %#lx ofs 0x%02x", | 702 | printk(" ISA-to-PCMCIA at port %#lx ofs 0x%02x", |
@@ -803,7 +802,7 @@ static void __init isa_probe(void) | |||
803 | } | 802 | } |
804 | #endif | 803 | #endif |
805 | 804 | ||
806 | if (check_region(i365_base, 2) != 0) { | 805 | if (!request_region(i365_base, 2, "i82365")) { |
807 | if (sockets == 0) | 806 | if (sockets == 0) |
808 | printk("port conflict at %#lx\n", i365_base); | 807 | printk("port conflict at %#lx\n", i365_base); |
809 | return; | 808 | return; |
@@ -1441,6 +1440,7 @@ static void __exit exit_i82365(void) | |||
1441 | i365_set(i, I365_CSCINT, 0); | 1440 | i365_set(i, I365_CSCINT, 0); |
1442 | release_region(socket[i].ioaddr, 2); | 1441 | release_region(socket[i].ioaddr, 2); |
1443 | } | 1442 | } |
1443 | release_region(i365_base, 2); | ||
1444 | #ifdef CONFIG_PNP | 1444 | #ifdef CONFIG_PNP |
1445 | if (i82365_pnpdev) | 1445 | if (i82365_pnpdev) |
1446 | pnp_disable_dev(i82365_pnpdev); | 1446 | pnp_disable_dev(i82365_pnpdev); |