X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fgmc-mh-1x-2x%2Fapi.c;h=96d7656c1bbccb189763998b7ed79781a87061df;hb=98bfc4741f76b07e7db4c9628a6924004fc4fff4;hp=91267d98c3e2df3580ceb6ea9b30f0901df84e68;hpb=91219afc75c9aa1d0c5e2da5c03343c1e43eb6df;p=libsigrok.git diff --git a/src/hardware/gmc-mh-1x-2x/api.c b/src/hardware/gmc-mh-1x-2x/api.c index 91267d98..96d7656c 100644 --- a/src/hardware/gmc-mh-1x-2x/api.c +++ b/src/hardware/gmc-mh-1x-2x/api.c @@ -162,7 +162,6 @@ static GSList *scan_1x_2x_rs232(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_config *src; - struct sr_channel *ch; struct sr_serial_dev_inst *serial; GSList *l, *devices; const char *conn, *serialcomm; @@ -236,8 +235,7 @@ static GSList *scan_1x_2x_rs232(GSList *options) sdi->conn = serial; sdi->priv = devc; sdi->driver = &gmc_mh_1x_2x_rs232_driver_info; - ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P1"); - sdi->channels = g_slist_append(sdi->channels, ch); + sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1"); drvc->instances = g_slist_append(drvc->instances, sdi); devices = g_slist_append(devices, sdi); } @@ -254,7 +252,6 @@ static GSList *scan_2x_bd232(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_config *src; - struct sr_channel *ch; struct sr_serial_dev_inst *serial; GSList *l, *devices; const char *conn, *serialcomm; @@ -332,8 +329,7 @@ static GSList *scan_2x_bd232(GSList *options) sdi->conn = serial; sdi->priv = devc; sdi->driver = &gmc_mh_2x_bd232_driver_info; - ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P1"); - sdi->channels = g_slist_append(sdi->channels, ch); + sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1"); drvc->instances = g_slist_append(drvc->instances, sdi); devices = g_slist_append(devices, sdi); devc = g_malloc0(sizeof(struct dev_context));