From: Joel Holdsworth Date: Mon, 18 Sep 2017 01:51:15 +0000 (-0600) Subject: dreamsourcelab-dslogic: Moved devc and usb assignment into initializers X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=16d4c982a341ecc4118b5cbdbb26ef5df93ae31b;p=libsigrok.git dreamsourcelab-dslogic: Moved devc and usb assignment into initializers --- diff --git a/src/hardware/dreamsourcelab-dslogic/protocol.c b/src/hardware/dreamsourcelab-dslogic/protocol.c index c665d071..2bf33668 100644 --- a/src/hardware/dreamsourcelab-dslogic/protocol.c +++ b/src/hardware/dreamsourcelab-dslogic/protocol.c @@ -423,8 +423,8 @@ static void set_trigger(const struct sr_dev_inst *sdi, struct fpga_config *cfg) static int fpga_configure(const struct sr_dev_inst *sdi) { - struct dev_context *devc; - struct sr_usb_dev_inst *usb; + const struct dev_context *const devc = sdi->priv; + const struct sr_usb_dev_inst *const usb = sdi->conn; uint8_t c[3]; struct fpga_config cfg; uint16_t mode = 0; @@ -433,9 +433,6 @@ static int fpga_configure(const struct sr_dev_inst *sdi) sr_dbg("Configuring FPGA."); - usb = sdi->conn; - devc = sdi->priv; - WL32(&cfg.sync, DS_CFG_START); WL16(&cfg.mode_header, DS_CFG_MODE); WL16(&cfg.divider_header, DS_CFG_DIVIDER);