From a16123997b77a5d3a137fcd80e6bf4134b7a4a23 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sun, 24 Jun 2012 16:53:13 +1200 Subject: Added target.c for common target routines. --- src/adiv5.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/adiv5.c') diff --git a/src/adiv5.c b/src/adiv5.c index ee9ef56..a37afa1 100644 --- a/src/adiv5.c +++ b/src/adiv5.c @@ -40,11 +40,6 @@ #define DO_RESET_SEQ 0 #endif -/* This belongs elsewhere... */ -target *target_list = NULL; -target *cur_target = NULL; -target *last_target = NULL; - static const char adiv5_driver_str[] = "ARM ADIv5 MEM-AP"; ADIv5_DP_t *adiv5_dp_list; @@ -130,9 +125,7 @@ void adiv5_dp_init(ADIv5_DP_t *dp) /* Should probe further here... */ /* Prepend to target list... */ - t = (void*)calloc(1, sizeof(struct target_ap_s)); - t->next = target_list; - target_list = t; + t = target_new(sizeof(struct target_ap_s)); ((struct target_ap_s *)t)->ap = ap; t->driver = adiv5_driver_str; -- cgit v1.2.3