Use si_drv1 to hold the softc for the adb_mouse character device instead of

using devclass_get_softc().

Tested by:	nwhitehorn
This commit is contained in:
John Baldwin 2009-01-29 16:18:49 +00:00
parent ad765b0945
commit be57da218c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=187893

View File

@ -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);