summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/adb/adb_mouse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/adb/adb_mouse.c b/sys/dev/adb/adb_mouse.c
index 09f3641..f602f1c 100644
--- a/sys/dev/adb/adb_mouse.c
+++ b/sys/dev/adb/adb_mouse.c
@@ -46,7 +46,7 @@
#include "adb.h"
-#define CDEV_GET_SOFTC(x) devclass_get_softc(adb_mouse_devclass, dev2unit(x) & 0x1f)
+#define CDEV_GET_SOFTC(x) (x)->si_drv1
static int adb_mouse_probe(device_t dev);
static int adb_mouse_attach(device_t dev);
@@ -236,6 +236,7 @@ adb_mouse_attach(device_t dev)
sc->cdev = make_dev(&ams_cdevsw, device_get_unit(dev),
UID_ROOT, GID_OPERATOR, 0644, "ams%d",
device_get_unit(dev));
+ sc->cdev->si_drv1 = sc;
adb_set_autopoll(dev,1);
OpenPOWER on IntegriCloud