svn commit: r187893 - head/sys/dev/adb

John Baldwin jhb at FreeBSD.org
Thu Jan 29 08:18:50 PST 2009


Author: jhb
Date: Thu Jan 29 16:18:49 2009
New Revision: 187893
URL: http://svn.freebsd.org/changeset/base/187893

Log:
  Use si_drv1 to hold the softc for the adb_mouse character device instead of
  using devclass_get_softc().
  
  Tested by:	nwhitehorn

Modified:
  head/sys/dev/adb/adb_mouse.c

Modified: head/sys/dev/adb/adb_mouse.c
==============================================================================
--- head/sys/dev/adb/adb_mouse.c	Thu Jan 29 11:38:28 2009	(r187892)
+++ head/sys/dev/adb/adb_mouse.c	Thu Jan 29 16:18:49 2009	(r187893)
@@ -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);
 


More information about the svn-src-all mailing list