drivers: Simplify headers
Remove all the headers already included through "fp_internal.h" such as <libusb.h> and <errno.h>, include "assembling.h" and "driver_ids.h" there as well to avoid doing it in (almost) every driver.
This commit is contained in:
parent
501020921e
commit
994061af44
23 changed files with 18 additions and 200 deletions
|
@ -26,16 +26,7 @@
|
|||
#define FP_COMPONENT "aes1610"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include <assembling.h>
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "driver_ids.h"
|
||||
#include "aeslib.h"
|
||||
|
||||
static void start_capture(struct fp_img_dev *dev);
|
||||
static void complete_deactivation(struct fp_img_dev *dev);
|
||||
|
|
|
@ -20,21 +20,9 @@
|
|||
#define FP_COMPONENT "aes1660"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
|
||||
#include <assembling.h>
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aeslib.h"
|
||||
#include "aesx660.h"
|
||||
#include "aes1660.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
#define FRAME_WIDTH 128
|
||||
#define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2))
|
||||
|
|
|
@ -24,17 +24,8 @@
|
|||
#define FP_COMPONENT "aes2501"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include <assembling.h>
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aeslib.h"
|
||||
#include "aes2501.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
static void start_capture(struct fp_img_dev *dev);
|
||||
static void complete_deactivation(struct fp_img_dev *dev);
|
||||
|
|
|
@ -24,17 +24,8 @@
|
|||
#define FP_COMPONENT "aes2550"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include <assembling.h>
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aes2550.h"
|
||||
#include "driver_ids.h"
|
||||
#include "aeslib.h"
|
||||
|
||||
static void start_capture(struct fp_img_dev *dev);
|
||||
static void complete_deactivation(struct fp_img_dev *dev);
|
||||
|
|
|
@ -20,20 +20,9 @@
|
|||
#define FP_COMPONENT "aes2660"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include <assembling.h>
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aeslib.h"
|
||||
#include "aesx660.h"
|
||||
#include "aes2660.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
#define FRAME_WIDTH 192
|
||||
#define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2))
|
||||
|
|
|
@ -30,16 +30,8 @@
|
|||
#define FP_COMPONENT "aes3500"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aeslib.h"
|
||||
#include "aes3k.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
#define DATA_BUFLEN 0x2089
|
||||
|
||||
|
|
|
@ -37,14 +37,7 @@
|
|||
#define FP_COMPONENT "aes3k"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aeslib.h"
|
||||
#include "aes3k.h"
|
||||
|
||||
#define CTRL_TIMEOUT 1000
|
||||
|
|
|
@ -27,16 +27,8 @@
|
|||
#define FP_COMPONENT "aes4000"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aeslib.h"
|
||||
#include "aes3k.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
#define DATA_BUFLEN 0x1259
|
||||
|
||||
|
|
|
@ -24,17 +24,7 @@
|
|||
#define FP_COMPONENT "aesX660"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include <assembling.h>
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aeslib.h"
|
||||
#include "aesx660.h"
|
||||
|
||||
static void start_capture(struct fp_img_dev *dev);
|
||||
|
|
|
@ -21,14 +21,7 @@
|
|||
#define FP_COMPONENT "elan"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <libusb.h>
|
||||
#include <assembling.h>
|
||||
#include <fprint.h>
|
||||
|
||||
#include "elan.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
unsigned char elan_get_pixel(struct fpi_frame_asmbl_ctx *ctx,
|
||||
struct fpi_frame *frame, unsigned int x,
|
||||
|
|
|
@ -36,15 +36,6 @@
|
|||
#define FP_COMPONENT "etes603"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <libusb.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "driver_ids.h"
|
||||
|
||||
/* libusb defines */
|
||||
|
|
|
@ -21,14 +21,6 @@
|
|||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include "driver_ids.h"
|
||||
|
||||
#ifndef HAVE_MEMMEM
|
||||
gpointer
|
||||
memmem(const gpointer haystack, size_t haystack_len, const gpointer needle, size_t needle_len) {
|
||||
|
|
|
@ -26,17 +26,7 @@
|
|||
#define FP_COMPONENT "upeksonly"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include <assembling.h>
|
||||
|
||||
#include "upeksonly.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
#define CTRL_TIMEOUT 1000
|
||||
#define NUM_BULK_TRANSFERS 24
|
||||
|
|
|
@ -21,13 +21,7 @@
|
|||
#define FP_COMPONENT "upektc"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include "upektc.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
#define UPEKTC_EP_IN (2 | LIBUSB_ENDPOINT_IN)
|
||||
#define UPEKTC_EP_OUT (3 | LIBUSB_ENDPOINT_OUT)
|
||||
|
|
|
@ -20,16 +20,8 @@
|
|||
#define FP_COMPONENT "upektc_img"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include <aeslib.h>
|
||||
|
||||
#include "aeslib.h"
|
||||
#include "upektc_img.h"
|
||||
#include "driver_ids.h"
|
||||
|
||||
static void start_capture(struct fp_img_dev *dev);
|
||||
static void start_deactivation(struct fp_img_dev *dev);
|
||||
|
|
|
@ -29,14 +29,6 @@
|
|||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include "driver_ids.h"
|
||||
|
||||
#define EP_IN (1 | LIBUSB_ENDPOINT_IN)
|
||||
#define EP_OUT (2 | LIBUSB_ENDPOINT_OUT)
|
||||
#define TIMEOUT 5000
|
||||
|
|
|
@ -20,17 +20,10 @@
|
|||
|
||||
#define FP_COMPONENT "uru4000"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nss.h>
|
||||
#include <pk11pub.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include "driver_ids.h"
|
||||
#include "fp_internal.h"
|
||||
|
||||
#define EP_INTR (1 | LIBUSB_ENDPOINT_IN)
|
||||
#define EP_DATA (2 | LIBUSB_ENDPOINT_IN)
|
||||
|
|
|
@ -28,14 +28,6 @@
|
|||
* powerdown? does windows do anything special on exit?
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include "driver_ids.h"
|
||||
|
||||
#define CTRL_IN 0xc0
|
||||
#define CTRL_OUT 0x40
|
||||
#define CTRL_TIMEOUT 1000
|
||||
|
|
|
@ -20,12 +20,6 @@
|
|||
#define FP_COMPONENT "vfs0050"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <assembling.h>
|
||||
#include "driver_ids.h"
|
||||
|
||||
#include "vfs0050.h"
|
||||
|
||||
/* USB functions */
|
||||
|
|
|
@ -21,12 +21,6 @@
|
|||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "driver_ids.h"
|
||||
|
||||
/* Input-Output usb endpoint */
|
||||
#define EP_IN(n) (n | LIBUSB_ENDPOINT_IN)
|
||||
#define EP_OUT(n) (n | LIBUSB_ENDPOINT_OUT)
|
||||
|
|
|
@ -22,19 +22,7 @@
|
|||
#define FP_COMPONENT "vfs301"
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
#include "vfs301_proto.h"
|
||||
#include <unistd.h>
|
||||
|
||||
#include "driver_ids.h"
|
||||
|
||||
/************************** GENERIC STUFF *************************************/
|
||||
|
||||
|
@ -152,7 +140,7 @@ static void m_loop_state(struct fpi_ssm *ssm)
|
|||
case M_READ_PRINT_POLL:
|
||||
{
|
||||
int rv = vfs301_proto_process_event_poll(dev->udev, vdev);
|
||||
assert(rv != VFS301_FAILURE);
|
||||
g_assert(rv != VFS301_FAILURE);
|
||||
if (rv == VFS301_ONGOING)
|
||||
fpi_ssm_jump_to_state(ssm, M_READ_PRINT_WAIT);
|
||||
else
|
||||
|
@ -185,7 +173,7 @@ static void m_init_state(struct fpi_ssm *ssm)
|
|||
struct fp_img_dev *dev = ssm->priv;
|
||||
vfs301_dev_t *vdev = dev->priv;
|
||||
|
||||
assert(ssm->cur_state == 0);
|
||||
g_assert(ssm->cur_state == 0);
|
||||
|
||||
vfs301_proto_init(dev->udev, vdev);
|
||||
|
||||
|
|
|
@ -18,14 +18,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <libusb.h>
|
||||
#include <fp_internal.h>
|
||||
#include <assembling.h>
|
||||
#include "driver_ids.h"
|
||||
|
||||
#include "fp_internal.h"
|
||||
#include "vfs5011_proto.h"
|
||||
|
||||
/* =================== sync/async USB transfer sequence ==================== */
|
||||
|
|
|
@ -28,10 +28,13 @@
|
|||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <glib.h>
|
||||
#include <libusb.h>
|
||||
|
||||
#include <fprint.h>
|
||||
#include "fprint.h"
|
||||
#include "assembling.h"
|
||||
#include "drivers/driver_ids.h"
|
||||
|
||||
#define array_n_elements(array) (sizeof(array) / sizeof(array[0]))
|
||||
|
||||
|
|
Loading…
Reference in a new issue