summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-08-03 11:40:19 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2008-08-23 02:29:48 +0200
commitf958095ef4fc96e978c6eddcaca29100e5276c7f (patch)
tree16afbb0172e7d7851350d37784bbf1fb0493c90d /drivers/pcmcia/cs.c
parent943f70f1b5182c5220641ccb7bb905005162e227 (diff)
downloadblackbird-op-linux-f958095ef4fc96e978c6eddcaca29100e5276c7f.tar.gz
blackbird-op-linux-f958095ef4fc96e978c6eddcaca29100e5276c7f.zip
pcmcia: deprecate CS_IN_USE
If a resource is already in use, mark it with -EBUSY. Same for cards already asleep. (includes a fix for a bug found by Larry Finger -- thanks!) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r--drivers/pcmcia/cs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index f9424801b9c8..1c6c8c8f57c9 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -534,7 +534,7 @@ static int socket_insert(struct pcmcia_socket *skt)
static int socket_suspend(struct pcmcia_socket *skt)
{
if (skt->state & SOCKET_SUSPEND)
- return CS_IN_USE;
+ return -EBUSY;
send_event(skt, CS_EVENT_PM_SUSPEND, CS_EVENT_PRI_LOW);
skt->socket = dead_socket;
@@ -556,7 +556,7 @@ static int socket_resume(struct pcmcia_socket *skt)
int ret;
if (!(skt->state & SOCKET_SUSPEND))
- return CS_IN_USE;
+ return -EBUSY;
skt->socket = dead_socket;
skt->ops->init(skt);
@@ -765,7 +765,7 @@ int pccard_reset_card(struct pcmcia_socket *skt)
break;
}
if (skt->state & SOCKET_SUSPEND) {
- ret = CS_IN_USE;
+ ret = -EBUSY;
break;
}
if (skt->state & SOCKET_CARDBUS) {
OpenPOWER on IntegriCloud