summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2013-05-04 12:22:15 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2013-05-04 12:22:15 +0000
commitda1041532ae829801559f0b33bc0e3db7df73e4c (patch)
tree9a66e20f5cd2e7ad05d3cdaf43b3e2b3efe450a1 /sys/dev/usb
parent9c4a31152804c2208deea452a31949571dcb0c77 (diff)
- remove unused DPRINTFN, simple DPRINTF is enough
- sc_dying is unused, remove it and the uthum_activate() function suggested by mpi (for ugold, but applicable here too), ok mpi
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/uthum.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/sys/dev/usb/uthum.c b/sys/dev/usb/uthum.c
index e5bf3825029..add7cfefcf2 100644
--- a/sys/dev/usb/uthum.c
+++ b/sys/dev/usb/uthum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthum.c,v 1.19 2013/04/15 09:23:02 mglocker Exp $ */
+/* $OpenBSD: uthum.c,v 1.20 2013/05/04 12:22:14 sthen Exp $ */
/*
* Copyright (c) 2009, 2010 Yojiro UO <yuo@nui.org>
@@ -39,14 +39,11 @@
#endif
#ifdef UTHUM_DEBUG
-int uthumdebug = 0;
-#define DPRINTFN(n, x) do { if (uthumdebug > (n)) printf x; } while (0)
+#define DPRINTF(x) do { printf x; } while (0)
#else
-#define DPRINTFN(n, x)
+#define DPRINTF(x)
#endif
-#define DPRINTF(x) DPRINTFN(0, x)
-
/* Device types */
#define UTHUM_TYPE_TEMPERHUM 0x535a
#define UTHUM_TYPE_TEMPERHUM_2 0x575a /* alternative TEMPerHUM */
@@ -116,8 +113,6 @@ struct uthum_sensor {
struct uthum_softc {
struct uhidev sc_hdev;
struct usbd_device *sc_udev;
- u_char sc_dying;
- uint16_t sc_flag;
int sc_device_type;
int sc_num_sensors;
@@ -141,7 +136,6 @@ const struct usb_devno uthum_devs[] = {
int uthum_match(struct device *, void *, void *);
void uthum_attach(struct device *, struct device *, void *);
int uthum_detach(struct device *, int);
-int uthum_activate(struct device *, int);
int uthum_issue_cmd(struct uthum_softc *, uint8_t, int);
int uthum_read_data(struct uthum_softc *, uint8_t, uint8_t *, size_t, int);
@@ -170,8 +164,7 @@ const struct cfattach uthum_ca = {
sizeof(struct uthum_softc),
uthum_match,
uthum_attach,
- uthum_detach,
- uthum_activate,
+ uthum_detach
};
int
@@ -282,19 +275,6 @@ uthum_detach(struct device *self, int flags)
return (rv);
}
-int
-uthum_activate(struct device *self, int act)
-{
- struct uthum_softc *sc = (struct uthum_softc *)self;
-
- switch (act) {
- case DVACT_DEACTIVATE:
- sc->sc_dying = 1;
- break;
- }
- return (0);
-}
-
void
uthum_intr(struct uhidev *addr, void *ibuf, u_int len)
{