summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-09-23 07:40:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-09-23 07:40:07 +0200
commitb6c55e1c57bdf482ee7604480ca589dcd3b6597d (patch)
treef5efef8afed8eb4bb2489140d821e8a00ec62f21
parentae1e0c25d8a56d6a09a11cd8d09ad32648b8aa04 (diff)
downloadrtems-libbsd-b6c55e1c57bdf482ee7604480ca589dcd3b6597d.tar.bz2
tsc_lpc32xx.c: Update due to API changes
-rw-r--r--rtemsbsd/sys/dev/input/touchscreen/tsc_lpc32xx.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/rtemsbsd/sys/dev/input/touchscreen/tsc_lpc32xx.c b/rtemsbsd/sys/dev/input/touchscreen/tsc_lpc32xx.c
index c37bd868..21420689 100644
--- a/rtemsbsd/sys/dev/input/touchscreen/tsc_lpc32xx.c
+++ b/rtemsbsd/sys/dev/input/touchscreen/tsc_lpc32xx.c
@@ -270,10 +270,10 @@ lpc_tsc_init(struct lpc_tsc_softc *sc)
TSCWRITE4(sc, LPC32XX_TSC_CON, tmp | LPC32XX_TSC_ADCCON_AUTO_EN);
}
-static void
-lpc_tsc_ev_close(struct evdev_dev *evdev, void *data)
+static int
+lpc_tsc_ev_close(struct evdev_dev *evdev)
{
- struct lpc_tsc_softc *sc = (struct lpc_tsc_softc *)data;
+ struct lpc_tsc_softc *sc = evdev_get_softc(evdev);
uint32_t tmp;
LPC_TSC_LOCK_ASSERT(sc);
@@ -283,12 +283,14 @@ lpc_tsc_ev_close(struct evdev_dev *evdev, void *data)
TSCWRITE4(sc, LPC32XX_TSC_CON, tmp);
lpc_adc_module_disable(sc);
+
+ return (0);
}
static int
-lpc_tsc_ev_open(struct evdev_dev *evdev, void *data)
+lpc_tsc_ev_open(struct evdev_dev *evdev)
{
- struct lpc_tsc_softc *sc = (struct lpc_tsc_softc *)data;
+ struct lpc_tsc_softc *sc = evdev_get_softc(evdev);
LPC_TSC_LOCK_ASSERT(sc);