aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/ugen.c
diff options
context:
space:
mode:
authorRoger Hardiman <roger@FreeBSD.org>2000-12-07 10:13:18 +0000
committerRoger Hardiman <roger@FreeBSD.org>2000-12-07 10:13:18 +0000
commit5f41c13187711241c07e21d62e7fe81792fff585 (patch)
tree3fb15609b854f0f1cf505b573cbacc43884ca415 /sys/dev/usb/ugen.c
parent98b2dbaaa2e2ec4d5be92d09c17286dad8cb5497 (diff)
downloadsrc-5f41c13187711241c07e21d62e7fe81792fff585.tar.gz
src-5f41c13187711241c07e21d62e7fe81792fff585.zip
Non functional change.
Change a few indentations to tabs. Change the functions to use ANSI sytle parameters. This lowers the diffs between our copy of ugen.c and NetBSD's copy Approved by: Nick Hibma
Notes
Notes: svn path=/head/; revision=69698
Diffstat (limited to 'sys/dev/usb/ugen.c')
-rw-r--r--sys/dev/usb/ugen.c91
1 files changed, 21 insertions, 70 deletions
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 4a5937811dd1..d324220bfe0d 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,5 +1,5 @@
/* $NetBSD: ugen.c,v 1.27 1999/10/28 12:08:38 augustss Exp $ */
-/* $FreeBSD$ */
+/* $FreeBSD$ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -135,15 +135,15 @@ Static struct cdevsw ugen_cdevsw = {
#endif
Static void ugenintr(usbd_xfer_handle xfer, usbd_private_handle addr,
- usbd_status status);
+ usbd_status status);
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, struct proc *);
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);
+ int index, int *lenp);
Static usbd_status ugen_set_interface(struct ugen_softc *, int, int);
Static int ugen_get_alt_index(struct ugen_softc *sc, int ifaceidx);
@@ -200,9 +200,7 @@ USB_ATTACH(ugen)
}
Static int
-ugen_set_config(sc, configno)
- struct ugen_softc *sc;
- int configno;
+ugen_set_config(struct ugen_softc *sc, int configno)
{
usbd_device_handle dev = sc->sc_udev;
usbd_interface_handle iface;
@@ -293,11 +291,7 @@ ugen_set_config(sc, configno)
}
int
-ugenopen(dev, flag, mode, p)
- dev_t dev;
- int flag;
- int mode;
- struct proc *p;
+ugenopen(dev_t dev, int flag, int mode, struct proc *p)
{
struct ugen_softc *sc;
int unit = UGENUNIT(dev);
@@ -381,11 +375,7 @@ ugenopen(dev, flag, mode, p)
}
int
-ugenclose(dev, flag, mode, p)
- dev_t dev;
- int flag;
- int mode;
- struct proc *p;
+ugenclose(dev_t dev, int flag, int mode, struct proc *p)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@@ -437,11 +427,7 @@ ugenclose(dev, flag, mode, p)
}
Static int
-ugen_do_read(sc, endpt, uio, flag)
- struct ugen_softc *sc;
- int endpt;
- struct uio *uio;
- int flag;
+ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag)
{
struct ugen_endpoint *sce = &sc->sc_endpoints[endpt][IN];
u_int32_t n, tn;
@@ -544,10 +530,7 @@ ugen_do_read(sc, endpt, uio, flag)
}
int
-ugenread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+ugenread(dev_t dev, struct uio *uio, int flag)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@@ -563,11 +546,7 @@ ugenread(dev, uio, flag)
}
Static int
-ugen_do_write(sc, endpt, uio, flag)
- struct ugen_softc *sc;
- int endpt;
- struct uio *uio;
- int flag;
+ugen_do_write(struct ugen_softc *sc, int endpt, struct uio *uio, int flag)
{
struct ugen_endpoint *sce = &sc->sc_endpoints[endpt][OUT];
u_int32_t n;
@@ -624,10 +603,7 @@ ugen_do_write(sc, endpt, uio, flag)
}
int
-ugenwrite(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+ugenwrite(dev_t dev, struct uio *uio, int flag)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@@ -644,9 +620,7 @@ ugenwrite(dev, uio, flag)
#if defined(__NetBSD__) || defined(__OpenBSD__)
int
-ugen_activate(self, act)
- device_ptr_t self;
- enum devact act;
+ugen_activate(device_ptr_t self, enum devact act)
{
struct ugen_softc *sc = (struct ugen_softc *)self;
@@ -747,10 +721,7 @@ USB_DETACH(ugen)
}
Static void
-ugenintr(xfer, addr, status)
- usbd_xfer_handle xfer;
- usbd_private_handle addr;
- usbd_status status;
+ugenintr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)
{
struct ugen_endpoint *sce = addr;
/*struct ugen_softc *sc = sce->sc;*/
@@ -785,9 +756,7 @@ ugenintr(xfer, addr, status)
}
Static usbd_status
-ugen_set_interface(sc, ifaceidx, altno)
- struct ugen_softc *sc;
- int ifaceidx, altno;
+ugen_set_interface(struct ugen_softc *sc, int ifaceidx, int altno)
{
usbd_interface_handle iface;
usb_endpoint_descriptor_t *ed;
@@ -842,10 +811,7 @@ ugen_set_interface(sc, ifaceidx, altno)
/* Retrieve a complete descriptor for a certain device and index. */
Static usb_config_descriptor_t *
-ugen_get_cdesc(sc, index, lenp)
- struct ugen_softc *sc;
- int index;
- int *lenp;
+ugen_get_cdesc(struct ugen_softc *sc, int index, int *lenp)
{
usb_config_descriptor_t *cdesc, *tdesc, cdescr;
int len;
@@ -878,27 +844,20 @@ ugen_get_cdesc(sc, index, lenp)
}
Static int
-ugen_get_alt_index(sc, ifaceidx)
- struct ugen_softc *sc;
- int ifaceidx;
+ugen_get_alt_index(struct ugen_softc *sc, int ifaceidx)
{
usbd_interface_handle iface;
usbd_status err;
err = usbd_device2interface_handle(sc->sc_udev, ifaceidx, &iface);
if (err)
- return (-1);
+ return (-1);
return (usbd_get_interface_altindex(iface));
}
Static int
-ugen_do_ioctl(sc, endpt, cmd, addr, flag, p)
- struct ugen_softc *sc;
- int endpt;
- u_long cmd;
- caddr_t addr;
- int flag;
- struct proc *p;
+ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
+ caddr_t addr, int flag, struct proc *p)
{
struct ugen_endpoint *sce;
usbd_status err;
@@ -1174,12 +1133,7 @@ ugen_do_ioctl(sc, endpt, cmd, addr, flag, p)
}
int
-ugenioctl(dev, cmd, addr, flag, p)
- 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, struct proc *p)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@@ -1195,10 +1149,7 @@ ugenioctl(dev, cmd, addr, flag, p)
}
int
-ugenpoll(dev, events, p)
- dev_t dev;
- int events;
- struct proc *p;
+ugenpoll(dev_t dev, int events, struct proc *p)
{
struct ugen_softc *sc;
struct ugen_endpoint *sce;