Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jun 1999 10:05:30 +0200 (MET DST)
From:      Nick Hibma <nick.hibma@jrc.it>
To:        Stephen Hocking-Senior Programmer PGS Tensor Perth <shocking@prth.pgs.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: KLD cdev example doesn't work anymore
Message-ID:  <Pine.GSO.3.95q.990625100048.2790M-100000@elect8>
In-Reply-To: <199906250316.LAA17664@ariadne.tensor.pgs.com>

next in thread | previous in thread | raw e-mail | index | archive | help

find /usr/src -name \*.c | xargs grep DEV_DRIVER_MODULE

and check the changes on that file.

For your reference, the changes that have recently been made to ugen.c
with respect to the cdevsw thingies:

RCS file: /home/ncvs/src/sys/dev/usb/ugen.c,v
retrieving revision 1.12
retrieving revision 1.16
diff -u -r1.12 -r1.16
--- ugen.c      1999/04/16 21:22:00     1.12
+++ ugen.c      1999/05/30 16:51:46     1.16
@@ -1,5 +1,5 @@
 /*     $NetBSD: ugen.c,v 1.11 1999/01/08 11:58:25 augustss Exp $
*/
-/*     $FreeBSD: src/sys/dev/usb/ugen.c,v 1.12 1999/04/16 21:22:00
peter Exp $*
/
+/*     $FreeBSD: src/sys/dev/usb/ugen.c,v 1.16 1999/05/30 16:51:46 phk
Exp $  *
/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -121,10 +121,25 @@
 #define UGEN_CDEV_MAJOR        114
 
 static struct cdevsw ugen_cdevsw = {
-       ugenopen,       ugenclose,      ugenread,       ugenwrite,
-       ugenioctl,      nostop,         nullreset,      nodevtotty,
-       ugenpoll,       nommap,         nostrat,
-       "ugen",         NULL,           -1
+       /* open */      ugenopen,
+       /* close */     ugenclose,
+       /* read */      ugenread,
+       /* write */     ugenwrite,
+       /* ioctl */     ugenioctl,
+       /* stop */      nostop,
+       /* reset */     noreset,
+       /* devtotty */  nodevtotty,
+       /* poll */      ugenpoll,
+       /* mmap */      nommap,
+       /* strategy */  nostrategy,
+       /* name */      "ugen",
+       /* parms */     noparms,
+       /* maj */       UGEN_CDEV_MAJOR,
+       /* dump */      nodump,
+       /* psize */     nopsize,
+       /* flags */     0,
+       /* maxio */     0,
+       /* bmaj */      -1
 };
 #endif
 
@@ -141,8 +156,8 @@
 usbd_status ugen_set_interface __P((struct ugen_softc *, int, int));
 int ugen_get_alt_index __P((struct ugen_softc *sc, int ifaceidx));
 
-#define UGENUNIT(n) (((n) >> 4) & 0xf)
-#define UGENENDPOINT(n) ((n) & 0xf)
+#define UGENUNIT(n) ((minor(n) >> 4) & 0xf)
+#define UGENENDPOINT(n) (minor(n) & 0xf)
 
 USB_DECLARE_DRIVER(ugen);
 
@@ -997,6 +1012,6 @@
        return 0;
 }
 
-CDEV_DRIVER_MODULE(ugen, uhub, ugen_driver, ugen_devclass,
-                       UGEN_CDEV_MAJOR, ugen_cdevsw, usbd_driver_load,
0);
+DEV_DRIVER_MODULE(ugen, uhub, ugen_driver, ugen_devclass,
+               UGEN_CDEV_MAJOR, NOMAJ, ugen_cdevsw, usbd_driver_load,
0);
 #endif


Nick

On Fri, 25 Jun 1999, Stephen Hocking-Senior Programmer PGS Tensor Perth wrote:

 > After a long absence, I was just about to get into my new joystick drivers 
 > when it now fails to compile. What's the recommended change?
 > 
 > 
 > 	Stephen
 > -- 
 >   The views expressed above are not those of PGS Tensor.
 > 
 >     "We've heard that a million monkeys at a million keyboards could produce
 >      the Complete Works of Shakespeare; now, thanks to the Internet, we know
 >      this is not true."            Robert Wilensky, University of California
 > 
 > 
 > 
 > 
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-current" in the body of the message
 > 
 > 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.95q.990625100048.2790M-100000>