diff options
author | Daniel Ritz <daniel.ritz-ml@swissonline.ch> | 2006-07-30 12:03:49 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 22:28:41 +0200 |
commit | 47a31976cadb9a2d25a2896762cb0e678470a29b (patch) | |
tree | 750eb8379b57bbcbba5b0e330b686482d4141ccc | |
parent | [PATCH] pcmcia: fix ioctl for GET_STATUS and GET_CONFIGURATION_INFO (diff) | |
download | linux-47a31976cadb9a2d25a2896762cb0e678470a29b.tar.xz linux-47a31976cadb9a2d25a2896762cb0e678470a29b.zip |
[PATCH] pcmcia: fix ioctl GET_CONFIGURATION_INFO for pcmcia_cards
Values displayed when by cardctl config are horribly wrong for 16bit cards.
this fixes it up by not using memcpy() since source and target struct are
very different.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 7bf25b88ea31..c8323399e9e4 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -245,10 +245,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; |