Date: Thu, 29 Jan 2009 08:19:36 -0500 From: John Baldwin <jhb@freebsd.org> To: Ed Schouten <ed@freebsd.org> Cc: powerpc@freebsd.org Subject: Re: svn commit: r187878 - head/sys/dev/adb Message-ID: <200901290819.36839.jhb@freebsd.org> In-Reply-To: <200901290559.n0T5xhmL043647@svn.freebsd.org> References: <200901290559.n0T5xhmL043647@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 29 January 2009 12:59:43 am Ed Schouten wrote: > 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. --- //depot/vendor/freebsd/src/sys/dev/adb/adb_mouse.c 2009/01/29 06:00:14 +++ //depot/user/jhb/acpipci/dev/adb/adb_mouse.c 2009/01/29 13:18:24 @@ -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 @@ 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); Can someone on powerpc@ test it please? -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901290819.36839.jhb>