From owner-freebsd-current Fri Jun 25 1: 5:50 1999 Delivered-To: freebsd-current@freebsd.org Received: from mrelay.jrc.it (mrelay.jrc.it [139.191.1.65]) by hub.freebsd.org (Postfix) with ESMTP id 912D914D33 for ; Fri, 25 Jun 1999 01:05:46 -0700 (PDT) (envelope-from nick.hibma@jrc.it) Received: from elect8 (elect8.jrc.it [139.191.71.152]) by mrelay.jrc.it (LMC5692) with SMTP id KAA20018; Fri, 25 Jun 1999 10:05:33 +0200 (MET DST) Date: Fri, 25 Jun 1999 10:05:30 +0200 (MET DST) From: Nick Hibma X-Sender: n_hibma@elect8 Reply-To: Nick Hibma To: Stephen Hocking-Senior Programmer PGS Tensor Perth Cc: current@FreeBSD.ORG Subject: Re: KLD cdev example doesn't work anymore In-Reply-To: <199906250316.LAA17664@ariadne.tensor.pgs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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