From 99cbdc45aaafd6f5a745d30b942ee538225848f8 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 5 Apr 2019 15:53:27 +0000 Subject: [PATCH] twsi: Use config_intrhook_oneshot instead of config_intrhook_establish Suggested by: ian MFC after: 1 month X-MFC-With: 345948 --- sys/dev/iicbus/twsi/twsi.c | 7 +------ sys/dev/iicbus/twsi/twsi.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 6eaecba99be4..bd3e6f65a959 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -621,7 +621,6 @@ twsi_intr_start(void *pdev) device_printf(pdev, "unable to register interrupt handler\n"); sc->have_intr = true; - config_intrhook_disestablish(&sc->intr_hook); } int @@ -648,11 +647,7 @@ twsi_attach(device_t dev) } bus_generic_attach(dev); - sc->intr_hook.ich_func = twsi_intr_start; - sc->intr_hook.ich_arg = dev; - - if (config_intrhook_establish(&sc->intr_hook) != 0) - return (ENOMEM); + config_intrhook_oneshot(twsi_intr_start, dev); return (0); } diff --git a/sys/dev/iicbus/twsi/twsi.h b/sys/dev/iicbus/twsi/twsi.h index 25a27e514819..37094eefff27 100644 --- a/sys/dev/iicbus/twsi/twsi.h +++ b/sys/dev/iicbus/twsi/twsi.h @@ -55,7 +55,6 @@ struct twsi_softc { clk_t clk_reg; #endif void * intrhand; - struct intr_config_hook intr_hook; bool have_intr; struct iic_msg *msg;