diff options
author | Harald Welte <laforge@osmocom.org> | 2020-06-28 23:09:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-06-29 22:12:42 +0200 |
commit | 9bedf75f2b154a4c2dd27ce4ce3c9a2d96068558 (patch) | |
tree | 4de407fb1ce3a9d8d47671fdafc614a47777d768 | |
parent | 760097bfb0a49a492719c0ee6c1633097c6980ed (diff) |
introduce notion of 'driver'
Change-Id: Ic168e25f2622b397bac2c133ec35f4a0a38f859b
-rw-r--r-- | src/e1d.h | 7 | ||||
-rw-r--r-- | src/intf_line.c | 4 | ||||
-rw-r--r-- | src/usb.c | 1 |
3 files changed, 12 insertions, 0 deletions
@@ -65,12 +65,19 @@ struct e1_line { struct e1_ts ts[32]; }; +enum e1_driver { + E1_DRIVER_USB, +}; + +extern const struct value_string e1_driver_names[]; + struct e1_intf { struct llist_head list; struct e1_daemon *e1d; uint8_t id; + enum e1_driver drv; void *drv_data; struct llist_head lines; diff --git a/src/intf_line.c b/src/intf_line.c index c3466e0..f572190 100644 --- a/src/intf_line.c +++ b/src/intf_line.c @@ -34,6 +34,10 @@ #include "e1d.h" #include "log.h" +const struct value_string e1_driver_names[] = { + { E1_DRIVER_USB, "usb" }, + { 0, NULL } +}; // --------------------------------------------------------------------------- // e1d structures @@ -300,6 +300,7 @@ _e1_usb_open_device(struct e1_daemon *e1d, struct libusb_device *dev) intf_data->devh = devh; intf = e1_intf_new(e1d, intf_data); + intf->drv = E1_DRIVER_USB; ret = libusb_get_active_config_descriptor(dev, &cd); if (ret) { |