diff options
Diffstat (limited to 'drivers/usb/misc/ftdi-elan.c')
-rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 79a7668ef264..9d0675ed0d4c 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
@@ -1568,7 +1568,7 @@ static int ftdi_elan_edset_input(struct usb_ftdi *ftdi, u8 ed_number, | |||
1568 | struct u132_target *target = &ftdi->target[ed]; | 1568 | struct u132_target *target = &ftdi->target[ed]; |
1569 | struct u132_command *command = &ftdi->command[ | 1569 | struct u132_command *command = &ftdi->command[ |
1570 | COMMAND_MASK & ftdi->command_next]; | 1570 | COMMAND_MASK & ftdi->command_next]; |
1571 | int remaining_length = urb->transfer_buffer_length - | 1571 | u32 remaining_length = urb->transfer_buffer_length - |
1572 | urb->actual_length; | 1572 | urb->actual_length; |
1573 | command->header = 0x82 | (ed << 5); | 1573 | command->header = 0x82 | (ed << 5); |
1574 | if (remaining_length == 0) { | 1574 | if (remaining_length == 0) { |
@@ -1702,7 +1702,7 @@ static int ftdi_elan_edset_output(struct usb_ftdi *ftdi, u8 ed_number, | |||
1702 | | (address << 0); | 1702 | | (address << 0); |
1703 | command->width = usb_maxpacket(urb->dev, urb->pipe, | 1703 | command->width = usb_maxpacket(urb->dev, urb->pipe, |
1704 | usb_pipeout(urb->pipe)); | 1704 | usb_pipeout(urb->pipe)); |
1705 | command->follows = min(1024, | 1705 | command->follows = min_t(u32, 1024, |
1706 | urb->transfer_buffer_length - | 1706 | urb->transfer_buffer_length - |
1707 | urb->actual_length); | 1707 | urb->actual_length); |
1708 | command->value = 0; | 1708 | command->value = 0; |
@@ -1766,7 +1766,7 @@ static int ftdi_elan_edset_single(struct usb_ftdi *ftdi, u8 ed_number, | |||
1766 | mutex_lock(&ftdi->u132_lock); | 1766 | mutex_lock(&ftdi->u132_lock); |
1767 | command_size = ftdi->command_next - ftdi->command_head; | 1767 | command_size = ftdi->command_next - ftdi->command_head; |
1768 | if (command_size < COMMAND_SIZE) { | 1768 | if (command_size < COMMAND_SIZE) { |
1769 | int remaining_length = urb->transfer_buffer_length - | 1769 | u32 remaining_length = urb->transfer_buffer_length - |
1770 | urb->actual_length; | 1770 | urb->actual_length; |
1771 | struct u132_target *target = &ftdi->target[ed]; | 1771 | struct u132_target *target = &ftdi->target[ed]; |
1772 | struct u132_command *command = &ftdi->command[ | 1772 | struct u132_command *command = &ftdi->command[ |