diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 05:10:56 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:29:43 -0400 |
commit | 3939c1ef1f954409d1441c09fbc08376655758fe (patch) | |
tree | a66c10593b8b47a1a63471dd6fc6f9fb214063ca /drivers/pcmcia/cs.c | |
parent | d8b0a49da4f213c637d458319432016f4ea5e12a (diff) |
pcmcia: deprecate CS_NO_CARD
It means that no card can be detected in the socket, so return -ENODEV
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r-- | drivers/pcmcia/cs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index e847c3231da8..15a1203d45fb 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -367,7 +367,7 @@ static int socket_reset(struct pcmcia_socket *skt) | |||
367 | skt->ops->get_status(skt, &status); | 367 | skt->ops->get_status(skt, &status); |
368 | 368 | ||
369 | if (!(status & SS_DETECT)) | 369 | if (!(status & SS_DETECT)) |
370 | return CS_NO_CARD; | 370 | return -ENODEV; |
371 | 371 | ||
372 | if (status & SS_READY) | 372 | if (status & SS_READY) |
373 | return 0; | 373 | return 0; |
@@ -428,14 +428,14 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay) | |||
428 | 428 | ||
429 | skt->ops->get_status(skt, &status); | 429 | skt->ops->get_status(skt, &status); |
430 | if (!(status & SS_DETECT)) | 430 | if (!(status & SS_DETECT)) |
431 | return CS_NO_CARD; | 431 | return -ENODEV; |
432 | 432 | ||
433 | msleep(initial_delay * 10); | 433 | msleep(initial_delay * 10); |
434 | 434 | ||
435 | for (i = 0; i < 100; i++) { | 435 | for (i = 0; i < 100; i++) { |
436 | skt->ops->get_status(skt, &status); | 436 | skt->ops->get_status(skt, &status); |
437 | if (!(status & SS_DETECT)) | 437 | if (!(status & SS_DETECT)) |
438 | return CS_NO_CARD; | 438 | return -ENODEV; |
439 | 439 | ||
440 | if (!(status & SS_PENDING)) | 440 | if (!(status & SS_PENDING)) |
441 | break; | 441 | break; |
@@ -504,7 +504,7 @@ static int socket_insert(struct pcmcia_socket *skt) | |||
504 | cs_dbg(skt, 4, "insert\n"); | 504 | cs_dbg(skt, 4, "insert\n"); |
505 | 505 | ||
506 | if (!cs_socket_get(skt)) | 506 | if (!cs_socket_get(skt)) |
507 | return CS_NO_CARD; | 507 | return -ENODEV; |
508 | 508 | ||
509 | ret = socket_setup(skt, setup_delay); | 509 | ret = socket_setup(skt, setup_delay); |
510 | if (ret == 0) { | 510 | if (ret == 0) { |
@@ -761,7 +761,7 @@ int pccard_reset_card(struct pcmcia_socket *skt) | |||
761 | mutex_lock(&skt->skt_mutex); | 761 | mutex_lock(&skt->skt_mutex); |
762 | do { | 762 | do { |
763 | if (!(skt->state & SOCKET_PRESENT)) { | 763 | if (!(skt->state & SOCKET_PRESENT)) { |
764 | ret = CS_NO_CARD; | 764 | ret = -ENODEV; |
765 | break; | 765 | break; |
766 | } | 766 | } |
767 | if (skt->state & SOCKET_SUSPEND) { | 767 | if (skt->state & SOCKET_SUSPEND) { |
@@ -806,7 +806,7 @@ int pcmcia_suspend_card(struct pcmcia_socket *skt) | |||
806 | mutex_lock(&skt->skt_mutex); | 806 | mutex_lock(&skt->skt_mutex); |
807 | do { | 807 | do { |
808 | if (!(skt->state & SOCKET_PRESENT)) { | 808 | if (!(skt->state & SOCKET_PRESENT)) { |
809 | ret = CS_NO_CARD; | 809 | ret = -ENODEV; |
810 | break; | 810 | break; |
811 | } | 811 | } |
812 | if (skt->state & SOCKET_CARDBUS) { | 812 | if (skt->state & SOCKET_CARDBUS) { |
@@ -836,7 +836,7 @@ int pcmcia_resume_card(struct pcmcia_socket *skt) | |||
836 | mutex_lock(&skt->skt_mutex); | 836 | mutex_lock(&skt->skt_mutex); |
837 | do { | 837 | do { |
838 | if (!(skt->state & SOCKET_PRESENT)) { | 838 | if (!(skt->state & SOCKET_PRESENT)) { |
839 | ret = CS_NO_CARD; | 839 | ret = -ENODEV; |
840 | break; | 840 | break; |
841 | } | 841 | } |
842 | if (skt->state & SOCKET_CARDBUS) { | 842 | if (skt->state & SOCKET_CARDBUS) { |
@@ -896,7 +896,7 @@ int pcmcia_insert_card(struct pcmcia_socket *skt) | |||
896 | ret = -EBUSY; | 896 | ret = -EBUSY; |
897 | break; | 897 | break; |
898 | } | 898 | } |
899 | if (socket_insert(skt) == CS_NO_CARD) { | 899 | if (socket_insert(skt) == -ENODEV) { |
900 | ret = -ENODEV; | 900 | ret = -ENODEV; |
901 | break; | 901 | break; |
902 | } | 902 | } |