summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-01-07 12:53:38 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-01-07 12:53:38 +0000
commitc451e889ac885e7fb2c07358e6700500c6202f40 (patch)
tree44aa81f0e1dffb6b87d2990d7735417cc3b55c0e /sys/dev
parent58d7aff838c31632534e99e95c1d6a8ee319c36a (diff)
Rename some wrongly defined *_CONFIG_NO into *_CONFIG_INDEX.
Configuration indexes start a 0, for the default one, while numbers correspond to the 'bConfigurationValue' field of a config descriptor.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/moscom.c6
-rw-r--r--sys/dev/usb/uark.c6
-rw-r--r--sys/dev/usb/uscom.c6
-rw-r--r--sys/dev/usb/uslcom.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/usb/moscom.c b/sys/dev/usb/moscom.c
index 90873b81568..1d828061b00 100644
--- a/sys/dev/usb/moscom.c
+++ b/sys/dev/usb/moscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moscom.c,v 1.22 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: moscom.c,v 1.23 2016/01/07 12:53:37 mpi Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -30,7 +30,7 @@
#include <dev/usb/ucomvar.h>
#define MOSCOMBUFSZ 256
-#define MOSCOM_CONFIG_NO 0
+#define MOSCOM_CONFIG_INDEX 0
#define MOSCOM_IFACE_NO 0
#define MOSCOM_READ 0x0d
@@ -199,7 +199,7 @@ moscom_attach(struct device *parent, struct device *self, void *aux)
bzero(&uca, sizeof(uca));
sc->sc_udev = uaa->device;
- if (usbd_set_config_index(sc->sc_udev, MOSCOM_CONFIG_NO, 1) != 0) {
+ if (usbd_set_config_index(sc->sc_udev, MOSCOM_CONFIG_INDEX, 1) != 0) {
printf("%s: could not set configuration no\n",
sc->sc_dev.dv_xname);
usbd_deactivate(sc->sc_udev);
diff --git a/sys/dev/usb/uark.c b/sys/dev/usb/uark.c
index 6e6cd232949..4f2be5335a6 100644
--- a/sys/dev/usb/uark.c
+++ b/sys/dev/usb/uark.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uark.c,v 1.22 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: uark.c,v 1.23 2016/01/07 12:53:37 mpi Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -38,7 +38,7 @@ int uarkebug = 0;
#define DPRINTF(x) DPRINTFN(0, x)
#define UARKBUFSZ 256
-#define UARK_CONFIG_NO 0
+#define UARK_CONFIG_INDEX 0
#define UARK_IFACE_NO 0
#define UARK_SET_DATA_BITS(x) (x - 5)
@@ -126,7 +126,7 @@ uark_attach(struct device *parent, struct device *self, void *aux)
bzero(&uca, sizeof(uca));
sc->sc_udev = uaa->device;
- if (usbd_set_config_index(sc->sc_udev, UARK_CONFIG_NO, 1) != 0) {
+ if (usbd_set_config_index(sc->sc_udev, UARK_CONFIG_INDEX, 1) != 0) {
printf("%s: could not set configuration no\n",
sc->sc_dev.dv_xname);
usbd_deactivate(sc->sc_udev);
diff --git a/sys/dev/usb/uscom.c b/sys/dev/usb/uscom.c
index ae78142da50..38aeb237cfe 100644
--- a/sys/dev/usb/uscom.c
+++ b/sys/dev/usb/uscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uscom.c,v 1.3 2014/11/18 23:55:01 krw Exp $ */
+/* $OpenBSD: uscom.c,v 1.4 2016/01/07 12:53:37 mpi Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -31,7 +31,7 @@
#include <dev/usb/ucomvar.h>
#define USCOMBUFSZ 256
-#define USCOM_CONFIG_NO 0
+#define USCOM_CONFIG_INDEX 0
#define USCOM_IFACE_NO 0
struct uscom_softc {
@@ -94,7 +94,7 @@ uscom_attach(struct device *parent, struct device *self, void *aux)
bzero(&uca, sizeof(uca));
sc->sc_udev = uaa->device;
- if (usbd_set_config_index(sc->sc_udev, USCOM_CONFIG_NO, 1) != 0) {
+ if (usbd_set_config_index(sc->sc_udev, USCOM_CONFIG_INDEX, 1) != 0) {
printf("%s: could not set configuration no\n",
sc->sc_dev.dv_xname);
usbd_deactivate(sc->sc_udev);
diff --git a/sys/dev/usb/uslcom.c b/sys/dev/usb/uslcom.c
index 0a821b2f79e..b3fca7c6afa 100644
--- a/sys/dev/usb/uslcom.c
+++ b/sys/dev/usb/uslcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uslcom.c,v 1.36 2015/06/18 10:47:44 jsg Exp $ */
+/* $OpenBSD: uslcom.c,v 1.37 2016/01/07 12:53:37 mpi Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -38,7 +38,7 @@ int uslcomdebug = 0;
#define DPRINTF(x) DPRINTFN(0, x)
#define USLCOMBUFSZ 256
-#define USLCOM_CONFIG_NO 0
+#define USLCOM_CONFIG_INDEX 0
#define USLCOM_IFACE_NO 0
#define USLCOM_SET_DATA_BITS(x) (x << 8)
@@ -297,7 +297,7 @@ uslcom_attach(struct device *parent, struct device *self, void *aux)
bzero(&uca, sizeof(uca));
sc->sc_udev = uaa->device;
- if (usbd_set_config_index(sc->sc_udev, USLCOM_CONFIG_NO, 1) != 0) {
+ if (usbd_set_config_index(sc->sc_udev, USLCOM_CONFIG_INDEX, 1) != 0) {
printf("%s: could not set configuration no\n",
sc->sc_dev.dv_xname);
usbd_deactivate(sc->sc_udev);