/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/pci.c

  • Committer: Suren A. Chilingaryan
  • Date: 2015-10-08 18:04:37 UTC
  • Revision ID: csa@suren.me-20151008180437-mvqzda4bzd45s023
Base functions for views

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
            pcilib_close(ctx);
138
138
            return NULL;
139
139
        }
 
140
        
 
141
        err = pcilib_init_py(ctx);
 
142
        if (err) {
 
143
            pcilib_error("Error (%i) initializing python subsystem", err);
 
144
            pcilib_close(ctx);
 
145
            return NULL;
 
146
        }
140
147
 
141
148
        ctx->alloc_reg = PCILIB_DEFAULT_REGISTER_SPACE;
142
149
        ctx->alloc_views = PCILIB_DEFAULT_VIEW_SPACE;
152
159
            return NULL;
153
160
        }
154
161
        
155
 
        
156
162
        memset(ctx->registers, 0, sizeof(pcilib_register_description_t));
157
163
        memset(ctx->units, 0, sizeof(pcilib_unit_t));
158
 
        memset(ctx->views, 0, sizeof(pcilib_view_t));
 
164
        memset(ctx->views, 0, sizeof(pcilib_view_t*));
159
165
        memset(ctx->banks, 0, sizeof(pcilib_register_bank_description_t));
160
166
        memset(ctx->ranges, 0, sizeof(pcilib_register_range_t));
161
167
 
391
397
 
392
398
        if (ctx->event_plugin)
393
399
            pcilib_plugin_close(ctx->event_plugin);
 
400
        
 
401
        pcilib_free_py(ctx);
394
402
 
395
403
        if (ctx->locks.kmem)
396
404
            pcilib_free_locking(ctx);