Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:06:43 -0000
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345951 - head/sys/dev/iicbus/twsi
Message-ID:  <201904051553.x35FrRB2074437@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Fri Apr  5 15:53:27 2019
New Revision: 345951
URL: https://svnweb.freebsd.org/changeset/base/345951

Log:
  twsi: Use config_intrhook_oneshot instead of config_intrhook_establish
  
  Suggested by:	ian
  MFC after:	1 month
  X-MFC-With:	345948

Modified:
  head/sys/dev/iicbus/twsi/twsi.c
  head/sys/dev/iicbus/twsi/twsi.h

Modified: head/sys/dev/iicbus/twsi/twsi.c
==============================================================================
--- head/sys/dev/iicbus/twsi/twsi.c	Fri Apr  5 15:33:43 2019	(r345950)
+++ head/sys/dev/iicbus/twsi/twsi.c	Fri Apr  5 15:53:27 2019	(r345951)
@@ -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);
 }

Modified: head/sys/dev/iicbus/twsi/twsi.h
==============================================================================
--- head/sys/dev/iicbus/twsi/twsi.h	Fri Apr  5 15:33:43 2019	(r345950)
+++ head/sys/dev/iicbus/twsi/twsi.h	Fri Apr  5 15:53:27 2019	(r345951)
@@ -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;





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904051553.x35FrRB2074437>