diff --git a/tools/atrf-id/atrf-id.c b/tools/atrf-id/atrf-id.c index 6929d10..5034550 100644 --- a/tools/atrf-id/atrf-id.c +++ b/tools/atrf-id/atrf-id.c @@ -168,7 +168,7 @@ int main(int argc, const char **argv) if (argc != 1) usage(*argv); - dsc = atrf_open(); + dsc = atrf_open(NULL); if (!dsc) return 1; diff --git a/tools/atrf-reset/atrf-reset.c b/tools/atrf-reset/atrf-reset.c index 0e69d58..dd629aa 100644 --- a/tools/atrf-reset/atrf-reset.c +++ b/tools/atrf-reset/atrf-reset.c @@ -1,8 +1,8 @@ /* * atrf-reset/atrf-reset.c - Reset the transceiver or the whole board * - * Written 2010 by Werner Almesberger - * Copyright 2010 Werner Almesberger + * Written 2010-2011 by Werner Almesberger + * Copyright 2010-2011 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,7 +48,7 @@ int main(int argc, const char **argv) usage(*argv); } - dsc = atrf_open(); + dsc = atrf_open(NULL); if (!dsc) return 1; diff --git a/tools/atrf-rssi/atrf-rssi.c b/tools/atrf-rssi/atrf-rssi.c index 3a095a3..e71bd67 100644 --- a/tools/atrf-rssi/atrf-rssi.c +++ b/tools/atrf-rssi/atrf-rssi.c @@ -115,7 +115,7 @@ int main(int argc, char **argv) signal(SIGINT, die); - dsc = atrf_open(); + dsc = atrf_open(NULL); if (!dsc) return 1; diff --git a/tools/atrf-trim/atrf-trim.c b/tools/atrf-trim/atrf-trim.c index 5e8f465..14d0054 100644 --- a/tools/atrf-trim/atrf-trim.c +++ b/tools/atrf-trim/atrf-trim.c @@ -1,8 +1,8 @@ /* * atrf-trim/atrf-trim.c - AT86RF230 oscillator trim utility * - * Written 2010 by Werner Almesberger - * Copyright 2010 Werner Almesberger + * Written 2010-2011 by Werner Almesberger + * Copyright 2010-2011 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ int main(int argc, const char **argv) usage(*argv); } - dsc = atrf_open(); + dsc = atrf_open(NULL); if (!dsc) return 1; diff --git a/tools/atrf-txrx/atrf-txrx.c b/tools/atrf-txrx/atrf-txrx.c index ecf0b0d..a053323 100644 --- a/tools/atrf-txrx/atrf-txrx.c +++ b/tools/atrf-txrx/atrf-txrx.c @@ -90,7 +90,7 @@ static struct atrf_dsc *init_txrx(int trim, unsigned mhz) { struct atrf_dsc *dsc; - dsc = atrf_open(); + dsc = atrf_open(NULL); if (!dsc) exit(1); diff --git a/tools/atrf-xtal/atrf-xtal.c b/tools/atrf-xtal/atrf-xtal.c index ee0593e..67d4b09 100644 --- a/tools/atrf-xtal/atrf-xtal.c +++ b/tools/atrf-xtal/atrf-xtal.c @@ -145,7 +145,7 @@ int main(int argc, char *const *argv) exit(1); } - dsc = atrf_open(); + dsc = atrf_open(NULL); if (!dsc) return 1; diff --git a/tools/include/atrf.h b/tools/include/atrf.h index b5ffea5..391dc5b 100644 --- a/tools/include/atrf.h +++ b/tools/include/atrf.h @@ -28,7 +28,7 @@ struct atrf_dsc; void *atrf_usb_handle(struct atrf_dsc *dsc); /* hack for atrf-id */ -struct atrf_dsc *atrf_open(void); +struct atrf_dsc *atrf_open(const char *arg); void atrf_close(struct atrf_dsc *dsc); int atrf_error(struct atrf_dsc *dsc); diff --git a/tools/lib/atrf.c b/tools/lib/atrf.c index ab26fe4..d799b0f 100644 --- a/tools/lib/atrf.c +++ b/tools/lib/atrf.c @@ -133,7 +133,7 @@ static const struct atrf_driver *select_driver(const char *arg, } -static struct atrf_dsc *do_atrf_open(const char *arg) +struct atrf_dsc *atrf_open(const char *arg) { struct atrf_dsc *dsc; const struct atrf_driver *driver; @@ -158,12 +158,6 @@ static struct atrf_dsc *do_atrf_open(const char *arg) } -struct atrf_dsc *atrf_open(void) -{ - return do_atrf_open(NULL); -} - - void atrf_close(struct atrf_dsc *dsc) { if (dsc->driver->close)