drivers: Add access annotations to USB helpers
Mostly for completeness sake, doing this did not find any errors (but might catch some issues with fixed buffer lengths).
This commit is contained in:
parent
33d50e4e30
commit
7eb361087a
4 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,7 @@ static void complete_deactivation (FpImageDevice *dev);
|
||||||
#define CALIBRATE_DATA_LEN 4
|
#define CALIBRATE_DATA_LEN 4
|
||||||
#define FINGER_DET_DATA_LEN 4
|
#define FINGER_DET_DATA_LEN 4
|
||||||
|
|
||||||
|
FP_GNUC_ACCESS (read_only, 3, 4)
|
||||||
static void
|
static void
|
||||||
aesX660_send_cmd_timeout (FpiSsm *ssm,
|
aesX660_send_cmd_timeout (FpiSsm *ssm,
|
||||||
FpDevice *_dev,
|
FpDevice *_dev,
|
||||||
|
@ -70,6 +71,7 @@ aesX660_send_cmd_timeout (FpiSsm *ssm,
|
||||||
fpi_usb_transfer_submit (transfer, timeout, NULL, callback, NULL);
|
fpi_usb_transfer_submit (transfer, timeout, NULL, callback, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FP_GNUC_ACCESS (read_only, 3, 4)
|
||||||
static void
|
static void
|
||||||
aesX660_send_cmd (FpiSsm *ssm,
|
aesX660_send_cmd (FpiSsm *ssm,
|
||||||
FpDevice *dev,
|
FpDevice *dev,
|
||||||
|
|
|
@ -78,6 +78,7 @@ upektc_img_cmd_update_crc (unsigned char *cmd_buf, size_t size)
|
||||||
cmd_buf[size - 1] = (crc & 0xff00) >> 8;
|
cmd_buf[size - 1] = (crc & 0xff00) >> 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FP_GNUC_ACCESS (read_only, 3, 4)
|
||||||
static void
|
static void
|
||||||
upektc_img_submit_req (FpiSsm *ssm,
|
upektc_img_submit_req (FpiSsm *ssm,
|
||||||
FpImageDevice *dev,
|
FpImageDevice *dev,
|
||||||
|
|
|
@ -42,6 +42,7 @@ async_write_callback (FpiUsbTransfer *transfer, FpDevice *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send data to EP1, the only out endpoint */
|
/* Send data to EP1, the only out endpoint */
|
||||||
|
FP_GNUC_ACCESS (read_only, 3, 4)
|
||||||
static void
|
static void
|
||||||
async_write (FpiSsm *ssm,
|
async_write (FpiSsm *ssm,
|
||||||
FpDevice *dev,
|
FpDevice *dev,
|
||||||
|
|
|
@ -93,6 +93,7 @@ usb_recv (FpDeviceVfs301 *dev, guint8 endpoint, int max_bytes, FpiUsbTransfer **
|
||||||
*out = g_steal_pointer (&transfer);
|
*out = g_steal_pointer (&transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FP_GNUC_ACCESS (read_only, 2, 3)
|
||||||
static void
|
static void
|
||||||
usb_send (FpDeviceVfs301 *dev, const guint8 *data, gssize length, GError **error)
|
usb_send (FpDeviceVfs301 *dev, const guint8 *data, gssize length, GError **error)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue