diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 05:40:19 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:29:48 -0400 |
commit | f958095ef4fc96e978c6eddcaca29100e5276c7f (patch) | |
tree | 16afbb0172e7d7851350d37784bbf1fb0493c90d /drivers/pcmcia/cs.c | |
parent | 943f70f1b5182c5220641ccb7bb905005162e227 (diff) |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index f9424801b9c..1c6c8c8f57c 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -534,7 +534,7 @@ static int socket_insert(struct pcmcia_socket *skt) | |||
534 | static int socket_suspend(struct pcmcia_socket *skt) | 534 | static int socket_suspend(struct pcmcia_socket *skt) |
535 | { | 535 | { |
536 | if (skt->state & SOCKET_SUSPEND) | 536 | if (skt->state & SOCKET_SUSPEND) |
537 | return CS_IN_USE; | 537 | return -EBUSY; |
538 | 538 | ||
539 | send_event(skt, CS_EVENT_PM_SUSPEND, CS_EVENT_PRI_LOW); | 539 | send_event(skt, CS_EVENT_PM_SUSPEND, CS_EVENT_PRI_LOW); |
540 | skt->socket = dead_socket; | 540 | skt->socket = dead_socket; |
@@ -556,7 +556,7 @@ static int socket_resume(struct pcmcia_socket *skt) | |||
556 | int ret; | 556 | int ret; |
557 | 557 | ||
558 | if (!(skt->state & SOCKET_SUSPEND)) | 558 | if (!(skt->state & SOCKET_SUSPEND)) |
559 | return CS_IN_USE; | 559 | return -EBUSY; |
560 | 560 | ||
561 | skt->socket = dead_socket; | 561 | skt->socket = dead_socket; |
562 | skt->ops->init(skt); | 562 | skt->ops->init(skt); |
@@ -765,7 +765,7 @@ int pccard_reset_card(struct pcmcia_socket *skt) | |||
765 | break; | 765 | break; |
766 | } | 766 | } |
767 | if (skt->state & SOCKET_SUSPEND) { | 767 | if (skt->state & SOCKET_SUSPEND) { |
768 | ret = CS_IN_USE; | 768 | ret = -EBUSY; |
769 | break; | 769 | break; |
770 | } | 770 | } |
771 | if (skt->state & SOCKET_CARDBUS) { | 771 | if (skt->state & SOCKET_CARDBUS) { |