summaryrefslogtreecommitdiff
path: root/ao-tools/ao-chaosread
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2019-01-03 11:41:49 -0800
committerKeith Packard <keithp@keithp.com>2019-01-03 12:09:58 -0800
commit6f729ff46b2f4531db68f0af85e7e9fe0f6d1969 (patch)
treed0a93a48bd3012decbb230f5aa17ecc6c793cad2 /ao-tools/ao-chaosread
parentf14c799ae7ff3be56c28f5694f04c03daff7708e (diff)
ao-tools: Fix warnings in ao-tools
None of these appear likely to have caused actual problems. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-chaosread')
-rw-r--r--ao-tools/ao-chaosread/ao-chaosread.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/ao-tools/ao-chaosread/ao-chaosread.c b/ao-tools/ao-chaosread/ao-chaosread.c
index 5c0de125..b0a6168a 100644
--- a/ao-tools/ao-chaosread/ao-chaosread.c
+++ b/ao-tools/ao-chaosread/ao-chaosread.c
@@ -36,7 +36,7 @@ struct chaoskey {
int kernel_active;
};
-libusb_device_handle *
+static libusb_device_handle *
chaoskey_match(libusb_device *dev, char *match_serial)
{
struct libusb_device_descriptor desc;
@@ -96,7 +96,7 @@ out:
return 0;
}
-struct chaoskey *
+static struct chaoskey *
chaoskey_open(char *serial)
{
struct chaoskey *ck;
@@ -161,22 +161,11 @@ out:
return NULL;
}
-void
-chaoskey_close(struct chaoskey *ck)
-{
- libusb_release_interface(ck->handle, 0);
- if (ck->kernel_active)
- libusb_attach_kernel_driver(ck->handle, 0);
- libusb_close(ck->handle);
- libusb_exit(ck->ctx);
- free(ck);
-}
-
#define COOKED_ENDPOINT 0x85
#define RAW_ENDPOINT 0x86
#define FLASH_ENDPOINT 0x87
-int
+static int
chaoskey_read(struct chaoskey *ck, int endpoint, void *buffer, int len)
{
uint8_t *buf = buffer;