version 1.51, 2002/03/17 18:02:53 |
version 1.51.4.1, 2002/05/16 11:29:45 |
Line 103 struct uhid_softc { |
|
Line 103 struct uhid_softc { |
|
#define UHID_CHUNK 128 /* chunk size for read */ |
#define UHID_CHUNK 128 /* chunk size for read */ |
#define UHID_BSIZE 1020 /* buffer size */ |
#define UHID_BSIZE 1020 /* buffer size */ |
|
|
cdev_decl(uhid); |
dev_type_open(uhidopen); |
|
dev_type_close(uhidclose); |
|
dev_type_read(uhidread); |
|
dev_type_write(uhidwrite); |
|
dev_type_ioctl(uhidioctl); |
|
dev_type_poll(uhidpoll); |
|
|
|
const struct cdevsw uhid_cdevsw = { |
|
uhidopen, uhidclose, uhidread, uhidwrite, uhidioctl, |
|
nostop, notty, uhidpoll, nommap, |
|
}; |
|
|
Static void uhid_intr(struct uhidev *, void *, u_int len); |
Static void uhid_intr(struct uhidev *, void *, u_int len); |
|
|
Line 189 uhid_detach(struct device *self, int fla |
|
Line 199 uhid_detach(struct device *self, int fla |
|
} |
} |
|
|
/* locate the major number */ |
/* locate the major number */ |
|
#if defined(__NetBSD__) |
|
maj = cdevsw_lookup_major(&uhid_cdevsw); |
|
#elif defined(__OpenBSD__) |
for (maj = 0; maj < nchrdev; maj++) |
for (maj = 0; maj < nchrdev; maj++) |
if (cdevsw[maj].d_open == uhidopen) |
if (cdevsw[maj].d_open == uhidopen) |
break; |
break; |
|
#endif |
|
|
/* Nuke the vnodes for any open instances (calls close). */ |
/* Nuke the vnodes for any open instances (calls close). */ |
mn = self->dv_unit; |
mn = self->dv_unit; |