X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=session_driver.c;h=34f8c34e2a9ea773ef8c7cf1a57eb39be0e0b324;hb=25a0f108f4512ade836fed128c3ad649dedcb788;hp=ce5c665c54ee47db6b1293b7d4a975e38a35e932;hpb=58453e5876ffae9153e9f4ddc2ad8dc244c7f26d;p=libsigrok.git diff --git a/session_driver.c b/session_driver.c index ce5c665c..34f8c34e 100644 --- a/session_driver.c +++ b/session_driver.c @@ -171,14 +171,8 @@ static int hw_cleanup(void) return SR_OK; } -static int hw_dev_open(int dev_index) +static int hw_dev_open(struct sr_dev_inst *sdi) { - struct sr_dev_inst *sdi; - - sdi = sr_dev_inst_new(dev_index, SR_ST_INITIALIZING, - NULL, NULL, NULL); - if (!sdi) - return SR_ERR; if (!(sdi->priv = g_try_malloc0(sizeof(struct session_vdev)))) { sr_err("session driver: %s: sdi->priv malloc failed", __func__);