From cc847bfd16d894fd8c1a2ce25f31772f6cdbbc74 Mon Sep 17 00:00:00 2001 From: Mao Zhongyi Date: Thu, 25 Jan 2018 14:14:30 -0300 Subject: hw/usb/ccid: Make ccid_card_init() take an error parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace init() of CCIDCardClass with realize, then convert ccid_card_init(), ccid_card_initfn() and it's callbacks to take an Error** in ordor to report the error more clearly. Signed-off-by: Mao Zhongyi Signed-off-by: Cao jin Signed-off-by: Philippe Mathieu-Daudé Message-id: 20180125171432.13554-2-f4bug@amsat.org [PMD: fixed s->card assignation in ccid_card_realize()] Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Gerd Hoffmann --- hw/usb/ccid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/usb/ccid.h') diff --git a/hw/usb/ccid.h b/hw/usb/ccid.h index 1f07011..6c6c101 100644 --- a/hw/usb/ccid.h +++ b/hw/usb/ccid.h @@ -34,7 +34,7 @@ typedef struct CCIDCardClass { const uint8_t *apdu, uint32_t len); void (*exitfn)(CCIDCardState *card); - int (*initfn)(CCIDCardState *card); + void (*realize)(CCIDCardState *card, Error **errp); } CCIDCardClass; /* -- cgit v1.1