Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114135
b: refs/heads/master
c: de6405e
h: refs/heads/master
i:
  114133: 300273e
  114131: defef9a
  114127: da81ad8
v: v3
  • Loading branch information
Dominik Brodowski committed Aug 23, 2008
1 parent 4bf981d commit 931db43
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1168386aa7d850ead2ae135d5a7949a592c6e9a0
refs/heads/master: de6405e9d1e7530ea33b62e1a3921338f836a046
2 changes: 1 addition & 1 deletion trunk/drivers/pcmcia/cistpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse)
ret = 0;
break;
default:
ret = CS_UNSUPPORTED_FUNCTION;
ret = -EINVAL;
break;
}
return ret;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/pcmcia/cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ int pccard_reset_card(struct pcmcia_socket *skt)
break;
}
if (skt->state & SOCKET_CARDBUS) {
ret = CS_UNSUPPORTED_FUNCTION;
ret = -EPERM;
break;
}

Expand Down Expand Up @@ -810,7 +810,7 @@ int pcmcia_suspend_card(struct pcmcia_socket *skt)
break;
}
if (skt->state & SOCKET_CARDBUS) {
ret = CS_UNSUPPORTED_FUNCTION;
ret = -EPERM;
break;
}
if (skt->callback) {
Expand Down Expand Up @@ -840,7 +840,7 @@ int pcmcia_resume_card(struct pcmcia_socket *skt)
break;
}
if (skt->state & SOCKET_CARDBUS) {
ret = CS_UNSUPPORTED_FUNCTION;
ret = -EPERM;
break;
}
ret = socket_resume(skt);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ static const lookup_t error_table[] = {
{ CS_BAD_VCC, "Bad Vcc" },
{ CS_BAD_VPP, "Bad Vpp" },
{ CS_NO_CARD, "No card present" },
{ CS_UNSUPPORTED_FUNCTION, "Usupported function" },
{ CS_UNSUPPORTED_MODE, "Unsupported mode" },
{ -EINVAL, "Bad parameter" },
{ CS_GENERAL_FAILURE, "General failure" },
{ CS_BAD_ARGS, "Bad arguments" },
{ CS_CONFIGURATION_LOCKED, "Configuration locked" },
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/pcmcia/pcmcia_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static inline int adjust_irq(struct pcmcia_socket *s, adjust_t *adj) {
static int pcmcia_adjust_resource_info(adjust_t *adj)
{
struct pcmcia_socket *s;
int ret = CS_UNSUPPORTED_FUNCTION;
int ret = -ENOSYS;
unsigned long flags;

down_read(&pcmcia_socket_list_rwsem);
Expand Down Expand Up @@ -975,7 +975,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
err = -ENOSPC; break;
case CS_NO_MORE_ITEMS:
err = -ENODATA; break;
case CS_UNSUPPORTED_FUNCTION:
case -ENOSYS:
err = -ENOSYS; break;
default:
err = -EIO; break;
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/pcmcia/pcmcia_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,10 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
if (!(s->state & SOCKET_PRESENT))
return CS_NO_CARD;

if (req->IntType & INT_CARDBUS)
return CS_UNSUPPORTED_MODE;
if (req->IntType & INT_CARDBUS) {
ds_dbg(p_dev->socket, 0, "IntType may not be INT_CARDBUS\n");
return -EINVAL;
}
c = p_dev->function_config;
if (c->state & CONFIG_LOCKED)
return CS_CONFIGURATION_LOCKED;
Expand Down Expand Up @@ -592,7 +594,7 @@ int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req)
return CS_NO_CARD;

if (!req)
return CS_UNSUPPORTED_MODE;
return -EINVAL;
c = p_dev->function_config;
if (c->state & CONFIG_LOCKED)
return CS_CONFIGURATION_LOCKED;
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/pcmcia/cs.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ typedef struct error_info_t {
#define CS_BAD_WINDOW -ENODEV
#define CS_WRITE_FAILURE -EIO
#define CS_NO_CARD 0x14
#define CS_UNSUPPORTED_FUNCTION 0x15
#define CS_UNSUPPORTED_MODE 0x16
#define CS_UNSUPPORTED_FUNCTION -ENODEV
#define CS_UNSUPPORTED_MODE -ENODEV
#define CS_BAD_SPEED -ENODEV
#define CS_BUSY -ENODEV
#define CS_GENERAL_FAILURE 0x19
Expand Down

0 comments on commit 931db43

Please sign in to comment.