[Spice-commits] Branch 'spice.v32.kvm.ccid.v23' - hw/ccid-card-passthru.c
Alon Levy
alon at kemper.freedesktop.org
Thu Apr 21 07:38:28 PDT 2011
hw/ccid-card-passthru.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 87813ed603bc7dc94fb0e997e704a550edc78bbc
Author: Alon Levy <alevy at redhat.com>
Date: Sun Apr 10 13:15:24 2011 +0300
ccid-card-passthru: qemu-kvm has handler struct, qemu doesn't
diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c
index 76abfb1..e53618c 100644
--- a/hw/ccid-card-passthru.c
+++ b/hw/ccid-card-passthru.c
@@ -275,6 +275,12 @@ static const uint8_t *passthru_get_atr(CCIDCardState *base, uint32_t *len)
return card->atr;
}
+static struct QemuChrHandlers ccid_card_passthru_handlers = {
+ .fd_can_read = ccid_card_vscard_can_read,
+ .fd_read = ccid_card_vscard_read,
+ .fd_event = ccid_card_vscard_event,
+};
+
static int passthru_initfn(CCIDCardState *base)
{
PassthruState *card = DO_UPCAST(PassthruState, base, base);
@@ -283,10 +289,7 @@ static int passthru_initfn(CCIDCardState *base)
card->vscard_in_hdr = 0;
if (card->cs) {
DPRINTF(card, D_INFO, "initing chardev\n");
- qemu_chr_add_handlers(card->cs,
- ccid_card_vscard_can_read,
- ccid_card_vscard_read,
- ccid_card_vscard_event, card);
+ qemu_chr_add_handlers(card->cs, &ccid_card_passthru_handlers, card);
ccid_card_vscard_send_init(card);
} else {
error_report("missing chardev");
More information about the Spice-commits
mailing list