aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.de>2005-01-11 03:28:10 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-11 03:28:10 -0800
commitaa4cb19247959d6c3ee9f0274f1d299155791aae (patch)
tree9ee65bf8888b55a78cc17d9580959ec5af789aa1 /drivers
parent23d2f5dbc2b457b2f7f486f343ee8feece9eba8a (diff)
downloadhistory-aa4cb19247959d6c3ee9f0274f1d299155791aae.tar.gz
[PATCH] pcmcia: adjust_io_region only for non-statically mapped sockets
Calls to adjust_io_region only happen if !SS_CAP_STATIC_MAP. Signed-off-by: Dominik Brodowski <linux@brodo.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pcmcia/rsrc_mgr.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
index 1bc69b669477ff..a97c971ad805df 100644
--- a/drivers/pcmcia/rsrc_mgr.c
+++ b/drivers/pcmcia/rsrc_mgr.c
@@ -577,8 +577,8 @@ pcmcia_align(void *align_data, struct resource *res,
* Adjust an existing IO region allocation, but making sure that we don't
* encroach outside the resources which the user supplied.
*/
-int adjust_io_region(struct resource *res, unsigned long r_start,
- unsigned long r_end, struct pcmcia_socket *s)
+static int nonstatic_adjust_io_region(struct resource *res, unsigned long r_start,
+ unsigned long r_end, struct pcmcia_socket *s)
{
resource_map_t *m;
int ret = -ENOMEM;
@@ -599,6 +599,14 @@ int adjust_io_region(struct resource *res, unsigned long r_start,
return ret;
}
+int adjust_io_region(struct resource *res, unsigned long r_start,
+ unsigned long r_end, struct pcmcia_socket *s)
+{
+ if (s->resource_ops->adjust_io_region)
+ return s->resource_ops->adjust_io_region(res, r_start, r_end, s);
+ return -ENOMEM;
+}
+
/*======================================================================
These find ranges of I/O ports or memory addresses that are not
@@ -991,8 +999,10 @@ void release_resource_db(struct pcmcia_socket *s)
struct pccard_resource_ops pccard_static_ops = {
.validate_mem = NULL,
+ .adjust_io_region = NULL,
};
struct pccard_resource_ops pccard_nonstatic_ops = {
.validate_mem = pcmcia_nonstatic_validate_mem,
+ .adjust_io_region = nonstatic_adjust_io_region,
};