summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-18 16:42:06 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-24 15:01:24 +0200
commit62fb45d317c5fa08e4db093441835bb6f33acbd7 (patch)
tree6978be5c33546f3257fee09e6d0def5e0aa00e3a /drivers/usb/dwc3
parentf8f02d5c671f79c4e80acbd0fca324566968cea8 (diff)
USB: ch9: add "USB_" prefix in front of TEST defines
For some reason, the TEST_ defines in the usb/ch9.h files did not have the USB_ prefix on it, making it a bit confusing when reading the file, as well as not the nicest thing to do in a uapi file. So fix that up and add the USB_ prefix on to them, and fix up all in-kernel usages. This included deleting the duplicate copy in the net2272.h file. Cc: Felipe Balbi <balbi@kernel.org> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Mathias Nyman <mathias.nyman@intel.com> Cc: Pawel Laszczak <pawell@cadence.com> Cc: YueHaibing <yuehaibing@huawei.com> Cc: Nathan Chancellor <natechancellor@gmail.com> Cc: Jason Yan <yanaijie@huawei.com> Cc: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: Stephen Boyd <swboyd@chromium.org> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Jules Irenge <jbi.octave@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Cc: Rob Gill <rrobgill@protonmail.com> Cc: Macpaul Lin <macpaul.lin@mediatek.com> Acked-by: Minas Harutyunyan <hminas@synopsys.com> Acked-by: Bin Liu <b-liu@ti.com> Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Acked-by: Peter Chen <peter.chen@nxp.com> Link: https://lore.kernel.org/r/20200618144206.2655890-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/debugfs.c20
-rw-r--r--drivers/usb/dwc3/ep0.c10
-rw-r--r--drivers/usb/dwc3/gadget.c10
3 files changed, 20 insertions, 20 deletions
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index 6d9de334e46a..14dc6a37305d 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -466,19 +466,19 @@ static int dwc3_testmode_show(struct seq_file *s, void *unused)
case 0:
seq_printf(s, "no test\n");
break;
- case TEST_J:
+ case USB_TEST_J:
seq_printf(s, "test_j\n");
break;
- case TEST_K:
+ case USB_TEST_K:
seq_printf(s, "test_k\n");
break;
- case TEST_SE0_NAK:
+ case USB_TEST_SE0_NAK:
seq_printf(s, "test_se0_nak\n");
break;
- case TEST_PACKET:
+ case USB_TEST_PACKET:
seq_printf(s, "test_packet\n");
break;
- case TEST_FORCE_EN:
+ case USB_TEST_FORCE_ENABLE:
seq_printf(s, "test_force_enable\n");
break;
default:
@@ -506,15 +506,15 @@ static ssize_t dwc3_testmode_write(struct file *file,
return -EFAULT;
if (!strncmp(buf, "test_j", 6))
- testmode = TEST_J;
+ testmode = USB_TEST_J;
else if (!strncmp(buf, "test_k", 6))
- testmode = TEST_K;
+ testmode = USB_TEST_K;
else if (!strncmp(buf, "test_se0_nak", 12))
- testmode = TEST_SE0_NAK;
+ testmode = USB_TEST_SE0_NAK;
else if (!strncmp(buf, "test_packet", 11))
- testmode = TEST_PACKET;
+ testmode = USB_TEST_PACKET;
else if (!strncmp(buf, "test_force_enable", 17))
- testmode = TEST_FORCE_EN;
+ testmode = USB_TEST_FORCE_ENABLE;
else
testmode = 0;
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 6dee4dabc0a4..8dd69728add3 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -425,11 +425,11 @@ static int dwc3_ep0_handle_test(struct dwc3 *dwc, enum usb_device_state state,
return -EINVAL;
switch (wIndex >> 8) {
- case TEST_J:
- case TEST_K:
- case TEST_SE0_NAK:
- case TEST_PACKET:
- case TEST_FORCE_EN:
+ case USB_TEST_J:
+ case USB_TEST_K:
+ case USB_TEST_SE0_NAK:
+ case USB_TEST_PACKET:
+ case USB_TEST_FORCE_ENABLE:
dwc->test_mode_nr = wIndex >> 8;
dwc->test_mode = true;
break;
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 80c3ef134e41..0b59b2f1cf26 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -46,11 +46,11 @@ int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode)
reg &= ~DWC3_DCTL_TSTCTRL_MASK;
switch (mode) {
- case TEST_J:
- case TEST_K:
- case TEST_SE0_NAK:
- case TEST_PACKET:
- case TEST_FORCE_EN:
+ case USB_TEST_J:
+ case USB_TEST_K:
+ case USB_TEST_SE0_NAK:
+ case USB_TEST_PACKET:
+ case USB_TEST_FORCE_ENABLE:
reg |= mode << 1;
break;
default: