From 0034a3c5153f98452448894ba68a181b62b24afd Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Thu, 23 Apr 2015 22:13:08 +0200 Subject: [PATCH] usb_hid: 80 character limit cleanup. --- src/add-ons/kernel/drivers/input/usb_hid/HIDDevice.cpp | 10 ++++++---- src/add-ons/kernel/drivers/input/usb_hid/HIDReport.cpp | 4 ++-- .../drivers/input/usb_hid/KeyboardProtocolHandler.cpp | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/add-ons/kernel/drivers/input/usb_hid/HIDDevice.cpp b/src/add-ons/kernel/drivers/input/usb_hid/HIDDevice.cpp index 9ec2b618d8..c444ef60fe 100644 --- a/src/add-ons/kernel/drivers/input/usb_hid/HIDDevice.cpp +++ b/src/add-ons/kernel/drivers/input/usb_hid/HIDDevice.cpp @@ -277,8 +277,8 @@ HIDDevice::MaybeScheduleTransfer() status_t result = gUSBModule->queue_interrupt(fInterruptPipe, fTransferBuffer, fTransferBufferSize, _TransferCallback, this); if (result != B_OK) { - TRACE_ALWAYS("failed to schedule interrupt transfer 0x%08" B_PRIx32 "\n", - result); + TRACE_ALWAYS("failed to schedule interrupt transfer 0x%08" B_PRIx32 + "\n", result); return result; } @@ -335,10 +335,12 @@ HIDDevice::_TransferCallback(void *cookie, status_t status, void *data, if (status == B_DEV_STALLED && !device->fRemoved) { // try clearing stalls right away, the report listeners will resubmit gUSBModule->queue_request(device->fDevice, - USB_REQTYPE_STANDARD | USB_REQTYPE_ENDPOINT_OUT, USB_REQUEST_CLEAR_FEATURE, - USB_FEATURE_ENDPOINT_HALT, device->fEndpointAddress, 0, NULL, _UnstallCallback, device); + USB_REQTYPE_STANDARD | USB_REQTYPE_ENDPOINT_OUT, + USB_REQUEST_CLEAR_FEATURE, USB_FEATURE_ENDPOINT_HALT, + device->fEndpointAddress, 0, NULL, _UnstallCallback, device); return; } + atomic_set(&device->fTransferScheduled, 0); device->fParser.SetReport(status, device->fTransferBuffer, actualLength); } diff --git a/src/add-ons/kernel/drivers/input/usb_hid/HIDReport.cpp b/src/add-ons/kernel/drivers/input/usb_hid/HIDReport.cpp index fe735b7d88..6ba25b0bc6 100644 --- a/src/add-ons/kernel/drivers/input/usb_hid/HIDReport.cpp +++ b/src/add-ons/kernel/drivers/input/usb_hid/HIDReport.cpp @@ -157,8 +157,8 @@ HIDReport::SetReport(status_t status, uint8 *report, size_t length) fReportStatus = status; fCurrentReport = report; if (status == B_OK && length * 8 < fReportSize) { - TRACE_ALWAYS("report of %lu bits too small, expected %" B_PRIu32 " bits\n", - length * 8, fReportSize); + TRACE_ALWAYS("report of %lu bits too small, expected %" B_PRIu32 + " bits\n", length * 8, fReportSize); fReportStatus = B_ERROR; } diff --git a/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp b/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp index 177d4d7720..a30af96b3d 100644 --- a/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp +++ b/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp @@ -350,8 +350,8 @@ KeyboardProtocolHandler::Control(uint32 *cookie, uint32 op, void *buffer, if (RingBufferReadable() == 0 && fCurrentRepeatKey != 0 && system_time() - enterTime > fCurrentRepeatDelay) { // this case is for handling key repeats, it means no - // interrupt transfer has happened or it didn't produce any - // new key events, but a repeated key down is due + // interrupt transfer has happened or it didn't produce + // any new key events, but a repeated key down is due _WriteKey(fCurrentRepeatKey, true); // the next timeout is reduced to the repeat_rate