Commit 1b55e603 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Linus Torvalds

[PATCH] pcmcia: find_mem_region only for non-statically mapped sockets

Calls to adjust_mem_region only happen if !SS_CAP_STATIC_MAP.
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1b71faba
......@@ -638,7 +638,7 @@ struct resource *nonstatic_find_io_region(unsigned long base, int num,
return res;
}
struct resource *find_mem_region(u_long base, u_long num, u_long align,
struct resource * nonstatic_find_mem_region(u_long base, u_long num, u_long align,
int low, struct pcmcia_socket *s)
{
struct resource *res = make_resource(0, num, IORESOURCE_MEM, s->dev.class_id);
......@@ -1005,15 +1005,25 @@ struct resource *find_io_region(unsigned long base, int num,
return NULL;
}
struct resource *find_mem_region(u_long base, u_long num, u_long align,
int low, struct pcmcia_socket *s)
{
if (s->resource_ops->find_mem)
return s->resource_ops->find_mem(base, num, align, low, s);
return NULL;
}
struct pccard_resource_ops pccard_static_ops = {
.validate_mem = NULL,
.adjust_io_region = NULL,
.find_io = NULL,
.find_mem = NULL,
};
struct pccard_resource_ops pccard_nonstatic_ops = {
.validate_mem = pcmcia_nonstatic_validate_mem,
.adjust_io_region = nonstatic_adjust_io_region,
.find_io = nonstatic_find_io_region,
.find_mem = nonstatic_find_mem_region,
};
......@@ -124,6 +124,9 @@ struct pccard_resource_ops {
struct resource* (*find_io) (unsigned long base, int num,
unsigned long align,
struct pcmcia_socket *s);
struct resource* (*find_mem) (unsigned long base, unsigned long num,
unsigned long align, int low,
struct pcmcia_socket *s);
};
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment