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

Ed Schouten ed at FreeBSD.org
Wed Jan 28 21:59:43 PST 2009


Author: ed
Date: Thu Jan 29 05:59:42 2009
New Revision: 187878
URL: http://svn.freebsd.org/changeset/base/187878

Log:
  Make adb_mouse use dev2unit() instead of minor().
  
  A real fix would be to migrate it to si_drv0 to store the softc
  directly, but this is the quickest way to fix it right now.

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

Modified: head/sys/dev/adb/adb_mouse.c
==============================================================================
--- head/sys/dev/adb/adb_mouse.c	Wed Jan 28 23:18:21 2009	(r187877)
+++ head/sys/dev/adb/adb_mouse.c	Thu Jan 29 05:59:42 2009	(r187878)
@@ -46,7 +46,7 @@
 
 #include "adb.h"
 
-#define CDEV_GET_SOFTC(x) devclass_get_softc(adb_mouse_devclass, minor(x) & 0x1f)
+#define CDEV_GET_SOFTC(x) devclass_get_softc(adb_mouse_devclass, dev2unit(x) & 0x1f)
 
 static int adb_mouse_probe(device_t dev);
 static int adb_mouse_attach(device_t dev);


More information about the svn-src-head mailing list