From c3d9f24a392979cbd6a40d102c71eab018117f3e Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Tue, 17 Sep 2013 13:07:30 +0200 Subject: s390/eventfacility: allow childs to handle more than 1 event type Currently all handlers (quiesce, console) only handle one event type. Some drivers will handle multiple (compatible) event types. Rework the code accordingly. Signed-off-by: Christian Borntraeger Reviewed-by: Alexander Graf --- hw/char/sclpconsole.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/char') diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index 8cb0e41fa0..16d77c5e27 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -79,9 +79,9 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) /* functions to be called by event facility */ -static int event_type(void) +static bool can_handle_event(uint8_t type) { - return SCLP_EVENT_ASCII_CONSOLE_DATA; + return type == SCLP_EVENT_ASCII_CONSOLE_DATA; } static unsigned int send_mask(void) @@ -272,7 +272,7 @@ static void console_class_init(ObjectClass *klass, void *data) ec->exit = console_exit; ec->get_send_mask = send_mask; ec->get_receive_mask = receive_mask; - ec->event_type = event_type; + ec->can_handle_event = can_handle_event; ec->read_event_data = read_event_data; ec->write_event_data = write_event_data; } -- cgit v1.2.3