summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/bluetooth/bthub.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/bluetooth/bthub.c b/sys/dev/bluetooth/bthub.c
index cceab057474..31a3d52b42b 100644
--- a/sys/dev/bluetooth/bthub.c
+++ b/sys/dev/bluetooth/bthub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bthub.c,v 1.2 2007/07/23 13:30:21 mk Exp $ */
+/* $OpenBSD: bthub.c,v 1.3 2007/07/23 14:45:38 mk Exp $ */
/*
* Copyright (c) 2007 Uwe Stuehler <uwe@openbsd.org>
@@ -45,7 +45,7 @@ struct cfdriver bthub_cd = {
int
bthub_match(struct device *parent, void *match, void *aux)
{
- return 1;
+ return (1);
}
void
@@ -75,17 +75,15 @@ bthub_detach(struct device *self, int flags)
mn = self->dv_unit;
vdevgone(maj, mn, mn, VCHR);
- return 0;
+ return (0);
}
-int bthubopen(dev_t dev, int flag, int mode, struct proc *p)
+int
+bthubopen(dev_t dev, int flag, int mode, struct proc *p)
{
struct device *dv;
struct bthub_softc *sc;
- if (minor(dev) != 0)
- return (ENXIO);
-
dv = device_lookup(&bthub_cd, minor(dev));
if (dv == NULL)
return (ENXIO);
@@ -99,7 +97,7 @@ int bthubopen(dev_t dev, int flag, int mode, struct proc *p)
sc->sc_open = 1;
device_unref(dv);
- return 0;
+ return (0);
}
int
@@ -119,6 +117,6 @@ bthubclose(dev_t dev, int flag, int mode, struct proc *p)
int
bthubioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
- return ENOTTY;
+ return (ENOTTY);
}