diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-11-12 23:56:33 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 23:41:09 +0100 |
commit | 9da4bc6d6a38c1c3d850c046d0aee324c1a2e52a (patch) | |
tree | 2783de4a280ece6707b9b5800b82e1149b4d4f48 /drivers/pcmcia/i82365.c | |
parent | 7f316b033b36adfbdf56bfb15c13de49798ab0b2 (diff) |
[PATCH] pcmcia: remove get_socket callback
The .get_socket callback is never used by the PCMCIA core, therefore remove
it.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/i82365.c')
-rw-r--r-- | drivers/pcmcia/i82365.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index 4d56bc9926d..35a92d1e494 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c @@ -940,78 +940,6 @@ static int i365_get_status(u_short sock, u_int *value) /*====================================================================*/ -static int i365_get_socket(u_short sock, socket_state_t *state) -{ - struct i82365_socket *t = &socket[sock]; - u_char reg, vcc, vpp; - - reg = i365_get(sock, I365_POWER); - state->flags = (reg & I365_PWR_AUTO) ? SS_PWR_AUTO : 0; - state->flags |= (reg & I365_PWR_OUT) ? SS_OUTPUT_ENA : 0; - vcc = reg & I365_VCC_MASK; vpp = reg & I365_VPP1_MASK; - state->Vcc = state->Vpp = 0; - if (t->flags & IS_CIRRUS) { - if (i365_get(sock, PD67_MISC_CTL_1) & PD67_MC1_VCC_3V) { - if (reg & I365_VCC_5V) state->Vcc = 33; - if (vpp == I365_VPP1_5V) state->Vpp = 33; - } else { - if (reg & I365_VCC_5V) state->Vcc = 50; - if (vpp == I365_VPP1_5V) state->Vpp = 50; - } - if (vpp == I365_VPP1_12V) state->Vpp = 120; - } else if (t->flags & IS_VG_PWR) { - if (i365_get(sock, VG469_VSELECT) & VG469_VSEL_VCC) { - if (reg & I365_VCC_5V) state->Vcc = 33; - if (vpp == I365_VPP1_5V) state->Vpp = 33; - } else { - if (reg & I365_VCC_5V) state->Vcc = 50; - if (vpp == I365_VPP1_5V) state->Vpp = 50; - } - if (vpp == I365_VPP1_12V) state->Vpp = 120; - } else if (t->flags & IS_DF_PWR) { - if (vcc == I365_VCC_3V) state->Vcc = 33; - if (vcc == I365_VCC_5V) state->Vcc = 50; - if (vpp == I365_VPP1_5V) state->Vpp = 50; - if (vpp == I365_VPP1_12V) state->Vpp = 120; - } else { - if (reg & I365_VCC_5V) { - state->Vcc = 50; - if (vpp == I365_VPP1_5V) state->Vpp = 50; - if (vpp == I365_VPP1_12V) state->Vpp = 120; - } - } - - /* IO card, RESET flags, IO interrupt */ - reg = i365_get(sock, I365_INTCTL); - state->flags |= (reg & I365_PC_RESET) ? 0 : SS_RESET; - if (reg & I365_PC_IOCARD) state->flags |= SS_IOCARD; - state->io_irq = reg & I365_IRQ_MASK; - - /* speaker control */ - if (t->flags & IS_CIRRUS) { - if (i365_get(sock, PD67_MISC_CTL_1) & PD67_MC1_SPKR_ENA) - state->flags |= SS_SPKR_ENA; - } - - /* Card status change mask */ - reg = i365_get(sock, I365_CSCINT); - state->csc_mask = (reg & I365_CSC_DETECT) ? SS_DETECT : 0; - if (state->flags & SS_IOCARD) - state->csc_mask |= (reg & I365_CSC_STSCHG) ? SS_STSCHG : 0; - else { - state->csc_mask |= (reg & I365_CSC_BVD1) ? SS_BATDEAD : 0; - state->csc_mask |= (reg & I365_CSC_BVD2) ? SS_BATWARN : 0; - state->csc_mask |= (reg & I365_CSC_READY) ? SS_READY : 0; - } - - debug(1, "GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, " - "io_irq %d, csc_mask %#2.2x\n", sock, state->flags, - state->Vcc, state->Vpp, state->io_irq, state->csc_mask); - return 0; -} /* i365_get_socket */ - -/*====================================================================*/ - static int i365_set_socket(u_short sock, socket_state_t *state) { struct i82365_socket *t = &socket[sock]; @@ -1265,16 +1193,6 @@ static int pcic_get_status(struct pcmcia_socket *s, u_int *value) LOCKED(i365_get_status(sock, value)); } -static int pcic_get_socket(struct pcmcia_socket *s, socket_state_t *state) -{ - unsigned int sock = container_of(s, struct i82365_socket, socket)->number; - - if (socket[sock].flags & IS_ALIVE) - return -EINVAL; - - LOCKED(i365_get_socket(sock, state)); -} - static int pcic_set_socket(struct pcmcia_socket *s, socket_state_t *state) { unsigned int sock = container_of(s, struct i82365_socket, socket)->number; @@ -1324,7 +1242,6 @@ static int pcic_init(struct pcmcia_socket *s) static struct pccard_operations pcic_operations = { .init = pcic_init, .get_status = pcic_get_status, - .get_socket = pcic_get_socket, .set_socket = pcic_set_socket, .set_io_map = pcic_set_io_map, .set_mem_map = pcic_set_mem_map, |