aboutsummaryrefslogtreecommitdiff
path: root/src/adiv5.c
diff options
context:
space:
mode:
authorGareth McMullin2012-06-24 16:53:13 +1200
committerGareth McMullin2012-06-24 19:08:49 +1200
commita16123997b77a5d3a137fcd80e6bf4134b7a4a23 (patch)
treefdef5d9e21fca06a0b9d06764d4c8545d78842f4 /src/adiv5.c
parent8872315e82c6ab92864020f2a05490c5f6df91cd (diff)
Added target.c for common target routines.
Diffstat (limited to 'src/adiv5.c')
-rw-r--r--src/adiv5.c9
1 files changed, 1 insertions, 8 deletions
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;