Make a typedef for struct proc to make portingeasier.

This commit is contained in:
augustss 2001-12-31 12:15:21 +00:00
parent d14e739b92
commit 152efb1a0e
15 changed files with 103 additions and 113 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ */
/* $NetBSD: ucom.c,v 1.41 2001/12/31 12:15:21 augustss Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.41 2001/12/31 12:15:21 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -141,7 +141,7 @@ Static int ucomparam(struct tty *, struct termios *);
Static void ucomstart(struct tty *);
Static void ucom_shutdown(struct ucom_softc *);
Static int ucom_do_ioctl(struct ucom_softc *, u_long, caddr_t,
int, struct proc *);
int, usb_proc_ptr);
Static void ucom_dtr(struct ucom_softc *, int);
Static void ucom_rts(struct ucom_softc *, int);
Static void ucom_break(struct ucom_softc *, int);
@ -291,7 +291,7 @@ ucom_shutdown(struct ucom_softc *sc)
}
int
ucomopen(dev_t dev, int flag, int mode, struct proc *p)
ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
int unit = UCOMUNIT(dev);
usbd_status err;
@ -486,7 +486,7 @@ bad:
}
int
ucomclose(dev_t dev, int flag, int mode, struct proc *p)
ucomclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct ucom_softc *sc = ucom_cd.cd_devs[UCOMUNIT(dev)];
struct tty *tp = sc->sc_tty;
@ -553,10 +553,7 @@ ucomwrite(dev_t dev, struct uio *uio, int flag)
}
int
ucompoll(dev, events, p)
dev_t dev;
int events;
struct proc *p;
ucompoll(dev_t dev, int events, usb_proc_ptr p)
{
struct ucom_softc *sc = ucom_cd.cd_devs[UCOMUNIT(dev)];
struct tty *tp = sc->sc_tty;
@ -582,7 +579,7 @@ ucomtty(dev_t dev)
}
int
ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
struct ucom_softc *sc = ucom_cd.cd_devs[UCOMUNIT(dev)];
int error;
@ -596,7 +593,7 @@ ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
Static int
ucom_do_ioctl(struct ucom_softc *sc, u_long cmd, caddr_t data,
int flag, struct proc *p)
int flag, usb_proc_ptr p)
{
struct tty *tp = sc->sc_tty;
int error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ucomvar.h,v 1.9 2001/01/23 21:56:17 augustss Exp $ */
/* $NetBSD: ucomvar.h,v 1.10 2001/12/31 12:15:21 augustss Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -57,7 +57,7 @@ struct ucom_methods {
#define UCOM_SET_BREAK 3
int (*ucom_param)(void *sc, int portno, struct termios *);
int (*ucom_ioctl)(void *sc, int portno, u_long cmd,
caddr_t data, int flag, struct proc *p);
caddr_t data, int flag, usb_proc_ptr p);
int (*ucom_open)(void *sc, int portno);
void (*ucom_close)(void *sc, int portno);
void (*ucom_read)(void *sc, int portno, u_char **ptr, u_int32_t *count);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ugen.c,v 1.53 2001/12/31 11:56:37 augustss Exp $ */
/* $NetBSD: ugen.c,v 1.54 2001/12/31 12:15:21 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */
/*
@ -40,7 +40,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.53 2001/12/31 11:56:37 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.54 2001/12/31 12:15:21 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -159,7 +159,7 @@ Static void ugen_isoc_rintr(usbd_xfer_handle xfer, usbd_private_handle addr,
Static int ugen_do_read(struct ugen_softc *, int, struct uio *, int);
Static int ugen_do_write(struct ugen_softc *, int, struct uio *, int);
Static int ugen_do_ioctl(struct ugen_softc *, int, u_long,
caddr_t, int, struct proc *);
caddr_t, int, usb_proc_ptr);
Static int ugen_set_config(struct ugen_softc *sc, int configno);
Static usb_config_descriptor_t *ugen_get_cdesc(struct ugen_softc *sc,
int index, int *lenp);
@ -299,7 +299,7 @@ ugen_set_config(struct ugen_softc *sc, int configno)
}
int
ugenopen(dev_t dev, int flag, int mode, struct proc *p)
ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct ugen_softc *sc;
int unit = UGENUNIT(dev);
@ -431,7 +431,7 @@ ugenopen(dev_t dev, int flag, int mode, struct proc *p)
}
int
ugenclose(dev_t dev, int flag, int mode, struct proc *p)
ugenclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@ -998,7 +998,7 @@ ugen_get_alt_index(struct ugen_softc *sc, int ifaceidx)
Static int
ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
caddr_t addr, int flag, struct proc *p)
caddr_t addr, int flag, usb_proc_ptr p)
{
struct ugen_endpoint *sce;
usbd_status err;
@ -1262,7 +1262,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
}
int
ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@ -1278,7 +1278,7 @@ ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
}
int
ugenpoll(dev_t dev, int events, struct proc *p)
ugenpoll(dev_t dev, int events, usb_proc_ptr p)
{
struct ugen_softc *sc;
struct ugen_endpoint *sce;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhid.c,v 1.47 2001/12/28 17:32:36 augustss Exp $ */
/* $NetBSD: uhid.c,v 1.48 2001/12/31 12:15:21 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.47 2001/12/28 17:32:36 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.48 2001/12/31 12:15:21 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -90,7 +90,7 @@ struct uhid_softc {
struct clist sc_q;
struct selinfo sc_rsel;
struct proc *sc_async; /* process that wants SIGIO */
usb_proc_ptr sc_async; /* process that wants SIGIO */
u_char sc_state; /* driver state */
#define UHID_ASLP 0x01 /* waiting for device data */
#define UHID_IMMED 0x02 /* return read data immediately */
@ -237,7 +237,7 @@ uhid_intr(struct uhidev *addr, void *data, u_int len)
}
int
uhidopen(dev_t dev, int flag, int mode, struct proc *p)
uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct uhid_softc *sc;
int error;
@ -265,7 +265,7 @@ uhidopen(dev_t dev, int flag, int mode, struct proc *p)
}
int
uhidclose(dev_t dev, int flag, int mode, struct proc *p)
uhidclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct uhid_softc *sc;
@ -398,7 +398,7 @@ uhidwrite(dev_t dev, struct uio *uio, int flag)
int
uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr,
int flag, struct proc *p)
int flag, usb_proc_ptr p)
{
struct usb_ctl_report_desc *rd;
struct usb_ctl_report *re;
@ -512,7 +512,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr,
}
int
uhidioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
uhidioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
{
struct uhid_softc *sc;
int error;
@ -527,7 +527,7 @@ uhidioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
}
int
uhidpoll(dev_t dev, int events, struct proc *p)
uhidpoll(dev_t dev, int events, usb_proc_ptr p)
{
struct uhid_softc *sc;
int revents = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uirda.c,v 1.8 2001/12/18 14:50:01 augustss Exp $ */
/* $NetBSD: uirda.c,v 1.9 2001/12/31 12:15:21 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uirda.c,v 1.8 2001/12/18 14:50:01 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: uirda.c,v 1.9 2001/12/31 12:15:21 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -226,14 +226,14 @@ struct uirda_softc {
#define UIRDA_WR_TIMEOUT 200
int uirda_open(void *h, int flag, int mode, struct proc *p);
int uirda_close(void *h, int flag, int mode, struct proc *p);
int uirda_open(void *h, int flag, int mode, usb_proc_ptr p);
int uirda_close(void *h, int flag, int mode, usb_proc_ptr p);
int uirda_read(void *h, struct uio *uio, int flag);
int uirda_write(void *h, struct uio *uio, int flag);
int uirda_set_params(void *h, struct irda_params *params);
int uirda_get_speeds(void *h, int *speeds);
int uirda_get_turnarounds(void *h, int *times);
int uirda_poll(void *h, int events, struct proc *p);
int uirda_poll(void *h, int events, usb_proc_ptr p);
struct irframe_methods uirda_methods = {
uirda_open, uirda_close, uirda_read, uirda_write, uirda_poll,
@ -438,7 +438,7 @@ uirda_activate(device_ptr_t self, enum devact act)
}
int
uirda_open(void *h, int flag, int mode, struct proc *p)
uirda_open(void *h, int flag, int mode, usb_proc_ptr p)
{
struct uirda_softc *sc = h;
int error;
@ -507,7 +507,7 @@ bad1:
}
int
uirda_close(void *h, int flag, int mode, struct proc *p)
uirda_close(void *h, int flag, int mode, usb_proc_ptr p)
{
struct uirda_softc *sc = h;
@ -654,7 +654,7 @@ uirda_write(void *h, struct uio *uio, int flag)
}
int
uirda_poll(void *h, int events, struct proc *p)
uirda_poll(void *h, int events, usb_proc_ptr p)
{
struct uirda_softc *sc = h;
int revents = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ukbd.c,v 1.79 2001/12/30 19:37:43 augustss Exp $ */
/* $NetBSD: ukbd.c,v 1.80 2001/12/31 12:15:21 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.79 2001/12/30 19:37:43 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.80 2001/12/31 12:15:21 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -245,7 +245,7 @@ Static int ukbd_enable(void *, int);
Static void ukbd_set_leds(void *, int);
#if defined(__NetBSD__)
Static int ukbd_ioctl(void *, u_long, caddr_t, int, struct proc *);
Static int ukbd_ioctl(void *, u_long, caddr_t, int, usb_proc_ptr );
#ifdef WSDISPLAY_COMPAT_RAWKBD
Static void ukbd_rawrepeat(void *v);
#endif
@ -467,7 +467,7 @@ ukbd_intr(struct uhidev *addr, void *ibuf, u_int len)
ud->modifiers = 0;
for (i = 0; i < sc->sc_nmod; i++)
if (hid_get_data(ibuf, &sc->sc_modloc[i]))
ud->modifiers |= 1 << i;
ud->modifiers |= sc->sc_mods[i].mask;
memcpy(ud->keycode, (char *)ibuf + sc->sc_keycodeloc.pos / 8,
sc->sc_nkeycode);
@ -684,7 +684,7 @@ ukbd_rawrepeat(void *v)
#endif
int
ukbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
ukbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
struct ukbd_softc *sc = v;
@ -804,6 +804,8 @@ ukbd_parse_desc(struct ukbd_softc *sc)
"cnt=%d\n", imod,
h.usage, h.flags, h.loc.pos, h.loc.size, h.loc.count));
if (h.flags & HIO_VARIABLE) {
if (h.loc.size != 1)
return ("bad modifier size");
/* Single item */
if (imod < MAXMOD) {
sc->sc_modloc[imod] = h.loc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ulpt.c,v 1.45 2001/11/29 11:07:12 augustss Exp $ */
/* $NetBSD: ulpt.c,v 1.46 2001/12/31 12:15:21 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */
/*
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.45 2001/11/29 11:07:12 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.46 2001/12/31 12:15:21 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -472,7 +472,7 @@ int ulptusein = 1;
* Reset the printer, then wait until it's selected and not busy.
*/
int
ulptopen(dev_t dev, int flag, int mode, struct proc *p)
ulptopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
u_char flags = ULPTFLAGS(dev);
struct ulpt_softc *sc;
@ -601,7 +601,7 @@ ulpt_statusmsg(u_char status, struct ulpt_softc *sc)
}
int
ulptclose(dev_t dev, int flag, int mode, struct proc *p)
ulptclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct ulpt_softc *sc;
@ -691,7 +691,7 @@ ulptwrite(dev_t dev, struct uio *uio, int flags)
}
int
ulptioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
ulptioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
int error = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: umass_scsipi.c,v 1.3 2001/12/29 13:52:21 augustss Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.4 2001/12/31 12:15:21 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.3 2001/12/29 13:52:21 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.4 2001/12/31 12:15:21 augustss Exp $");
#include "atapibus.h"
#include "scsibus.h"
@ -100,7 +100,7 @@ Static void umass_scsipi_request(struct scsipi_channel *,
scsipi_adapter_req_t, void *);
Static void umass_scsipi_minphys(struct buf *bp);
Static int umass_scsipi_ioctl(struct scsipi_channel *, u_long,
caddr_t, int, struct proc *);
caddr_t, int, usb_proc_ptr );
Static int umass_scsipi_getgeom(struct scsipi_periph *periph,
struct disk_parms *, u_long sectors);
@ -384,7 +384,7 @@ umass_scsipi_minphys(struct buf *bp)
int
umass_scsipi_ioctl(struct scsipi_channel *chan, u_long cmd, caddr_t arg,
int flag, struct proc *p)
int flag, usb_proc_ptr p)
{
/*struct umass_softc *sc = link->adapter_softc;*/
/*struct umass_scsipi_softc *scbus = sc->bus;*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: umodem.c,v 1.41 2001/11/13 06:24:56 lukem Exp $ */
/* $NetBSD: umodem.c,v 1.42 2001/12/31 12:15:22 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -51,7 +51,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.41 2001/11/13 06:24:56 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.42 2001/12/31 12:15:22 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -139,7 +139,7 @@ Static void umodem_rts(struct umodem_softc *, int);
Static void umodem_break(struct umodem_softc *, int);
Static void umodem_set_line_state(struct umodem_softc *);
Static int umodem_param(void *, int, struct termios *);
Static int umodem_ioctl(void *, int, u_long, caddr_t, int, struct proc *);
Static int umodem_ioctl(void *, int, u_long, caddr_t, int, usb_proc_ptr );
Static int umodem_open(void *, int portno);
Static void umodem_close(void *, int portno);
Static void umodem_intr(usbd_xfer_handle, usbd_private_handle, usbd_status);
@ -526,7 +526,7 @@ umodem_param(void *addr, int portno, struct termios *t)
int
umodem_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag,
struct proc *p)
usb_proc_ptr p)
{
struct umodem_softc *sc = addr;
int error = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ums.c,v 1.54 2001/12/29 16:15:42 augustss Exp $ */
/* $NetBSD: ums.c,v 1.55 2001/12/31 12:15:22 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.54 2001/12/29 16:15:42 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.55 2001/12/31 12:15:22 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -118,7 +118,7 @@ Static void ums_intr(struct uhidev *addr, void *ibuf, u_int len);
Static int ums_enable(void *);
Static void ums_disable(void *);
Static int ums_ioctl(void *, u_long, caddr_t, int, struct proc *);
Static int ums_ioctl(void *, u_long, caddr_t, int, usb_proc_ptr );
const struct wsmouse_accessops ums_accessops = {
ums_enable,
@ -352,7 +352,7 @@ ums_disable(void *v)
}
Static int
ums_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
ums_ioctl(void *v, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
switch (cmd) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: uplcom.c,v 1.23 2001/12/03 01:47:12 augustss Exp $ */
/* $NetBSD: uplcom.c,v 1.24 2001/12/31 12:15:22 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.23 2001/12/03 01:47:12 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.24 2001/12/31 12:15:22 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -133,7 +133,7 @@ Static void uplcom_break(struct uplcom_softc *, int);
Static void uplcom_set_line_state(struct uplcom_softc *);
Static void uplcom_get_status(void *, int portno, u_char *lsr, u_char *msr);
#if TODO
Static int uplcom_ioctl(void *, int, u_long, caddr_t, int, struct proc *);
Static int uplcom_ioctl(void *, int, u_long, caddr_t, int, usb_proc_ptr );
#endif
Static int uplcom_param(void *, int, struct termios *);
Static int uplcom_open(void *, int);
@ -710,7 +710,7 @@ uplcom_get_status(void *addr, int portno, u_char *lsr, u_char *msr)
#if TODO
int
uplcom_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag,
struct proc *p)
usb_proc_ptr p)
{
struct uplcom_softc *sc = addr;
int error = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: urio.c,v 1.9 2001/12/16 15:11:19 ichiro Exp $ */
/* $NetBSD: urio.c,v 1.10 2001/12/31 12:15:22 augustss Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: urio.c,v 1.9 2001/12/16 15:11:19 ichiro Exp $");
__KERNEL_RCSID(0, "$NetBSD: urio.c,v 1.10 2001/12/31 12:15:22 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -295,7 +295,7 @@ urio_activate(device_ptr_t self, enum devact act)
#endif
int
urioopen(dev_t dev, int flag, int mode, struct proc *p)
urioopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct urio_softc *sc;
usbd_status err;
@ -328,7 +328,7 @@ urioopen(dev_t dev, int flag, int mode, struct proc *p)
}
int
urioclose(dev_t dev, int flag, int mode, struct proc *p)
urioclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct urio_softc *sc;
USB_GET_SC(urio, URIOUNIT(dev), sc);
@ -470,7 +470,7 @@ uriowrite(dev_t dev, struct uio *uio, int flag)
int
urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
{
struct urio_softc * sc;
int unit = URIOUNIT(dev);
@ -565,7 +565,7 @@ ret:
}
int
uriopoll(dev_t dev, int events, struct proc *p)
uriopoll(dev_t dev, int events, usb_proc_ptr p)
{
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb.c,v 1.59 2001/11/26 20:16:55 augustss Exp $ */
/* $NetBSD: usb.c,v 1.60 2001/12/31 12:15:22 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.59 2001/11/26 20:16:55 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.60 2001/12/31 12:15:22 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -120,7 +120,7 @@ Static SIMPLEQ_HEAD(, usb_event_q) usb_events =
SIMPLEQ_HEAD_INITIALIZER(usb_events);
Static int usb_nevents = 0;
Static struct selinfo usb_selevent;
Static struct proc *usb_async_proc; /* process that wants USB SIGIO */
Static usb_proc_ptr usb_async_proc; /* process that wants USB SIGIO */
Static int usb_dev_open = 0;
Static void usb_add_event(int, struct usb_event *);
@ -290,6 +290,15 @@ usb_event_thread(void *arg)
DPRINTF(("usb_event_thread: start\n"));
#if 0
/*
* In case this controller is a companion controller to an
* EHCI controller we need to wait until the EHCI controller
* has grabbed the port.
*/
usb_delay_ms(sc->sc_bus, 250);
#endif
/* Make sure first discover does something. */
sc->sc_bus->needs_explore = 1;
usb_discover(sc);
@ -356,7 +365,7 @@ usbctlprint(void *aux, const char *pnp)
#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
int
usbopen(dev_t dev, int flag, int mode, struct proc *p)
usbopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
int unit = minor(dev);
struct usb_softc *sc;
@ -411,7 +420,7 @@ usbread(dev_t dev, struct uio *uio, int flag)
}
int
usbclose(dev_t dev, int flag, int mode, struct proc *p)
usbclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
int unit = minor(dev);
@ -424,7 +433,7 @@ usbclose(dev_t dev, int flag, int mode, struct proc *p)
}
int
usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
struct usb_softc *sc;
int unit = minor(devt);
@ -545,7 +554,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
}
int
usbpoll(dev_t dev, int events, struct proc *p)
usbpoll(dev_t dev, int events, usb_proc_ptr p)
{
int revents, mask, s;
@ -660,6 +669,7 @@ usb_add_event(int type, struct usb_event *uep)
psignal(usb_async_proc, SIGIO);
splx(s);
}
void
usb_schedsoftintr(usbd_bus_handle bus)
{

View File

@ -1,5 +1,5 @@
/* $OpenBSD: usb_port.h,v 1.18 2000/09/06 22:42:10 rahnds Exp $ */
/* $NetBSD: usb_port.h,v 1.48 2001/12/27 11:28:01 augustss Exp $ */
/* $NetBSD: usb_port.h,v 1.49 2001/12/31 12:15:22 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@ -90,6 +90,8 @@
#define SCSI_MODE_SENSE MODE_SENSE
typedef struct proc *usb_proc_ptr;
typedef struct device *device_ptr_t;
#define USBBASEDEVICE struct device
#define USBDEV(bdev) (&(bdev))
@ -206,6 +208,8 @@ int __CONCAT(dname,_detach)(struct device *self, int flags)
#define Static
typedef struct proc *usb_proc_ptr;
#define UCOMBUSCF_PORTNO -1
#define UCOMBUSCF_PORTNO_DEFAULT -1
@ -389,6 +393,8 @@ __CONCAT(dname,_detach)(self, flags) \
#define DECLARE_USB_DMA_T typedef void * usb_dma_t
typedef struct proc *usb_proc_ptr;
/* XXX Change this when FreeBSD has memset
*/
#define memcpy(d, s, l) bcopy((s),(d),(l))

View File

@ -1,4 +1,4 @@
/* $NetBSD: uscanner.c,v 1.25 2001/12/30 11:13:22 augustss Exp $ */
/* $NetBSD: uscanner.c,v 1.26 2001/12/31 12:15:22 augustss Exp $ */
/* $FreeBSD$ */
/*
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uscanner.c,v 1.25 2001/12/30 11:13:22 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: uscanner.c,v 1.26 2001/12/31 12:15:22 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -354,11 +354,7 @@ USB_ATTACH(uscanner)
}
int
uscanneropen(dev, flag, mode, p)
dev_t dev;
int flag;
int mode;
struct proc *p;
uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct uscanner_softc *sc;
int unit = USCANNERUNIT(dev);
@ -421,11 +417,7 @@ uscanneropen(dev, flag, mode, p)
}
int
uscannerclose(dev, flag, mode, p)
dev_t dev;
int flag;
int mode;
struct proc *p;
uscannerclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
{
struct uscanner_softc *sc;
@ -484,10 +476,7 @@ uscanner_do_close(struct uscanner_softc *sc)
}
Static int
uscanner_do_read(sc, uio, flag)
struct uscanner_softc *sc;
struct uio *uio;
int flag;
uscanner_do_read(struct uscanner_softc *sc, struct uio *uio, int flag)
{
u_int32_t n, tn;
usbd_status err;
@ -526,10 +515,7 @@ uscanner_do_read(sc, uio, flag)
}
int
uscannerread(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
uscannerread(dev_t dev, struct uio *uio, int flag)
{
struct uscanner_softc *sc;
int error;
@ -545,10 +531,7 @@ uscannerread(dev, uio, flag)
}
Static int
uscanner_do_write(sc, uio, flag)
struct uscanner_softc *sc;
struct uio *uio;
int flag;
uscanner_do_write(struct uscanner_softc *sc, struct uio *uio, int flag)
{
u_int32_t n;
int error = 0;
@ -582,10 +565,7 @@ uscanner_do_write(sc, uio, flag)
}
int
uscannerwrite(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
uscannerwrite(dev_t dev, struct uio *uio, int flag)
{
struct uscanner_softc *sc;
int error;
@ -601,9 +581,7 @@ uscannerwrite(dev, uio, flag)
#if defined(__NetBSD__) || defined(__OpenBSD__)
int
uscanner_activate(self, act)
device_ptr_t self;
enum devact act;
uscanner_activate(device_ptr_t self, enum devact act)
{
struct uscanner_softc *sc = (struct uscanner_softc *)self;
@ -678,10 +656,7 @@ USB_DETACH(uscanner)
}
int
uscannerpoll(dev, events, p)
dev_t dev;
int events;
struct proc *p;
uscannerpoll(dev_t dev, int events, usb_proc_ptr p)
{
struct uscanner_softc *sc;
int revents = 0;
@ -703,7 +678,7 @@ uscannerpoll(dev, events, p)
}
int
uscannerioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
uscannerioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
{
return (EINVAL);
}