X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fftdi-la%2Fapi.c;fp=src%2Fhardware%2Fftdi-la%2Fapi.c;h=c59ff9ad493e0572ef950fa918eb9bc185fcd268;hp=c2914eea89f4f47fc47fa58980ed1f953736210b;hb=ca314e060f653e6a0b5ec0f58914bac4d426217f;hpb=c8e789fa0c7264f8356b0446367cc1252fadfe4c diff --git a/src/hardware/ftdi-la/api.c b/src/hardware/ftdi-la/api.c index c2914eea..c59ff9ad 100644 --- a/src/hardware/ftdi-la/api.c +++ b/src/hardware/ftdi-la/api.c @@ -111,7 +111,6 @@ static void scan_device(struct ftdi_context *ftdic, return; } - /* Allocate memory for our private device context. */ devc = g_malloc0(sizeof(struct dev_context)); /* Allocate memory for the incoming data. */ @@ -138,7 +137,6 @@ static void scan_device(struct ftdi_context *ftdic, } sr_dbg("Found an FTDI device: %s.", model); - /* Register the device with libsigrok. */ sdi = g_malloc0(sizeof(struct sr_dev_inst)); sdi->status = SR_ST_INACTIVE; sdi->vendor = vendor; @@ -214,7 +212,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) } } - /* Allocate memory for the FTDI context (ftdic) and initialize it. */ ftdic = ftdi_new(); if (!ftdic) { sr_err("Failed to initialize libftdi."); @@ -273,7 +270,6 @@ static int dev_open(struct sr_dev_inst *sdi) goto err_ftdi_free; } - /* Purge RX/TX buffers in the FTDI chip. */ ret = ftdi_usb_purge_buffers(devc->ftdic); if (ret < 0) { sr_err("Failed to purge FTDI RX/TX buffers (%d): %s.", @@ -281,7 +277,6 @@ static int dev_open(struct sr_dev_inst *sdi) goto err_dev_open_close_ftdic; } - /* Reset the FTDI bitmode. */ ret = ftdi_set_bitmode(devc->ftdic, 0x00, BITMODE_RESET); if (ret < 0) { sr_err("Failed to reset the FTDI chip bitmode (%d): %s.",