PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket

skt->irq is a mere duplication of pcmcia_socket's pci_irq member.
Get rid of it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Russell King - ARM Linux 2009-03-29 22:45:26 +01:00 committed by Dominik Brodowski
parent 1689164a27
commit 66024db57d
19 changed files with 23 additions and 24 deletions

View File

@ -287,10 +287,10 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
skt = &sinfo->skt[i];
skt->nr = ops->first + i;
skt->irq = NO_IRQ;
skt->ops = ops;
skt->socket.owner = ops->owner;
skt->socket.dev.parent = dev;
skt->socket.pci_irq = NO_IRQ;
ret = pxa2xx_drv_pcmcia_add_one(skt);
if (ret)

View File

@ -44,7 +44,7 @@ static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
return ret;
gpio_direction_output(GPIO_PCMCIA_RESET, 0);
skt->irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
skt->socket.pci_irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
if (!ret)
gpio_free(GPIO_PCMCIA_RESET);

View File

@ -38,7 +38,7 @@ static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
return ret;
gpio_direction_output(GPIO_PCMCIA_RESET, 0);
skt->irq = PCMCIA_S0_RDYINT;
skt->socket.pci_irq = PCMCIA_S0_RDYINT;
ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
if (!ret)
gpio_free(GPIO_PCMCIA_RESET);

View File

@ -38,7 +38,7 @@ static struct pcmcia_irqs cd_irqs[] = {
static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
skt->irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) :
skt->socket.pci_irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) :
IRQ_GPIO(GPIO_E740_PCMCIA_RDY1);
return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1);

View File

@ -44,7 +44,7 @@ static int mst_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
* before we enable them as outputs.
*/
skt->irq = (skt->nr == 0) ? MAINSTONE_S0_IRQ : MAINSTONE_S1_IRQ;
skt->socket.pci_irq = (skt->nr == 0) ? MAINSTONE_S0_IRQ : MAINSTONE_S1_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}

View File

@ -45,7 +45,7 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
if (ret)
goto err4;
skt->irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY);
skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY);
return 0;
err4:

View File

@ -53,7 +53,7 @@ static int palmtx_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
if (ret)
goto err5;
skt->irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY);
skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY);
return 0;
err5:

View File

@ -66,7 +66,7 @@ static int sharpsl_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
}
}
skt->irq = SCOOP_DEV[skt->nr].irq;
skt->socket.pci_irq = SCOOP_DEV[skt->nr].irq;
return 0;
}

View File

@ -53,7 +53,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
gpio_free(GPIO_PRDY);
return -EINVAL;
}
skt->irq = IRQ_GPIO(GPIO_PRDY);
skt->socket.pci_irq = IRQ_GPIO(GPIO_PRDY);
break;
#ifndef CONFIG_MACH_TRIZEPS_CONXS
@ -63,7 +63,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
break;
}
/* release the reset of this card */
pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->irq);
pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->socket.pci_irq);
/* supplementory irqs for the socket */
for (i = 0; i < ARRAY_SIZE(irqs); i++) {

View File

@ -40,7 +40,7 @@ static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
unsigned long flags;
skt->irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
skt->socket.pci_irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
goto err_request_cd;

View File

@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = {
static int assabet_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
skt->irq = ASSABET_IRQ_GPIO_CF_IRQ;
skt->socket.pci_irq = ASSABET_IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}

View File

@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = {
static int cerf_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
skt->irq = CERF_IRQ_GPIO_CF_IRQ;
skt->socket.pci_irq = CERF_IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}

View File

@ -25,8 +25,8 @@ static struct pcmcia_irqs irqs[] = {
static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
skt->irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
: IRQ_GPIO_H3600_PCMCIA_IRQ0;
skt->socket.pci_irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
: IRQ_GPIO_H3600_PCMCIA_IRQ0;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));

View File

@ -28,7 +28,7 @@ static int shannon_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
GAFR &= ~(SHANNON_GPIO_EJECT_0 | SHANNON_GPIO_EJECT_1 |
SHANNON_GPIO_RDY_0 | SHANNON_GPIO_RDY_1);
skt->irq = skt->nr ? SHANNON_IRQ_GPIO_RDY_1 : SHANNON_IRQ_GPIO_RDY_0;
skt->socket.pci_irq = skt->nr ? SHANNON_IRQ_GPIO_RDY_1 : SHANNON_IRQ_GPIO_RDY_0;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}

View File

@ -28,7 +28,7 @@ static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
skt->irq = IRQ_GPIO_CF_IRQ;
skt->socket.pci_irq = IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}

View File

@ -137,10 +137,10 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
return -ENOMEM;
s->soc.nr = ops->first + i;
s->soc.irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
s->soc.ops = ops;
s->soc.socket.owner = ops->owner;
s->soc.socket.dev.parent = &dev->dev;
s->soc.socket.pci_irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
s->dev = dev;
ret = add(&s->soc);

View File

@ -235,10 +235,10 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
skt = &sinfo->skt[i];
skt->nr = first + i;
skt->irq = NO_IRQ;
skt->ops = ops;
skt->socket.owner = ops->owner;
skt->socket.dev.parent = dev;
skt->socket.pci_irq = NO_IRQ;
ret = sa11xx_drv_pcmcia_add_one(skt);
if (ret)

View File

@ -144,10 +144,10 @@ soc_common_pcmcia_config_skt(struct soc_pcmcia_socket *skt, socket_state_t *stat
*/
if (skt->irq_state != 1 && state->io_irq) {
skt->irq_state = 1;
set_irq_type(skt->irq, IRQ_TYPE_EDGE_FALLING);
set_irq_type(skt->socket.pci_irq, IRQ_TYPE_EDGE_FALLING);
} else if (skt->irq_state == 1 && state->io_irq == 0) {
skt->irq_state = 0;
set_irq_type(skt->irq, IRQ_TYPE_NONE);
set_irq_type(skt->socket.pci_irq, IRQ_TYPE_NONE);
}
skt->cs_state = *state;
@ -492,7 +492,8 @@ static ssize_t show_status(struct device *dev, struct device_attribute *attr, ch
p+=sprintf(p, "Vcc : %d\n", skt->cs_state.Vcc);
p+=sprintf(p, "Vpp : %d\n", skt->cs_state.Vpp);
p+=sprintf(p, "IRQ : %d (%d)\n", skt->cs_state.io_irq, skt->irq);
p+=sprintf(p, "IRQ : %d (%d)\n", skt->cs_state.io_irq,
skt->socket.pci_irq);
if (skt->ops->show_timing)
p+=skt->ops->show_timing(skt, p);
@ -695,7 +696,6 @@ int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt)
skt->socket.resource_ops = &pccard_static_ops;
skt->socket.irq_mask = 0;
skt->socket.map_size = PAGE_SIZE;
skt->socket.pci_irq = skt->irq;
skt->socket.io_offset = (unsigned long)skt->virt_io;
skt->status = soc_common_pcmcia_skt_state(skt);

View File

@ -31,7 +31,6 @@ struct soc_pcmcia_socket {
* Info from low level handler
*/
unsigned int nr;
unsigned int irq;
/*
* Core PCMCIA state