提交 2cff9447 编写于 作者: A Andrew Morton 提交者: Dominik Brodowski

[PATCH] pcmcia: validate_mem fix

Also return a value if CONFIG_PCMCIA_PROBE is not set.
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 de75914e
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册