mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
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>
This commit is contained in:
parent
1168386aa7
commit
de6405e9d1
@ -1397,7 +1397,7 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = CS_UNSUPPORTED_FUNCTION;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -769,7 +769,7 @@ int pccard_reset_card(struct pcmcia_socket *skt)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (skt->state & SOCKET_CARDBUS) {
|
if (skt->state & SOCKET_CARDBUS) {
|
||||||
ret = CS_UNSUPPORTED_FUNCTION;
|
ret = -EPERM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -810,7 +810,7 @@ int pcmcia_suspend_card(struct pcmcia_socket *skt)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (skt->state & SOCKET_CARDBUS) {
|
if (skt->state & SOCKET_CARDBUS) {
|
||||||
ret = CS_UNSUPPORTED_FUNCTION;
|
ret = -EPERM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (skt->callback) {
|
if (skt->callback) {
|
||||||
@ -840,7 +840,7 @@ int pcmcia_resume_card(struct pcmcia_socket *skt)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (skt->state & SOCKET_CARDBUS) {
|
if (skt->state & SOCKET_CARDBUS) {
|
||||||
ret = CS_UNSUPPORTED_FUNCTION;
|
ret = -EPERM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ret = socket_resume(skt);
|
ret = socket_resume(skt);
|
||||||
|
@ -85,8 +85,7 @@ static const lookup_t error_table[] = {
|
|||||||
{ CS_BAD_VCC, "Bad Vcc" },
|
{ CS_BAD_VCC, "Bad Vcc" },
|
||||||
{ CS_BAD_VPP, "Bad Vpp" },
|
{ CS_BAD_VPP, "Bad Vpp" },
|
||||||
{ CS_NO_CARD, "No card present" },
|
{ CS_NO_CARD, "No card present" },
|
||||||
{ CS_UNSUPPORTED_FUNCTION, "Usupported function" },
|
{ -EINVAL, "Bad parameter" },
|
||||||
{ CS_UNSUPPORTED_MODE, "Unsupported mode" },
|
|
||||||
{ CS_GENERAL_FAILURE, "General failure" },
|
{ CS_GENERAL_FAILURE, "General failure" },
|
||||||
{ CS_BAD_ARGS, "Bad arguments" },
|
{ CS_BAD_ARGS, "Bad arguments" },
|
||||||
{ CS_CONFIGURATION_LOCKED, "Configuration locked" },
|
{ CS_CONFIGURATION_LOCKED, "Configuration locked" },
|
||||||
|
@ -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)
|
static int pcmcia_adjust_resource_info(adjust_t *adj)
|
||||||
{
|
{
|
||||||
struct pcmcia_socket *s;
|
struct pcmcia_socket *s;
|
||||||
int ret = CS_UNSUPPORTED_FUNCTION;
|
int ret = -ENOSYS;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
down_read(&pcmcia_socket_list_rwsem);
|
down_read(&pcmcia_socket_list_rwsem);
|
||||||
@ -975,7 +975,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
|
|||||||
err = -ENOSPC; break;
|
err = -ENOSPC; break;
|
||||||
case CS_NO_MORE_ITEMS:
|
case CS_NO_MORE_ITEMS:
|
||||||
err = -ENODATA; break;
|
err = -ENODATA; break;
|
||||||
case CS_UNSUPPORTED_FUNCTION:
|
case -ENOSYS:
|
||||||
err = -ENOSYS; break;
|
err = -ENOSYS; break;
|
||||||
default:
|
default:
|
||||||
err = -EIO; break;
|
err = -EIO; break;
|
||||||
|
@ -475,8 +475,10 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
|
|||||||
if (!(s->state & SOCKET_PRESENT))
|
if (!(s->state & SOCKET_PRESENT))
|
||||||
return CS_NO_CARD;
|
return CS_NO_CARD;
|
||||||
|
|
||||||
if (req->IntType & INT_CARDBUS)
|
if (req->IntType & INT_CARDBUS) {
|
||||||
return CS_UNSUPPORTED_MODE;
|
ds_dbg(p_dev->socket, 0, "IntType may not be INT_CARDBUS\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
c = p_dev->function_config;
|
c = p_dev->function_config;
|
||||||
if (c->state & CONFIG_LOCKED)
|
if (c->state & CONFIG_LOCKED)
|
||||||
return CS_CONFIGURATION_LOCKED;
|
return CS_CONFIGURATION_LOCKED;
|
||||||
@ -592,7 +594,7 @@ int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req)
|
|||||||
return CS_NO_CARD;
|
return CS_NO_CARD;
|
||||||
|
|
||||||
if (!req)
|
if (!req)
|
||||||
return CS_UNSUPPORTED_MODE;
|
return -EINVAL;
|
||||||
c = p_dev->function_config;
|
c = p_dev->function_config;
|
||||||
if (c->state & CONFIG_LOCKED)
|
if (c->state & CONFIG_LOCKED)
|
||||||
return CS_CONFIGURATION_LOCKED;
|
return CS_CONFIGURATION_LOCKED;
|
||||||
|
@ -305,8 +305,8 @@ typedef struct error_info_t {
|
|||||||
#define CS_BAD_WINDOW -ENODEV
|
#define CS_BAD_WINDOW -ENODEV
|
||||||
#define CS_WRITE_FAILURE -EIO
|
#define CS_WRITE_FAILURE -EIO
|
||||||
#define CS_NO_CARD 0x14
|
#define CS_NO_CARD 0x14
|
||||||
#define CS_UNSUPPORTED_FUNCTION 0x15
|
#define CS_UNSUPPORTED_FUNCTION -ENODEV
|
||||||
#define CS_UNSUPPORTED_MODE 0x16
|
#define CS_UNSUPPORTED_MODE -ENODEV
|
||||||
#define CS_BAD_SPEED -ENODEV
|
#define CS_BAD_SPEED -ENODEV
|
||||||
#define CS_BUSY -ENODEV
|
#define CS_BUSY -ENODEV
|
||||||
#define CS_GENERAL_FAILURE 0x19
|
#define CS_GENERAL_FAILURE 0x19
|
||||||
|
Loading…
x
Reference in New Issue
Block a user