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/vrc4171_card.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/vrc4171_card.c')
-rw-r--r-- | drivers/pcmcia/vrc4171_card.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c index 38a028c725d4..24c547ef512b 100644 --- a/drivers/pcmcia/vrc4171_card.c +++ b/drivers/pcmcia/vrc4171_card.c | |||
@@ -301,75 +301,6 @@ static int pccard_get_status(struct pcmcia_socket *sock, u_int *value) | |||
301 | return 0; | 301 | return 0; |
302 | } | 302 | } |
303 | 303 | ||
304 | static inline u_char get_Vcc_value(uint8_t voltage) | ||
305 | { | ||
306 | switch (voltage) { | ||
307 | case VCC_STATUS_3V: | ||
308 | return 33; | ||
309 | case VCC_STATUS_5V: | ||
310 | return 50; | ||
311 | default: | ||
312 | break; | ||
313 | } | ||
314 | |||
315 | return 0; | ||
316 | } | ||
317 | |||
318 | static inline u_char get_Vpp_value(uint8_t power, u_char Vcc) | ||
319 | { | ||
320 | if ((power & 0x03) == 0x01 || (power & 0x03) == 0x02) | ||
321 | return Vcc; | ||
322 | |||
323 | return 0; | ||
324 | } | ||
325 | |||
326 | static int pccard_get_socket(struct pcmcia_socket *sock, socket_state_t *state) | ||
327 | { | ||
328 | unsigned int slot; | ||
329 | uint8_t power, voltage, control, cscint; | ||
330 | |||
331 | if (sock == NULL || sock->sock >= CARD_MAX_SLOTS || state == NULL) | ||
332 | return -EINVAL; | ||
333 | |||
334 | slot = sock->sock; | ||
335 | |||
336 | power = exca_read_byte(slot, I365_POWER); | ||
337 | voltage = exca_read_byte(slot, CARD_VOLTAGE_SELECT); | ||
338 | |||
339 | state->Vcc = get_Vcc_value(voltage); | ||
340 | state->Vpp = get_Vpp_value(power, state->Vcc); | ||
341 | |||
342 | state->flags = 0; | ||
343 | if (power & POWER_ENABLE) | ||
344 | state->flags |= SS_PWR_AUTO; | ||
345 | if (power & I365_PWR_OUT) | ||
346 | state->flags |= SS_OUTPUT_ENA; | ||
347 | |||
348 | control = exca_read_byte(slot, I365_INTCTL); | ||
349 | if (control & I365_PC_IOCARD) | ||
350 | state->flags |= SS_IOCARD; | ||
351 | if (!(control & I365_PC_RESET)) | ||
352 | state->flags |= SS_RESET; | ||
353 | |||
354 | cscint = exca_read_byte(slot, I365_CSCINT); | ||
355 | state->csc_mask = 0; | ||
356 | if (state->flags & SS_IOCARD) { | ||
357 | if (cscint & I365_CSC_STSCHG) | ||
358 | state->flags |= SS_STSCHG; | ||
359 | } else { | ||
360 | if (cscint & I365_CSC_BVD1) | ||
361 | state->csc_mask |= SS_BATDEAD; | ||
362 | if (cscint & I365_CSC_BVD2) | ||
363 | state->csc_mask |= SS_BATWARN; | ||
364 | } | ||
365 | if (cscint & I365_CSC_READY) | ||
366 | state->csc_mask |= SS_READY; | ||
367 | if (cscint & I365_CSC_DETECT) | ||
368 | state->csc_mask |= SS_DETECT; | ||
369 | |||
370 | return 0; | ||
371 | } | ||
372 | |||
373 | static inline uint8_t set_Vcc_value(u_char Vcc) | 304 | static inline uint8_t set_Vcc_value(u_char Vcc) |
374 | { | 305 | { |
375 | switch (Vcc) { | 306 | switch (Vcc) { |
@@ -551,7 +482,6 @@ static int pccard_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map | |||
551 | static struct pccard_operations vrc4171_pccard_operations = { | 482 | static struct pccard_operations vrc4171_pccard_operations = { |
552 | .init = pccard_init, | 483 | .init = pccard_init, |
553 | .get_status = pccard_get_status, | 484 | .get_status = pccard_get_status, |
554 | .get_socket = pccard_get_socket, | ||
555 | .set_socket = pccard_set_socket, | 485 | .set_socket = pccard_set_socket, |
556 | .set_io_map = pccard_set_io_map, | 486 | .set_io_map = pccard_set_io_map, |
557 | .set_mem_map = pccard_set_mem_map, | 487 | .set_mem_map = pccard_set_mem_map, |