X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fgmc-mh-1x-2x%2Fapi.c;h=acdf8413b078c18fc2fce0b01ce298806d6c984e;hb=bf2c987fdef6787a5ce826ed9d98a70f52a1ff96;hp=615209ec079df84235c19b8f7ad429b268363f83;hpb=043e899a5155dcdc353abc20006424973d8e2ed0;p=libsigrok.git diff --git a/hardware/gmc-mh-1x-2x/api.c b/hardware/gmc-mh-1x-2x/api.c index 615209ec..acdf8413 100644 --- a/hardware/gmc-mh-1x-2x/api.c +++ b/hardware/gmc-mh-1x-2x/api.c @@ -234,14 +234,9 @@ static int dev_open(struct sr_dev_inst *sdi) static int dev_close(struct sr_dev_inst *sdi) { - struct sr_serial_dev_inst *serial; struct dev_context *devc; - serial = sdi->conn; - if (serial && serial->fd != -1) { - serial_close(serial); - sdi->status = SR_ST_INACTIVE; - } + std_serial_dev_close(sdi); sdi->status = SR_ST_INACTIVE;