[PATCH] pcmcia: fix i82365 request_region double usage
[PATCH] pcmcia: fix i82365 request_region double usage

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f354942cb301fed273f423fb5c4f57bde3efc5b2
converted the check_region() calls in drivers/pcmcia/i82365.c into
request_regions.  Unfortunately this seems to have broken things.

isa_probe() used to call check_region() and then call add_pcic() which would
request_region().

Now isa_probe() calls request_region() and then calls add_pcic() which calls
request_region() again, this fails and add_pcic() returns immediately without
doing all the setup etc.

On the face of it the patch below fixes the problem, by not doing the second
request region in add_pcic().  I think this is preferable to remove the call
in isa_probe() since identify() touches the I/O regions and is called before
add_pcic().

However I haven't fully grokked the meaning of the code which follows the
request_region() in isa_probe(), so I'm not sure that the handling WRT
multiple sockets and multiple bridge chips is correct.  In particular I'm not
convinced that the regions for subsequent sockets and/or bridges will be
requested at all.  I suspect a more thorough reworking by someone who
understands what is going on there might be in order.

I should mention that I'm actually messing about with this on an ARM platform
with wacky memory and i/o mapping offsets etc, it doesn't quite work yet for
other reasons which preclude full testing etc, but I think the problem above
is still present for more normal x86 stuff.

Signed-off-by: Ian Campbell <2e67cd52d4c40f0e1e7a407aea26b03fef9123ea@arcom.com>
Signed-off-by: Dominik Brodowski <ba324ca7b1c77fc20bb970d5aff6eea9377918a5@dominikbrodowski.net>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@osdl.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@osdl.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas