From: Bert Vermeulen Date: Tue, 11 Sep 2012 19:27:26 +0000 (+0200) Subject: sr: make struct drv_context global X-Git-Tag: dsupstream~694 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e9022f596d9a6d35919445f3aa6394061b3e6681;p=libsigrok.git sr: make struct drv_context global --- diff --git a/hardware/agilent-dmm/agilent-dmm.h b/hardware/agilent-dmm/agilent-dmm.h index 179d0013..4c8ecac4 100644 --- a/hardware/agilent-dmm/agilent-dmm.h +++ b/hardware/agilent-dmm/agilent-dmm.h @@ -42,11 +42,6 @@ struct agdmm_profile { const struct agdmm_recv *recvs; }; -/* Private driver context. */ -struct drv_context { - GSList *instances; -}; - /* Private, per-device-instance driver context. */ struct dev_context { const struct agdmm_profile *profile; diff --git a/hardware/asix-sigma/asix-sigma.h b/hardware/asix-sigma/asix-sigma.h index 12410238..85a853d5 100644 --- a/hardware/asix-sigma/asix-sigma.h +++ b/hardware/asix-sigma/asix-sigma.h @@ -173,11 +173,6 @@ struct sigma_state { int chunks_downloaded; }; -/* Private driver context. */ -struct drv_context { - GSList *instances; -}; - /* Private, per-device-instance driver context. */ struct dev_context { struct ftdi_context ftdic; diff --git a/hardware/chronovu-la8/driver.h b/hardware/chronovu-la8/driver.h index b4aaa900..39e360b6 100644 --- a/hardware/chronovu-la8/driver.h +++ b/hardware/chronovu-la8/driver.h @@ -41,11 +41,6 @@ #define BS 4096 /* Block size */ #define NUM_BLOCKS 2048 /* Number of blocks */ -/* Private driver context. */ -struct drv_context { - GSList *instances; -}; - /* Private, per-device-instance driver context. */ struct dev_context { /** FTDI device context (used by libftdi). */ diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index ba440a3d..e435482e 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -63,13 +63,6 @@ enum { PATTERN_ALL_HIGH, }; -/* FIXME: Should not be global. */ - -/* Private driver context. */ -struct drv_context { - GSList *instances; -}; - /* Private, per-device-instance driver context. */ struct dev_context { int pipe_fds[2]; diff --git a/hardware/fx2lafw/fx2lafw.h b/hardware/fx2lafw/fx2lafw.h index f599feb6..c68b4aec 100644 --- a/hardware/fx2lafw/fx2lafw.h +++ b/hardware/fx2lafw/fx2lafw.h @@ -60,10 +60,6 @@ struct fx2lafw_profile { uint32_t dev_caps; }; -struct drv_context { - GSList *instances; -}; - struct dev_context { const struct fx2lafw_profile *profile; diff --git a/hardware/genericdmm/genericdmm.h b/hardware/genericdmm/genericdmm.h index cb323e41..99b8619d 100644 --- a/hardware/genericdmm/genericdmm.h +++ b/hardware/genericdmm/genericdmm.h @@ -45,11 +45,6 @@ struct dev_profile { struct sr_hwopt *defaults_opts; }; -/* Private driver context. */ -struct drv_context { - GSList *instances; -}; - /* Private, per-device-instance driver context. */ struct dev_context { struct dev_profile *profile; diff --git a/hardware/hantek-dso/dso.h b/hardware/hantek-dso/dso.h index 800aeadc..5ea970a9 100644 --- a/hardware/hantek-dso/dso.h +++ b/hardware/hantek-dso/dso.h @@ -159,10 +159,6 @@ struct dso_profile { char *firmware; }; -struct drv_context { - GSList *instances; -}; - struct dev_context { const struct dso_profile *profile; struct sr_usb_dev_inst *usb; diff --git a/hardware/openbench-logic-sniffer/ols.h b/hardware/openbench-logic-sniffer/ols.h index 66a45d5c..17942685 100644 --- a/hardware/openbench-logic-sniffer/ols.h +++ b/hardware/openbench-logic-sniffer/ols.h @@ -59,11 +59,6 @@ #define FLAG_CLOCK_INVERTED 0x80 #define FLAG_RLE 0x0100 -/* Private driver context. */ -struct drv_context { - GSList *instances; -}; - /* Private, per-device-instance driver context. */ struct dev_context { uint32_t max_samplerate; diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 7f6196a8..85555d85 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -147,11 +147,6 @@ static const struct sr_samplerates samplerates = { supported_samplerates, }; -/* Private driver context. */ -struct drv_context { - GSList *instances; -}; - /* Private, per-device-instance driver context. */ struct dev_context { uint64_t cur_samplerate; diff --git a/libsigrok.h b/libsigrok.h index bdc07230..2a88a7d0 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -533,6 +533,11 @@ struct sr_dev_driver { void *priv; }; +/* Private driver context. */ +struct drv_context { + GSList *instances; +}; + struct sr_session { /* List of struct sr_dev* */ GSList *devs;