diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-11-12 17:56:33 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 17:41:09 -0500 |
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 4d56bc9926d6..35a92d1e4945 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) | |||
940 | 940 | ||
941 | /*====================================================================*/ | 941 | /*====================================================================*/ |
942 | 942 | ||
943 | static int i365_get_socket(u_short sock, socket_state_t *state) | ||
944 | { | ||
945 | struct i82365_socket *t = &socket[sock]; | ||
946 | u_char reg, vcc, vpp; | ||
947 | |||
948 | reg = i365_get(sock, I365_POWER); | ||
949 | state->flags = (reg & I365_PWR_AUTO) ? SS_PWR_AUTO : 0; | ||
950 | state->flags |= (reg & I365_PWR_OUT) ? SS_OUTPUT_ENA : 0; | ||
951 | vcc = reg & I365_VCC_MASK; vpp = reg & I365_VPP1_MASK; | ||
952 | state->Vcc = state->Vpp = 0; | ||
953 | if (t->flags & IS_CIRRUS) { | ||
954 | if (i365_get(sock, PD67_MISC_CTL_1) & PD67_MC1_VCC_3V) { | ||
955 | if (reg & I365_VCC_5V) state->Vcc = 33; | ||
956 | if (vpp == I365_VPP1_5V) state->Vpp = 33; | ||
957 | } else { | ||
958 | if (reg & I365_VCC_5V) state->Vcc = 50; | ||
959 | if (vpp == I365_VPP1_5V) state->Vpp = 50; | ||
960 | } | ||
961 | if (vpp == I365_VPP1_12V) state->Vpp = 120; | ||
962 | } else if (t->flags & IS_VG_PWR) { | ||
963 | if (i365_get(sock, VG469_VSELECT) & VG469_VSEL_VCC) { | ||
964 | if (reg & I365_VCC_5V) state->Vcc = 33; | ||
965 | if (vpp == I365_VPP1_5V) state->Vpp = 33; | ||
966 | } else { | ||
967 | if (reg & I365_VCC_5V) state->Vcc = 50; | ||
968 | if (vpp == I365_VPP1_5V) state->Vpp = 50; | ||
969 | } | ||
970 | if (vpp == I365_VPP1_12V) state->Vpp = 120; | ||
971 | } else if (t->flags & IS_DF_PWR) { | ||
972 | if (vcc == I365_VCC_3V) state->Vcc = 33; | ||
973 | if (vcc == I365_VCC_5V) state->Vcc = 50; | ||
974 | if (vpp == I365_VPP1_5V) state->Vpp = 50; | ||
975 | if (vpp == I365_VPP1_12V) state->Vpp = 120; | ||
976 | } else { | ||
977 | if (reg & I365_VCC_5V) { | ||
978 | state->Vcc = 50; | ||
979 | if (vpp == I365_VPP1_5V) state->Vpp = 50; | ||
980 | if (vpp == I365_VPP1_12V) state->Vpp = 120; | ||
981 | } | ||
982 | } | ||
983 | |||
984 | /* IO card, RESET flags, IO interrupt */ | ||
985 | reg = i365_get(sock, I365_INTCTL); | ||
986 | state->flags |= (reg & I365_PC_RESET) ? 0 : SS_RESET; | ||
987 | if (reg & I365_PC_IOCARD) state->flags |= SS_IOCARD; | ||
988 | state->io_irq = reg & I365_IRQ_MASK; | ||
989 | |||
990 | /* speaker control */ | ||
991 | if (t->flags & IS_CIRRUS) { | ||
992 | if (i365_get(sock, PD67_MISC_CTL_1) & PD67_MC1_SPKR_ENA) | ||
993 | state->flags |= SS_SPKR_ENA; | ||
994 | } | ||
995 | |||
996 | /* Card status change mask */ | ||
997 | reg = i365_get(sock, I365_CSCINT); | ||
998 | state->csc_mask = (reg & I365_CSC_DETECT) ? SS_DETECT : 0; | ||
999 | if (state->flags & SS_IOCARD) | ||
1000 | state->csc_mask |= (reg & I365_CSC_STSCHG) ? SS_STSCHG : 0; | ||
1001 | else { | ||
1002 | state->csc_mask |= (reg & I365_CSC_BVD1) ? SS_BATDEAD : 0; | ||
1003 | state->csc_mask |= (reg & I365_CSC_BVD2) ? SS_BATWARN : 0; | ||
1004 | state->csc_mask |= (reg & I365_CSC_READY) ? SS_READY : 0; | ||
1005 | } | ||
1006 | |||
1007 | debug(1, "GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, " | ||
1008 | "io_irq %d, csc_mask %#2.2x\n", sock, state->flags, | ||
1009 | state->Vcc, state->Vpp, state->io_irq, state->csc_mask); | ||
1010 | return 0; | ||
1011 | } /* i365_get_socket */ | ||
1012 | |||
1013 | /*====================================================================*/ | ||
1014 | |||
1015 | static int i365_set_socket(u_short sock, socket_state_t *state) | 943 | static int i365_set_socket(u_short sock, socket_state_t *state) |
1016 | { | 944 | { |
1017 | struct i82365_socket *t = &socket[sock]; | 945 | struct i82365_socket *t = &socket[sock]; |
@@ -1265,16 +1193,6 @@ static int pcic_get_status(struct pcmcia_socket *s, u_int *value) | |||
1265 | LOCKED(i365_get_status(sock, value)); | 1193 | LOCKED(i365_get_status(sock, value)); |
1266 | } | 1194 | } |
1267 | 1195 | ||
1268 | static int pcic_get_socket(struct pcmcia_socket *s, socket_state_t *state) | ||
1269 | { | ||
1270 | unsigned int sock = container_of(s, struct i82365_socket, socket)->number; | ||
1271 | |||
1272 | if (socket[sock].flags & IS_ALIVE) | ||
1273 | return -EINVAL; | ||
1274 | |||
1275 | LOCKED(i365_get_socket(sock, state)); | ||
1276 | } | ||
1277 | |||
1278 | static int pcic_set_socket(struct pcmcia_socket *s, socket_state_t *state) | 1196 | static int pcic_set_socket(struct pcmcia_socket *s, socket_state_t *state) |
1279 | { | 1197 | { |
1280 | unsigned int sock = container_of(s, struct i82365_socket, socket)->number; | 1198 | unsigned int sock = container_of(s, struct i82365_socket, socket)->number; |
@@ -1324,7 +1242,6 @@ static int pcic_init(struct pcmcia_socket *s) | |||
1324 | static struct pccard_operations pcic_operations = { | 1242 | static struct pccard_operations pcic_operations = { |
1325 | .init = pcic_init, | 1243 | .init = pcic_init, |
1326 | .get_status = pcic_get_status, | 1244 | .get_status = pcic_get_status, |
1327 | .get_socket = pcic_get_socket, | ||
1328 | .set_socket = pcic_set_socket, | 1245 | .set_socket = pcic_set_socket, |
1329 | .set_io_map = pcic_set_io_map, | 1246 | .set_io_map = pcic_set_io_map, |
1330 | .set_mem_map = pcic_set_mem_map, | 1247 | .set_mem_map = pcic_set_mem_map, |