pcmcia: simplify IntType

IntType was only set to INT_MEMORY (driver pcmciamtd) or INT_MEMORY_AND_IO
(all other drivers). As this flags seems to relate to ioport access, make
it conditional to the driver having requested IO port access. There are two
drivers which do not request IO ports, but did set INT_MEMORY_AND_IO:
ray_cs and b43. For those, we consistently only set INT_MEMORY in future.

CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: Jiri Kosina <[email protected]>
CC: [email protected]
Acked-by: Gustavo F. Padovan <[email protected]> (for drivers/bluetooth)
Tested-by: Wolfram Sang <[email protected]>
Signed-off-by: Dominik Brodowski <[email protected]>
This commit is contained in:
Dominik Brodowski 2010-07-29 16:33:23 +02:00
commit 37979e1546
57 changed files with 1 additions and 78 deletions

View file

@ -34,7 +34,6 @@ typedef struct config_t {
struct kref ref;
unsigned int state;
unsigned int Attributes;
unsigned int IntType;
unsigned int ConfigBase;
unsigned char Option;
unsigned int CardValues;

View file

@ -447,11 +447,6 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
if (!(s->state & SOCKET_PRESENT))
return -ENODEV;
if (req->IntType & INT_CARDBUS) {
dev_dbg(&p_dev->dev, "IntType may not be INT_CARDBUS\n");
return -EINVAL;
}
mutex_lock(&s->ops_mutex);
c = p_dev->function_config;
if (c->state & CONFIG_LOCKED) {
@ -470,12 +465,9 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
}
/* Pick memory or I/O card, DMA mode, interrupt */
c->IntType = req->IntType;
c->Attributes = req->Attributes;
if (req->IntType & INT_MEMORY_AND_IO)
if (p_dev->_io)
s->socket.flags |= SS_IOCARD;
if (req->IntType & INT_ZOOMED_VIDEO)
s->socket.flags |= SS_ZVCARD | SS_IOCARD;
if (req->Attributes & CONF_ENABLE_DMA)
s->socket.flags |= SS_DMA_MODE;
if (req->Attributes & CONF_ENABLE_SPKR) {