Commit 9c093b8a authored by Russell King's avatar Russell King

[PCMCIA] Clean up socket state handling around shutdown

 
There is no need for shutdown_socket() to touch s->state
directly - this can be all done in skt_shutdown().
parent 34e5bea9
......@@ -452,7 +452,6 @@ static void shutdown_socket(struct pcmcia_socket *s)
cs_dbg(s, 1, "shutdown_socket\n");
/* Blank out the socket state */
s->state &= SOCKET_PRESENT|SOCKET_INUSE;
s->socket = dead_socket;
s->ops->init(s);
s->ops->set_socket(s, &s->socket);
......@@ -542,9 +541,10 @@ static void socket_shutdown(struct pcmcia_socket *skt)
cs_dbg(skt, 4, "shutdown\n");
socket_remove_drivers(skt);
skt->state &= SOCKET_INUSE|SOCKET_PRESENT;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(cs_to_timeout(shutdown_delay));
skt->state &= ~SOCKET_PRESENT;
skt->state &= SOCKET_INUSE;
shutdown_socket(skt);
}
......
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