/* Locking note: Must be called with skt_mutex held!  */
static int pcmcia_nonstatic_validate_mem(struct pcmcia_socket *s)
/* Locking note: Must be called with skt_mutex held!  */
static int pcmcia_nonstatic_validate_mem(struct pcmcia_socket *s)
{
	struct socket_data *s_data = s->resource_data;
	unsigned int probe_mask = MEM_PROBE_LOW;
	int ret = 0;
	if (!probe_mem)
		return 0;
	mutex_lock(&rsrc_mutex);
	if (s->features & SS_CAP_PAGE_REGS)
		probe_mask = MEM_PROBE_HIGH;
	if (probe_mask & ~s_data->rsrc_mem_probe) {
		if (s->state & SOCKET_PRESENT)
			ret = validate_mem(s, probe_mask);
		if (!ret)
			s_data->rsrc_mem_probe |= probe_mask;
	}
	mutex_unlock(&rsrc_mutex);
	return ret;
}