/* Some i82365-based systems send multiple SS_DETECT events during card insertion, and the "card present" status bit seems to bounce. This will probably be true with GPIO-based card detection systems after the product has aged.  */
static void socket_detect_change(struct pcmcia_socket *skt)
/* Some i82365-based systems send multiple SS_DETECT events during card insertion, and the "card present" status bit seems to bounce. This will probably be true with GPIO-based card detection systems after the product has aged.  */
static void socket_detect_change(struct pcmcia_socket *skt)
{
	if (!(skt->state & SOCKET_SUSPEND)) {
		int status;
		if (!(skt->state & SOCKET_PRESENT))
			msleep(20);
		skt->ops->get_status(skt, &status);
		if ((skt->state & SOCKET_PRESENT) &&
		     !(status & SS_DETECT))
			socket_remove(skt);
		if (!(skt->state & SOCKET_PRESENT) &&
		    (status & SS_DETECT))
			socket_insert(skt);
	}
}