diff options
author | Alon Levy <alevy@redhat.com> | 2011-04-10 13:15:24 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-04-10 13:15:24 +0300 |
commit | 87813ed603bc7dc94fb0e997e704a550edc78bbc (patch) | |
tree | e38cbd7d30cbe261b62aa10c77206699fd9e562d | |
parent | ec3ce11829a5bf7ee17c0b57c1d694928ddad7e5 (diff) |
ccid-card-passthru: qemu-kvm has handler struct, qemu doesn'tspice.v32.kvm.ccid.v23
-rw-r--r-- | hw/ccid-card-passthru.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c index 76abfb1fda..e53618c069 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"); |