Commit 2cfef79d authored by Fabian Frederick's avatar Fabian Frederick Committed by Greg Kroah-Hartman

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

Use kernel.h macro definition.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Acked-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 65c35dd5
......@@ -1263,12 +1263,9 @@ static int acm_probe(struct usb_interface *intf,
!= CDC_DATA_INTERFACE_TYPE) {
if (control_interface->cur_altsetting->desc.bInterfaceClass
== CDC_DATA_INTERFACE_TYPE) {
struct usb_interface *t;
dev_dbg(&intf->dev,
"Your device has switched interfaces.\n");
t = control_interface;
control_interface = data_interface;
data_interface = t;
swap(control_interface, data_interface);
} else {
return -EINVAL;
}
......@@ -1297,12 +1294,9 @@ static int acm_probe(struct usb_interface *intf,
/* workaround for switched endpoints */
if (!usb_endpoint_dir_in(epread)) {
/* descriptors are swapped */
struct usb_endpoint_descriptor *t;
dev_dbg(&intf->dev,
"The data interface has switched endpoints\n");
t = epread;
epread = epwrite;
epwrite = t;
swap(epread, epwrite);
}
made_compressed_probe:
dev_dbg(&intf->dev, "interfaces are valid\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment