/* probe for the I/O port address */
- if (io != 0x240 && request_region(0x220,8,"ltpc")) {
- x = inb_p(0x220+6);
- if ( (x!=0xff) && (x>=0xf0) ) {
- io = 0x220;
- portfound=1;
- }
- else {
- release_region(0x220,8);
- }
- }
if (io != 0x220 && request_region(0x240,8,"ltpc")) {
y = inb_p(0x240+6);
if ( (y!=0xff) && (y>=0xf0) ){
io = 0x240;
- portfound=1;
- }
- else {
- release_region(0x240,8);
+ goto got_port;
}
+ release_region(0x240,8);
}
-
- if(io && !portfound && request_region(io,8,"ltpc")){
- portfound = 1;
- }
- if(!portfound) {
- /* give up in despair */
- printk(KERN_ERR "LocalTalk card not found; 220 = %02x, 240 =
%02x.\n", x,y);
- return -1;
+ if (io != 0x240 && request_region(0x220,8,"ltpc")) {
+ x = inb_p(0x220+6);
+ if ( (x!=0xff) && (x>=0xf0) ) {
+ io = 0x220;
+ goto got_port;
+ }
+ release_region(0x220,8);
}