SR_PRIV struct sr_dev_driver ${lib}_driver_info;
static struct sr_dev_driver *di = &${lib}_driver_info;
-
static int init(struct sr_context *sr_ctx)
{
return std_init(sr_ctx, di, LOG_PREFIX);
static GSList *dev_list(void)
{
- struct drv_context *drvc;
-
- drvc = di->priv;
-
- return drvc->instances;
+ return ((struct drv_context *)(di->priv))->instances;
}
static int dev_clear(void)
SR_PRIV int ${lib}_receive_data(int fd, int revents, void *cb_data)
{
- (void)fd;
-
const struct sr_dev_inst *sdi;
struct dev_context *devc;
+ (void)fd;
+
if (!(sdi = cb_data))
return TRUE;