dreamsourcelab-dslogic: Moved devc and usb assignment into initializers
This commit is contained in:
parent
9f58023066
commit
16d4c982a3
|
@ -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)
|
static int fpga_configure(const struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
struct dev_context *devc;
|
const struct dev_context *const devc = sdi->priv;
|
||||||
struct sr_usb_dev_inst *usb;
|
const struct sr_usb_dev_inst *const usb = sdi->conn;
|
||||||
uint8_t c[3];
|
uint8_t c[3];
|
||||||
struct fpga_config cfg;
|
struct fpga_config cfg;
|
||||||
uint16_t mode = 0;
|
uint16_t mode = 0;
|
||||||
|
@ -433,9 +433,6 @@ static int fpga_configure(const struct sr_dev_inst *sdi)
|
||||||
|
|
||||||
sr_dbg("Configuring FPGA.");
|
sr_dbg("Configuring FPGA.");
|
||||||
|
|
||||||
usb = sdi->conn;
|
|
||||||
devc = sdi->priv;
|
|
||||||
|
|
||||||
WL32(&cfg.sync, DS_CFG_START);
|
WL32(&cfg.sync, DS_CFG_START);
|
||||||
WL16(&cfg.mode_header, DS_CFG_MODE);
|
WL16(&cfg.mode_header, DS_CFG_MODE);
|
||||||
WL16(&cfg.divider_header, DS_CFG_DIVIDER);
|
WL16(&cfg.divider_header, DS_CFG_DIVIDER);
|
||||||
|
|
Loading…
Reference in New Issue