sr: make struct drv_context global

This commit is contained in:
Bert Vermeulen 2012-09-11 21:27:26 +02:00
parent f5cfe894ec
commit e9022f596d
10 changed files with 5 additions and 45 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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). */

View File

@ -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];

View File

@ -60,10 +60,6 @@ struct fx2lafw_profile {
uint32_t dev_caps;
};
struct drv_context {
GSList *instances;
};
struct dev_context {
const struct fx2lafw_profile *profile;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;