aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/usbtmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/class/usbtmc.c')
-rw-r--r--drivers/usb/class/usbtmc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 6395f22a58e1..333ee02e7b2b 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -57,7 +57,9 @@ MODULE_DEVICE_TABLE(usb, usbtmc_devices);
57 57
58/* 58/*
59 * This structure is the capabilities for the device 59 * This structure is the capabilities for the device
60 * See section 4.2.1.8 of the USBTMC specification for details. 60 * See section 4.2.1.8 of the USBTMC specification,
61 * and section 4.2.2 of the USBTMC usb488 subclass
62 * specification for details.
61 */ 63 */
62struct usbtmc_dev_capabilities { 64struct usbtmc_dev_capabilities {
63 __u8 interface_capabilities; 65 __u8 interface_capabilities;
@@ -796,20 +798,21 @@ static int get_capabilities(struct usbtmc_device_data *data)
796 } 798 }
797 799
798 dev_dbg(dev, "GET_CAPABILITIES returned %x\n", buffer[0]); 800 dev_dbg(dev, "GET_CAPABILITIES returned %x\n", buffer[0]);
799 dev_dbg(dev, "Interface capabilities are %x\n", buffer[4]);
800 dev_dbg(dev, "Device capabilities are %x\n", buffer[5]);
801 dev_dbg(dev, "USB488 interface capabilities are %x\n", buffer[14]);
802 dev_dbg(dev, "USB488 device capabilities are %x\n", buffer[15]);
803 if (buffer[0] != USBTMC_STATUS_SUCCESS) { 801 if (buffer[0] != USBTMC_STATUS_SUCCESS) {
804 dev_err(dev, "GET_CAPABILITIES returned %x\n", buffer[0]); 802 dev_err(dev, "GET_CAPABILITIES returned %x\n", buffer[0]);
805 rv = -EPERM; 803 rv = -EPERM;
806 goto err_out; 804 goto err_out;
807 } 805 }
806 dev_dbg(dev, "Interface capabilities are %x\n", buffer[4]);
807 dev_dbg(dev, "Device capabilities are %x\n", buffer[5]);
808 dev_dbg(dev, "USB488 interface capabilities are %x\n", buffer[14]);
809 dev_dbg(dev, "USB488 device capabilities are %x\n", buffer[15]);
808 810
809 data->capabilities.interface_capabilities = buffer[4]; 811 data->capabilities.interface_capabilities = buffer[4];
810 data->capabilities.device_capabilities = buffer[5]; 812 data->capabilities.device_capabilities = buffer[5];
811 data->capabilities.usb488_interface_capabilities = buffer[14]; 813 data->capabilities.usb488_interface_capabilities = buffer[14];
812 data->capabilities.usb488_device_capabilities = buffer[15]; 814 data->capabilities.usb488_device_capabilities = buffer[15];
815 rv = 0;
813 816
814err_out: 817err_out:
815 kfree(buffer); 818 kfree(buffer);