struct sr_dev_inst *sdi;
struct drv_context *drvc;
struct dev_context *devc;
- struct sr_channel *ch;
struct sr_serial_dev_inst *serial;
GSList *devices;
sdi->driver = center_devs[idx].di;
for (i = 0; i < center_devs[idx].num_channels; i++) {
- ch = sr_channel_new(i, SR_CHANNEL_ANALOG,
+ sr_channel_new(sdi, i, SR_CHANNEL_ANALOG,
TRUE, channel_names[i]);
- sdi->channels = g_slist_append(sdi->channels, ch);
}
drvc->instances = g_slist_append(drvc->instances, sdi);
/* Driver-specific API function wrappers */
#define HW_INIT(X) \
-static int init_##X(struct sr_context *sr_ctx) { return init(sr_ctx, X); }
+static int init_##X(struct sr_dev_driver *d, \
+ struct sr_context *sr_ctx) { \
+ (void) d; return init(sr_ctx, X); }
#define HW_CLEANUP(X) \
-static int cleanup_##X(void) { return cleanup(X); }
+static int cleanup_##X(const struct sr_dev_driver *d) { \
+ (void) d; return cleanup(X); }
#define HW_SCAN(X) \
-static GSList *scan_##X(GSList *options) { return scan(options, X); }
+static GSList *scan_##X(struct sr_dev_driver *d, GSList *options) { \
+ (void) d; return scan(options, X); }
#define HW_DEV_LIST(X) \
-static GSList *dev_list_##X(void) { return dev_list(X); }
+static GSList *dev_list_##X(const struct sr_dev_driver *d) { \
+ (void) d; return dev_list(X); }
#define HW_DEV_CLEAR(X) \
-static int dev_clear_##X(void) { return dev_clear(X); }
+static int dev_clear_##X(const struct sr_dev_driver *d) { \
+ (void) d; return dev_clear(X); }
#define HW_DEV_ACQUISITION_START(X) \
static int dev_acquisition_start_##X(const struct sr_dev_inst *sdi, \
void *cb_data) { return dev_acquisition_start(sdi, cb_data, X); }