summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-11-17 06:29:26 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-05 23:41:19 +0100
commit2cff944720332535a24b7eae16cff32055a43048 (patch)
tree02758aa2ac6f9cece083fc216576042c05789ede /drivers
parent[PATCH] pcmcia: validate_mem shouldn't be void (diff)
downloadlinux-2cff944720332535a24b7eae16cff32055a43048.tar.xz
linux-2cff944720332535a24b7eae16cff32055a43048.zip
[PATCH] pcmcia: validate_mem fix
Also return a value if CONFIG_PCMCIA_PROBE is not set. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index ebfcab5df9ea..6b18092205b1 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -467,15 +467,19 @@ static int validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)
#else /* CONFIG_PCMCIA_PROBE */
-static void validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)
+static int validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)
{
struct resource_map *m, mm;
struct socket_data *s_data = s->resource_data;
+ unsigned long ok = 0;
for (m = s_data->mem_db.next; m != &s_data->mem_db; m = mm.next) {
mm = *m;
- do_mem_probe(mm.base, mm.num, s);
+ ok += do_mem_probe(mm.base, mm.num, s);
}
+ if (ok > 0)
+ return 0;
+ return -ENODEV;
}
#endif /* CONFIG_PCMCIA_PROBE */