diff options
author | zilio nicolas <nicolas.zilio@kit.edu> | 2015-07-03 18:03:53 +0200 |
---|---|---|
committer | zilio nicolas <nicolas.zilio@kit.edu> | 2015-07-03 18:03:53 +0200 |
commit | c4f209458c5caa00f8d67033224458c78c374adc (patch) | |
tree | b4a24fdbc207f925a2fc527cc5123f025fc33421 /pcilib | |
parent | 01e63939789b7b6f195bf985dc06151cf5ee780b (diff) | |
download | pcitool-c4f209458c5caa00f8d67033224458c78c374adc.tar.gz pcitool-c4f209458c5caa00f8d67033224458c78c374adc.tar.bz2 pcitool-c4f209458c5caa00f8d67033224458c78c374adc.tar.xz pcitool-c4f209458c5caa00f8d67033224458c78c374adc.zip |
modified pci to put banks before registers
Diffstat (limited to 'pcilib')
-rw-r--r-- | pcilib/pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pcilib/pci.c b/pcilib/pci.c index 5bae8fc..5312922 100644 --- a/pcilib/pci.c +++ b/pcilib/pci.c @@ -175,17 +175,17 @@ pcilib_t *pcilib_open(const char *device, const char *model) { if (!ctx->model) ctx->model = strdup(model?model:"pci"); + if(banks){ + pcilib_xml_initialize_banks(doc,banks); + pcilib_add_register_banks(ctx,number_banks,banks); + }else pcilib_error("no memory for banks"); + if(registers){ pcilib_xml_initialize_registers(doc,registers); pcilib_xml_arrange_registers(registers,number_registers); pcilib_add_registers(ctx,number_registers,registers); }else pcilib_error("no memory for registers"); - if(banks){ - pcilib_xml_initialize_banks(doc,banks); - pcilib_add_register_banks(ctx,number_banks,banks); - }else pcilib_error("no memory for banks"); - ctx->model_info.registers = ctx->registers; ctx->model_info.banks = ctx->banks; ctx->model_info.protocols = ctx->protocols; |