2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-24 14:45:12 +08:00

cdc-acm: use swap() in acm_probe()

Use kernel.h macro definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Fabian Frederick 2015-05-18 19:59:37 +02:00 committed by Greg Kroah-Hartman
parent 65c35dd590
commit 2cfef79ddc

View File

@ -1263,12 +1263,9 @@ skip_normal_probe:
!= CDC_DATA_INTERFACE_TYPE) { != CDC_DATA_INTERFACE_TYPE) {
if (control_interface->cur_altsetting->desc.bInterfaceClass if (control_interface->cur_altsetting->desc.bInterfaceClass
== CDC_DATA_INTERFACE_TYPE) { == CDC_DATA_INTERFACE_TYPE) {
struct usb_interface *t;
dev_dbg(&intf->dev, dev_dbg(&intf->dev,
"Your device has switched interfaces.\n"); "Your device has switched interfaces.\n");
t = control_interface; swap(control_interface, data_interface);
control_interface = data_interface;
data_interface = t;
} else { } else {
return -EINVAL; return -EINVAL;
} }
@ -1297,12 +1294,9 @@ skip_normal_probe:
/* workaround for switched endpoints */ /* workaround for switched endpoints */
if (!usb_endpoint_dir_in(epread)) { if (!usb_endpoint_dir_in(epread)) {
/* descriptors are swapped */ /* descriptors are swapped */
struct usb_endpoint_descriptor *t;
dev_dbg(&intf->dev, dev_dbg(&intf->dev,
"The data interface has switched endpoints\n"); "The data interface has switched endpoints\n");
t = epread; swap(epread, epwrite);
epread = epwrite;
epwrite = t;
} }
made_compressed_probe: made_compressed_probe:
dev_dbg(&intf->dev, "interfaces are valid\n"); dev_dbg(&intf->dev, "interfaces are valid\n");