shearwater: remove unused 'shearwater_common_command()' function

Dirk added this helper in commit 9379004b2df5 ("Shearwater: add helper
to send bytes to the dive computer"), and it was used for a short while
by commit 437cc3e0cc9f ("Shearwater: try to gracefully shut down the
Bluetooth connection").

But then the use was reverted in commit 8120b11258d8, and this helper
function is now stale and unused, and an unnecessary difference to Jef's
upstream code base.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2020-05-07 14:50:19 -07:00
parent b3b4eb91a2
commit 5c64573c83
2 changed files with 1 additions and 24 deletions

View File

@ -316,27 +316,6 @@ done:
return status;
}
dc_status_t
shearwater_common_command (shearwater_common_device_t *device, const unsigned char input[], unsigned int isize)
{
dc_status_t status = DC_STATUS_SUCCESS;
dc_device_t *abstract = (dc_device_t *) device;
if (isize > SZ_PACKET)
return DC_STATUS_INVALIDARGS;
if (device_is_cancelled (abstract))
return DC_STATUS_CANCELLED;
// Send the command packet.
status = shearwater_common_slip_write (device, input, isize);
if (status != DC_STATUS_SUCCESS)
ERROR (abstract->context, "Failed to send the command packet.");
return status;
}
dc_status_t
shearwater_common_transfer (shearwater_common_device_t *device, const unsigned char input[], unsigned int isize, unsigned char output[], unsigned int osize, unsigned int *actual)
@ -400,6 +379,7 @@ shearwater_common_transfer (shearwater_common_device_t *device, const unsigned c
return DC_STATUS_SUCCESS;
}
dc_status_t
shearwater_common_download (shearwater_common_device_t *device, dc_buffer_t *buffer, unsigned int address, unsigned int size, unsigned int compression, dc_event_progress_t *progress)
{

View File

@ -54,9 +54,6 @@ typedef struct shearwater_common_device_t {
dc_status_t
shearwater_common_setup (shearwater_common_device_t *device, dc_context_t *context, dc_iostream_t *iostream);
dc_status_t
shearwater_common_command (shearwater_common_device_t *device, const unsigned char input[], unsigned int isize);
dc_status_t
shearwater_common_transfer (shearwater_common_device_t *device, const unsigned char input[], unsigned int isize, unsigned char output[], unsigned int osize, unsigned int *actual);