summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2013-01-30 16:05:54 +0000
committerhselasky <hselasky@FreeBSD.org>2013-01-30 16:05:54 +0000
commitb7433e15c3ef10d95759121d1e726ea9864da8a3 (patch)
treef33c6466c2ca5f46906b6d9c0cfb88e7195235d6 /sys/dev/usb
parent07f6ed056f5894a455fd52e2158b58144ecdca68 (diff)
downloadFreeBSD-src-b7433e15c3ef10d95759121d1e726ea9864da8a3.zip
FreeBSD-src-b7433e15c3ef10d95759121d1e726ea9864da8a3.tar.gz
Use string literals in string descriptors for marginally
better readability. Submitted by: Christoph Mallon
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/controller/at91dci.c6
-rw-r--r--sys/dev/usb/controller/atmegadci.c6
-rw-r--r--sys/dev/usb/controller/avr32dci.c6
-rw-r--r--sys/dev/usb/controller/dwc_otg.c6
-rw-r--r--sys/dev/usb/controller/musb_otg.c7
-rw-r--r--sys/dev/usb/controller/uss820dci.c6
-rw-r--r--sys/dev/usb/template/usb_template_audio.c13
-rw-r--r--sys/dev/usb/template/usb_template_cdce.c44
-rw-r--r--sys/dev/usb/template/usb_template_kbd.c7
-rw-r--r--sys/dev/usb/template/usb_template_modem.c7
-rw-r--r--sys/dev/usb/template/usb_template_mouse.c7
-rw-r--r--sys/dev/usb/template/usb_template_msc.c29
-rw-r--r--sys/dev/usb/template/usb_template_mtp.c24
13 files changed, 42 insertions, 126 deletions
diff --git a/sys/dev/usb/controller/at91dci.c b/sys/dev/usb/controller/at91dci.c
index 3b0c773..6ebd37c 100644
--- a/sys/dev/usb/controller/at91dci.c
+++ b/sys/dev/usb/controller/at91dci.c
@@ -1741,12 +1741,10 @@ static const struct usb_hub_descriptor_min at91dci_hubd = {
};
#define STRING_VENDOR \
- 'A', 0, 'T', 0, 'M', 0, 'E', 0, 'L', 0
+ "A\0T\0M\0E\0L"
#define STRING_PRODUCT \
- 'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
- 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
- 'U', 0, 'B', 0,
+ "D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, at91dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, at91dci_product);
diff --git a/sys/dev/usb/controller/atmegadci.c b/sys/dev/usb/controller/atmegadci.c
index 426073e..0dc726c 100644
--- a/sys/dev/usb/controller/atmegadci.c
+++ b/sys/dev/usb/controller/atmegadci.c
@@ -1566,12 +1566,10 @@ static const struct usb_hub_descriptor_min atmegadci_hubd = {
};
#define STRING_VENDOR \
- 'A', 0, 'T', 0, 'M', 0, 'E', 0, 'G', 0, 'A', 0
+ "A\0T\0M\0E\0G\0A"
#define STRING_PRODUCT \
- 'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
- 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
- 'U', 0, 'B', 0,
+ "D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, atmegadci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, atmegadci_product);
diff --git a/sys/dev/usb/controller/avr32dci.c b/sys/dev/usb/controller/avr32dci.c
index e0244f5..1d2ce87 100644
--- a/sys/dev/usb/controller/avr32dci.c
+++ b/sys/dev/usb/controller/avr32dci.c
@@ -1506,12 +1506,10 @@ static const struct usb_hub_descriptor_min avr32dci_hubd = {
};
#define STRING_VENDOR \
- 'A', 0, 'V', 0, 'R', 0, '3', 0, '2', 0
+ "A\0V\0R\0003\0002"
#define STRING_PRODUCT \
- 'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
- 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
- 'U', 0, 'B', 0,
+ "D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, avr32dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, avr32dci_product);
diff --git a/sys/dev/usb/controller/dwc_otg.c b/sys/dev/usb/controller/dwc_otg.c
index 77dda2b..d08b3d9 100644
--- a/sys/dev/usb/controller/dwc_otg.c
+++ b/sys/dev/usb/controller/dwc_otg.c
@@ -3492,12 +3492,10 @@ static const struct usb_hub_descriptor_min dwc_otg_hubd = {
};
#define STRING_VENDOR \
- 'D', 0, 'W', 0, 'C', 0, 'O', 0, 'T', 0, 'G', 0
+ "D\0W\0C\0O\0T\0G"
#define STRING_PRODUCT \
- 'O', 0, 'T', 0, 'G', 0, ' ', 0, 'R', 0, \
- 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
- 'U', 0, 'B', 0,
+ "O\0T\0G\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, dwc_otg_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, dwc_otg_product);
diff --git a/sys/dev/usb/controller/musb_otg.c b/sys/dev/usb/controller/musb_otg.c
index 0bf2802..10dc90b 100644
--- a/sys/dev/usb/controller/musb_otg.c
+++ b/sys/dev/usb/controller/musb_otg.c
@@ -2212,13 +2212,10 @@ static const struct usb_hub_descriptor_min musbotg_hubd = {
};
#define STRING_VENDOR \
- 'M', 0, 'e', 0, 'n', 0, 't', 0, 'o', 0, 'r', 0, ' ', 0, \
- 'G', 0, 'r', 0, 'a', 0, 'p', 0, 'h', 0, 'i', 0, 'c', 0, 's', 0
+ "M\0e\0n\0t\0o\0r\0 \0G\0r\0a\0p\0h\0i\0c\0s"
#define STRING_PRODUCT \
- 'O', 0, 'T', 0, 'G', 0, ' ', 0, 'R', 0, \
- 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
- 'U', 0, 'B', 0,
+ "O\0T\0G\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, musbotg_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, musbotg_product);
diff --git a/sys/dev/usb/controller/uss820dci.c b/sys/dev/usb/controller/uss820dci.c
index ffb6cc8..6750f32 100644
--- a/sys/dev/usb/controller/uss820dci.c
+++ b/sys/dev/usb/controller/uss820dci.c
@@ -1809,12 +1809,10 @@ static const struct usb_hub_descriptor_min uss820dci_hubd = {
};
#define STRING_VENDOR \
- 'A', 0, 'G', 0, 'E', 0, 'R', 0, 'E', 0
+ "A\0G\0E\0R\0E"
#define STRING_PRODUCT \
- 'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
- 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
- 'U', 0, 'B', 0,
+ "D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, uss820dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, uss820dci_product);
diff --git a/sys/dev/usb/template/usb_template_audio.c b/sys/dev/usb/template/usb_template_audio.c
index f40c601..7c7cebe 100644
--- a/sys/dev/usb/template/usb_template_audio.c
+++ b/sys/dev/usb/template/usb_template_audio.c
@@ -68,21 +68,16 @@ enum {
};
#define STRING_AUDIO_PRODUCT \
- 'A', 0, 'u', 0, 'd', 0, 'i', 0, 'o', 0, ' ', 0, \
- 'T', 0, 'e', 0, 's', 0, 't', 0, ' ', 0, \
- 'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0,
+ "A\0u\0d\0i\0o\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e"
#define STRING_AUDIO_MIXER \
- 'M', 0, 'i', 0, 'x', 0, 'e', 0, 'r', 0, ' ', 0, \
- 'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
+ "M\0i\0x\0e\0r\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_AUDIO_RECORD \
- 'R', 0, 'e', 0, 'c', 0, 'o', 0, 'r', 0, 'd', 0, ' ', 0, \
- 'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
+ "R\0e\0c\0o\0r\0d\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_AUDIO_PLAYBACK \
- 'P', 0, 'l', 0, 'a', 0, 'y', 0, 'b', 0, 'a', 0, 'c', 0, 'k', 0, ' ', 0, \
- 'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
+ "P\0l\0a\0y\0b\0a\0c\0k\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
/* make the real string descriptors */
diff --git a/sys/dev/usb/template/usb_template_cdce.c b/sys/dev/usb/template/usb_template_cdce.c
index 3bc5e3e..68f69d0 100644
--- a/sys/dev/usb/template/usb_template_cdce.c
+++ b/sys/dev/usb/template/usb_template_cdce.c
@@ -72,53 +72,27 @@ enum {
};
#define STRING_MAC \
- '2', 0, 'A', 0, '2', 0, '3', 0, \
- '4', 0, '5', 0, '6', 0, '7', 0, \
- '8', 0, '9', 0, 'A', 0, 'B', 0,
+ "2\0A\0002\0003\0004\0005\0006\0007\08\09\0A\0B"
#define STRING_ETH_CONTROL \
- 'U', 0, 'S', 0, 'B', 0, ' ', 0, \
- 'E', 0, 't', 0, 'h', 0, 'e', 0, \
- 'r', 0, 'n', 0, 'e', 0, 't', 0, \
- ' ', 0, 'C', 0, 'o', 0, 'm', 0, \
- 'm', 0, ' ', 0, 'i', 0, 'n', 0, \
- 't', 0, 'e', 0, 'r', 0, 'f', 0, \
- 'a', 0, 'c', 0, 'e', 0,
+ "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 " \
+ "\0C\0o\0m\0m\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_ETH_DATA \
- 'U', 0, 'S', 0, 'B', 0, ' ', 0, \
- 'E', 0, 't', 0, 'h', 0, 'e', 0, \
- 'r', 0, 'n', 0, 'e', 0, 't', 0, \
- ' ', 0, 'D', 0, 'a', 0, 't', 0, \
- 'a', 0, ' ', 0, 'i', 0, 'n', 0, \
- 't', 0, 'e', 0, 'r', 0, 'f', 0, \
- 'a', 0, 'c', 0, 'e', 0,
+ "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 \0D\0a\0t\0a\0 " \
+ "\0I\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_ETH_CONFIG \
- 'D', 0, 'e', 0, 'f', 0, 'a', 0, \
- 'u', 0, 'l', 0, 't', 0, ' ', 0, \
- 'c', 0, 'o', 0, 'n', 0, 'f', 0, \
- 'i', 0, 'g', 0,
+ "D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g"
#define STRING_ETH_VENDOR \
- 'F', 0, 'r', 0, 'e', 0, 'e', 0, \
- 'B', 0, 'S', 0, 'D', 0, ' ', 0, \
- 'f', 0, 'o', 0, 'u', 0, 'n', 0, \
- 'd', 0, 'a', 0, 't', 0, 'i', 0, \
- 'o', 0, 'n', 0,
+ "F\0r\0e\0e\0B\0S\0D\0 \0f\0o\0u\0n\0d\0a\0t\0i\0o\0n"
#define STRING_ETH_PRODUCT \
- 'U', 0, 'S', 0, 'B', 0, ' ', 0, \
- 'E', 0, 't', 0, 'h', 0, 'e', 0, \
- 'r', 0, 'n', 0, 'e', 0, 't', 0, \
- ' ', 0, 'A', 0, 'd', 0, 'a', 0, \
- 'p', 0, 't', 0, 'e', 0, 'r', 0,
+ "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 \0A\0d\0a\0p\0t\0e\0r"
#define STRING_ETH_SERIAL \
- 'D', 0, 'e', 0, 'c', 0, 'e', 0, \
- 'm', 0, 'b', 0, 'e', 0, 'r', 0, \
- ' ', 0, '2', 0, '0', 0, '0', 0, \
- '7', 0,
+ "D\0e\0c\0e\0m\0b\0e\0r\0 \0002\0000\0000\0007"
/* make the real string descriptors */
diff --git a/sys/dev/usb/template/usb_template_kbd.c b/sys/dev/usb/template/usb_template_kbd.c
index 0538f46..306b2fe 100644
--- a/sys/dev/usb/template/usb_template_kbd.c
+++ b/sys/dev/usb/template/usb_template_kbd.c
@@ -66,13 +66,10 @@ enum {
};
#define STRING_PRODUCT \
- 'K', 0, 'e', 0, 'y', 0, 'b', 0, 'o', 0, 'a', 0, 'r', 0, 'd', 0, ' ', 0, \
- 'T', 0, 'e', 0, 's', 0, 't', 0, ' ', 0, \
- 'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0,
+ "K\0e\0y\0b\0o\0a\0r\0d\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e"
#define STRING_KEYBOARD \
- 'K', 0, 'e', 0, 'y', 0, 'b', 0, 'o', 0, 'a', 0, 'r', 0, 'd', 0, ' ', 0, \
- 'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
+ "K\0e\0y\0b\0o\0a\0r\0d\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
/* make the real string descriptors */
diff --git a/sys/dev/usb/template/usb_template_modem.c b/sys/dev/usb/template/usb_template_modem.c
index 784c795..6a976f7 100644
--- a/sys/dev/usb/template/usb_template_modem.c
+++ b/sys/dev/usb/template/usb_template_modem.c
@@ -66,13 +66,10 @@ enum {
};
#define STRING_PRODUCT \
- 'M', 0, 'o', 0, 'd', 0, 'e', 0, 'm', 0, ' ', 0, \
- 'T', 0, 'e', 0, 's', 0, 't', 0, ' ', 0, \
- 'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0,
+ "M\0o\0d\0e\0m\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e"
#define STRING_MODEM \
- 'M', 0, 'o', 0, 'd', 0, 'e', 0, 'm', 0, ' ', 0, \
- 'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
+ "M\0o\0d\0e\0m\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
/* make the real string descriptors */
diff --git a/sys/dev/usb/template/usb_template_mouse.c b/sys/dev/usb/template/usb_template_mouse.c
index 570a70c..a48ccf4 100644
--- a/sys/dev/usb/template/usb_template_mouse.c
+++ b/sys/dev/usb/template/usb_template_mouse.c
@@ -66,13 +66,10 @@ enum {
};
#define STRING_PRODUCT \
- 'M', 0, 'o', 0, 'u', 0, 's', 0, 'e', 0, ' ', 0, \
- 'T', 0, 'e', 0, 's', 0, 't', 0, ' ', 0, \
- 'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0,
+ "M\0o\0u\0s\0e\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e"
#define STRING_MOUSE \
- 'M', 0, 'o', 0, 'u', 0, 's', 0, 'e', 0, ' ', 0, \
- 'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
+ "M\0o\0u\0s\0e\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
/* make the real string descriptors */
diff --git a/sys/dev/usb/template/usb_template_msc.c b/sys/dev/usb/template/usb_template_msc.c
index 3d13fee..6809e63 100644
--- a/sys/dev/usb/template/usb_template_msc.c
+++ b/sys/dev/usb/template/usb_template_msc.c
@@ -69,37 +69,20 @@ enum {
};
#define STRING_MSC_DATA \
- 'U', 0, 'S', 0, 'B', 0, ' ', 0, \
- 'M', 0, 'a', 0, 's', 0, 's', 0, \
- ' ', 0, 'S', 0, 't', 0, 'o', 0, \
- 'r', 0, 'a', 0, 'g', 0, 'e', 0, \
- ' ', 0, 'I', 0, 'n', 0, 't', 0, \
- 'e', 0, 'r', 0, 'f', 0, 'a', 0, \
- 'c', 0, 'e', 0,
+ "U\0S\0B\0 \0M\0a\0s\0s\0 \0S\0t\0o\0r\0a\0g\0e\0 " \
+ "\0I\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_MSC_CONFIG \
- 'D', 0, 'e', 0, 'f', 0, 'a', 0, \
- 'u', 0, 'l', 0, 't', 0, ' ', 0, \
- 'c', 0, 'o', 0, 'n', 0, 'f', 0, \
- 'i', 0, 'g', 0,
+ "D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g"
#define STRING_MSC_VENDOR \
- 'F', 0, 'r', 0, 'e', 0, 'e', 0, \
- 'B', 0, 'S', 0, 'D', 0, ' ', 0, \
- 'f', 0, 'o', 0, 'u', 0, 'n', 0, \
- 'd', 0, 'a', 0, 't', 0, 'i', 0, \
- 'o', 0, 'n', 0,
+ "F\0r\0e\0e\0B\0S\0D\0 \0f\0o\0u\0n\0d\0a\0t\0i\0o\0n"
#define STRING_MSC_PRODUCT \
- 'U', 0, 'S', 0, 'B', 0, ' ', 0, \
- 'M', 0, 'e', 0, 'm', 0, 'o', 0, \
- 'r', 0, 'y', 0, ' ', 0, 'S', 0, \
- 't', 0, 'i', 0, 'c', 0, 'k', 0
+ "U\0S\0B\0 \0M\0e\0m\0o\0r\0y\0 \0S\0t\0i\0c\0k"
#define STRING_MSC_SERIAL \
- 'M', 0, 'a', 0, 'r', 0, 'c', 0, \
- 'h', 0, ' ', 0, '2', 0, '0', 0, \
- '0', 0, '8', 0,
+ "M\0a\0r\0c\0h\0 \0002\0000\0000\08"
/* make the real string descriptors */
diff --git a/sys/dev/usb/template/usb_template_mtp.c b/sys/dev/usb/template/usb_template_mtp.c
index e4c3c7e..f0528a5 100644
--- a/sys/dev/usb/template/usb_template_mtp.c
+++ b/sys/dev/usb/template/usb_template_mtp.c
@@ -78,33 +78,19 @@ enum {
};
#define STRING_MTP_DATA \
- 'U', 0, 'S', 0, 'B', 0, ' ', 0, \
- 'M', 0, 'T', 0, 'P', 0, \
- ' ', 0, 'I', 0, 'n', 0, 't', 0, \
- 'e', 0, 'r', 0, 'f', 0, 'a', 0, \
- 'c', 0, 'e', 0,
+ "U\0S\0B\0 \0M\0T\0P\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_MTP_CONFIG \
- 'D', 0, 'e', 0, 'f', 0, 'a', 0, \
- 'u', 0, 'l', 0, 't', 0, ' ', 0, \
- 'c', 0, 'o', 0, 'n', 0, 'f', 0, \
- 'i', 0, 'g', 0,
+ "D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g"
#define STRING_MTP_VENDOR \
- 'F', 0, 'r', 0, 'e', 0, 'e', 0, \
- 'B', 0, 'S', 0, 'D', 0, ' ', 0, \
- 'f', 0, 'o', 0, 'u', 0, 'n', 0, \
- 'd', 0, 'a', 0, 't', 0, 'i', 0, \
- 'o', 0, 'n', 0,
+ "F\0r\0e\0e\0B\0S\0D\0 \0f\0o\0u\0n\0d\0a\0t\0i\0o\0n"
#define STRING_MTP_PRODUCT \
- 'U', 0, 'S', 0, 'B', 0, ' ', 0, \
- 'M', 0, 'T', 0, 'P', 0,
+ "U\0S\0B\0 \0M\0T\0P"
#define STRING_MTP_SERIAL \
- 'J', 0, 'u', 0, 'n', 0, 'e', 0, \
- ' ', 0, '2', 0, '0', 0, '0', 0, \
- '8', 0,
+ "J\0u\0n\0e\0 \0002\0000\0000\08"
/* make the real string descriptors */
OpenPOWER on IntegriCloud