diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 04:47:59 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:29:41 -0400 |
commit | de6405e9d1e7530ea33b62e1a3921338f836a046 (patch) | |
tree | 4952537154518b48875bd126b3ac165ed4eb9198 /drivers/pcmcia | |
parent | 1168386aa7d850ead2ae135d5a7949a592c6e9a0 (diff) |
pcmcia: deprecate CS_UNSUPPORTED_*
CS_UNSUPPORTED_MODE and CS_UNSUPPORTED_FUNCTION were mostly used to denote
trying to use PCMCIA functions on CardBus cards.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/cistpl.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/cs.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/ds.c | 3 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 8 |
5 files changed, 12 insertions, 11 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 8d37768d0b46..71231e8c7edd 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c | |||
@@ -1397,7 +1397,7 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse) | |||
1397 | ret = 0; | 1397 | ret = 0; |
1398 | break; | 1398 | break; |
1399 | default: | 1399 | default: |
1400 | ret = CS_UNSUPPORTED_FUNCTION; | 1400 | ret = -EINVAL; |
1401 | break; | 1401 | break; |
1402 | } | 1402 | } |
1403 | return ret; | 1403 | return ret; |
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 037cb0c7e094..e847c3231da8 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -769,7 +769,7 @@ int pccard_reset_card(struct pcmcia_socket *skt) | |||
769 | break; | 769 | break; |
770 | } | 770 | } |
771 | if (skt->state & SOCKET_CARDBUS) { | 771 | if (skt->state & SOCKET_CARDBUS) { |
772 | ret = CS_UNSUPPORTED_FUNCTION; | 772 | ret = -EPERM; |
773 | break; | 773 | break; |
774 | } | 774 | } |
775 | 775 | ||
@@ -810,7 +810,7 @@ int pcmcia_suspend_card(struct pcmcia_socket *skt) | |||
810 | break; | 810 | break; |
811 | } | 811 | } |
812 | if (skt->state & SOCKET_CARDBUS) { | 812 | if (skt->state & SOCKET_CARDBUS) { |
813 | ret = CS_UNSUPPORTED_FUNCTION; | 813 | ret = -EPERM; |
814 | break; | 814 | break; |
815 | } | 815 | } |
816 | if (skt->callback) { | 816 | if (skt->callback) { |
@@ -840,7 +840,7 @@ int pcmcia_resume_card(struct pcmcia_socket *skt) | |||
840 | break; | 840 | break; |
841 | } | 841 | } |
842 | if (skt->state & SOCKET_CARDBUS) { | 842 | if (skt->state & SOCKET_CARDBUS) { |
843 | ret = CS_UNSUPPORTED_FUNCTION; | 843 | ret = -EPERM; |
844 | break; | 844 | break; |
845 | } | 845 | } |
846 | ret = socket_resume(skt); | 846 | ret = socket_resume(skt); |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 7142fd647e7b..4a658e2b6f21 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -85,8 +85,7 @@ static const lookup_t error_table[] = { | |||
85 | { CS_BAD_VCC, "Bad Vcc" }, | 85 | { CS_BAD_VCC, "Bad Vcc" }, |
86 | { CS_BAD_VPP, "Bad Vpp" }, | 86 | { CS_BAD_VPP, "Bad Vpp" }, |
87 | { CS_NO_CARD, "No card present" }, | 87 | { CS_NO_CARD, "No card present" }, |
88 | { CS_UNSUPPORTED_FUNCTION, "Usupported function" }, | 88 | { -EINVAL, "Bad parameter" }, |
89 | { CS_UNSUPPORTED_MODE, "Unsupported mode" }, | ||
90 | { CS_GENERAL_FAILURE, "General failure" }, | 89 | { CS_GENERAL_FAILURE, "General failure" }, |
91 | { CS_BAD_ARGS, "Bad arguments" }, | 90 | { CS_BAD_ARGS, "Bad arguments" }, |
92 | { CS_CONFIGURATION_LOCKED, "Configuration locked" }, | 91 | { CS_CONFIGURATION_LOCKED, "Configuration locked" }, |
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index ef64ceb5e751..40bef470b47c 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -175,7 +175,7 @@ static inline int adjust_irq(struct pcmcia_socket *s, adjust_t *adj) { | |||
175 | static int pcmcia_adjust_resource_info(adjust_t *adj) | 175 | static int pcmcia_adjust_resource_info(adjust_t *adj) |
176 | { | 176 | { |
177 | struct pcmcia_socket *s; | 177 | struct pcmcia_socket *s; |
178 | int ret = CS_UNSUPPORTED_FUNCTION; | 178 | int ret = -ENOSYS; |
179 | unsigned long flags; | 179 | unsigned long flags; |
180 | 180 | ||
181 | down_read(&pcmcia_socket_list_rwsem); | 181 | down_read(&pcmcia_socket_list_rwsem); |
@@ -975,7 +975,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
975 | err = -ENOSPC; break; | 975 | err = -ENOSPC; break; |
976 | case CS_NO_MORE_ITEMS: | 976 | case CS_NO_MORE_ITEMS: |
977 | err = -ENODATA; break; | 977 | err = -ENODATA; break; |
978 | case CS_UNSUPPORTED_FUNCTION: | 978 | case -ENOSYS: |
979 | err = -ENOSYS; break; | 979 | err = -ENOSYS; break; |
980 | default: | 980 | default: |
981 | err = -EIO; break; | 981 | err = -EIO; break; |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 69d87a7e0766..3b8b0e14d8cf 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -475,8 +475,10 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, | |||
475 | if (!(s->state & SOCKET_PRESENT)) | 475 | if (!(s->state & SOCKET_PRESENT)) |
476 | return CS_NO_CARD; | 476 | return CS_NO_CARD; |
477 | 477 | ||
478 | if (req->IntType & INT_CARDBUS) | 478 | if (req->IntType & INT_CARDBUS) { |
479 | return CS_UNSUPPORTED_MODE; | 479 | ds_dbg(p_dev->socket, 0, "IntType may not be INT_CARDBUS\n"); |
480 | return -EINVAL; | ||
481 | } | ||
480 | c = p_dev->function_config; | 482 | c = p_dev->function_config; |
481 | if (c->state & CONFIG_LOCKED) | 483 | if (c->state & CONFIG_LOCKED) |
482 | return CS_CONFIGURATION_LOCKED; | 484 | return CS_CONFIGURATION_LOCKED; |
@@ -592,7 +594,7 @@ int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req) | |||
592 | return CS_NO_CARD; | 594 | return CS_NO_CARD; |
593 | 595 | ||
594 | if (!req) | 596 | if (!req) |
595 | return CS_UNSUPPORTED_MODE; | 597 | return -EINVAL; |
596 | c = p_dev->function_config; | 598 | c = p_dev->function_config; |
597 | if (c->state & CONFIG_LOCKED) | 599 | if (c->state & CONFIG_LOCKED) |
598 | return CS_CONFIGURATION_LOCKED; | 600 | return CS_CONFIGURATION_LOCKED; |