summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-11 08:34:23 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-11 08:34:23 -0400
commit020fc76ac0b0f07fe0efee4184c84de0707bd7b9 (patch)
tree0c2baeaf9aea0fd04918befabacf3414f4c5a53c /drivers.c
parentebef61312ef89f6c223827ea3e0c2ecd32917e24 (diff)
downloadgpsd-020fc76ac0b0f07fe0efee4184c84de0707bd7b9.tar.gz
Having an generic NMEA mode switcher no longer fits the type transition rules.
This used to make sense before binary driver recognition was sticky. Now, though, once we've recognized a binary driver type, we never switch out of it to generic NMEA.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers.c b/drivers.c
index ff1ff876..78ed994d 100644
--- a/drivers.c
+++ b/drivers.c
@@ -241,30 +241,6 @@ static void nmea_event_hook(struct gps_device_t *session, event_t event)
}
}
-#if defined(RECONFIGURE_ENABLE) && defined(BINARY_ENABLE)
-static void nmea_mode_switch(struct gps_device_t *session, int mode)
-{
- /*
- * If the daemon has seen this device in a binary mode, we may
- * actually know how to switch back.
- */
- if (mode == MODE_BINARY)
- {
- const struct gps_type_t **dp;
-
- /*@-shiftnegative@*/
- for (dp = gpsd_drivers; *dp; dp++) {
- if ((*dp)->packet_type > 0 && (*dp)->packet_type != session->packet.type &&
- (session->observed & PACKET_TYPEMASK((*dp)->packet_type))!=0) {
- (*dp)->mode_switcher(session, mode);
- break;
- }
- }
- /*@+shiftnegative@*/
- }
-}
-#endif /* defined(RECONFIGURE_ENABLE) && defined(BINARY_ENABLE) */
-
/* *INDENT-OFF* */
const struct gps_type_t nmea = {
.type_name = "Generic NMEA", /* full name of type */
@@ -280,7 +256,7 @@ const struct gps_type_t nmea = {
#ifdef RECONFIGURE_ENABLE
.speed_switcher = NULL, /* no speed switcher */
#ifdef BINARY_ENABLE
- .mode_switcher = nmea_mode_switch, /* maybe switchable if it was a SiRF */
+ .mode_switcher = NULL, /* maybe switchable if it was a SiRF */
#else
.mode_switcher = NULL, /* no binary mode to revert to */
#endif /* BINARY_ENABLE */