From 7d78c27be03b324979459f78aa6e6eb79a22d287 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Sun, 16 Jun 2002 02:35:01 +0000 Subject: defining cdev_*_init over other unrelated device's cdev_*_init is very very bad --- sys/sys/conf.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 9c9aa88cfc8..5f58bb42860 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.58 2002/06/16 01:36:22 mickey Exp $ */ +/* $OpenBSD: conf.h,v 1.59 2002/06/16 02:35:00 mickey Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -406,8 +406,11 @@ void randomattach(void); (dev_type_stop((*))) enodev, 0, (dev_type_select((*))) enodev, \ (dev_type_mmap((*))) enodev } -#define cdev_usbdev_init(c,n) cdev_random_init(c,n) -#define cdev_ugen_init(c,n) cdev_random_init(c,n) +#define cdev_usbdev_init(c,n) { \ + dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ + dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ + 0, dev_init(c,n,select), (dev_type_mmap((*))) enodev } +#define cdev_ugen_init(c,n) cdev_usbdev_init(c,n) /* open, close, init */ #define cdev_pci_init(c,n) { \ -- cgit v1.2.3