X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fpcmcia%2Fpcmcia_resource.c;h=1d128fbd1a92d9f4dcdaed4a3065c3365b5fce68;hb=5250f33229c1e41b1fac27bb564697046e525b93;hp=3281e519e71414a6d503f55a2f631fd9bd574856;hpb=93fdf10d4c28edaa1b9f80e7f9c3002359186d00;p=linux-2.6-omap-h63xx.git diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 3281e519e71..1d128fbd1a9 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -48,7 +48,6 @@ static u8 pcmcia_used_irq[NR_IRQS]; #ifdef DEBUG extern int ds_pc_debug; -#define cs_socket_name(skt) ((skt)->dev.class_id) #define ds_dbg(skt, lvl, fmt, arg...) do { \ if (ds_pc_debug >= lvl) \ @@ -66,23 +65,23 @@ extern int ds_pc_debug; * Special stuff for managing IO windows, because they are scarce */ -static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base, - ioaddr_t num, u_int lines) +static int alloc_io_space(struct pcmcia_socket *s, u_int attr, + unsigned int *base, unsigned int num, u_int lines) { int i; - kio_addr_t try, align; + unsigned int try, align; align = (*base) ? (lines ? 1<io[i].res) && + if ((s->io[i].res) && *base && ((s->io[i].res->start & (align-1)) == *base)) return 1; for (i = 0; i < MAX_IO_WIN; i++) { @@ -133,8 +132,8 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base, } /* alloc_io_space */ -static void release_io_space(struct pcmcia_socket *s, ioaddr_t base, - ioaddr_t num) +static void release_io_space(struct pcmcia_socket *s, unsigned int base, + unsigned int num) { int i; @@ -245,10 +244,17 @@ int pccard_get_configuration_info(struct pcmcia_socket *s, return CS_SUCCESS; } - /* !!! This is a hack !!! */ - memcpy(&config->Attributes, &c->Attributes, sizeof(config_t)); - config->Attributes |= CONF_VALID_CLIENT; - config->CardValues = c->CardValues; + config->Attributes = c->Attributes | CONF_VALID_CLIENT; + config->Vcc = s->socket.Vcc; + config->Vpp1 = config->Vpp2 = s->socket.Vpp; + config->IntType = c->IntType; + config->ConfigBase = c->ConfigBase; + config->Status = c->Status; + config->Pin = c->Pin; + config->Copy = c->Copy; + config->Option = c->Option; + config->ExtStatus = c->ExtStatus; + config->Present = config->CardValues = c->CardValues; config->IRQAttributes = c->irq.Attributes; config->AssignedIRQ = s->irq.AssignedIRQ; config->BasePort1 = c->io.BasePort1; @@ -777,7 +783,7 @@ EXPORT_SYMBOL(pcmcia_request_io); */ #ifdef CONFIG_PCMCIA_PROBE -static irqreturn_t test_action(int cpl, void *dev_id, struct pt_regs *regs) +static irqreturn_t test_action(int cpl, void *dev_id) { return IRQ_NONE; } @@ -801,9 +807,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) /* Decide what type of interrupt we are registering */ type = 0; if (s->functions > 1) /* All of this ought to be handled higher up */ - type = SA_SHIRQ; + type = IRQF_SHARED; if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) - type = SA_SHIRQ; + type = IRQF_SHARED; #ifdef CONFIG_PCMCIA_PROBE if (s->irq.AssignedIRQ != 0) { @@ -845,7 +851,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) if (ret && !s->irq.AssignedIRQ) { if (!s->pci_irq) return ret; - type = SA_SHIRQ; + type = IRQF_SHARED; irq = s->pci_irq; } @@ -855,7 +861,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) } /* Make sure the fact the request type was overridden is passed back */ - if (type == SA_SHIRQ && !(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) { + if (type == IRQF_SHARED && !(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) { req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING; printk(KERN_WARNING "pcmcia: request for exclusive IRQ could not be fulfilled.\n"); printk(KERN_WARNING "pcmcia: the driver needs updating to supported shared IRQ lines.\n");