diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-13 09:40:29 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-13 09:40:29 +0000 |
commit | bfede96dcb989353be781759f337a7b34393aac2 (patch) | |
tree | 62c6df31e74bace28c197397e348043b621e3445 /driver_garmin.c | |
parent | cd419e26ba8bfda8ba3fa8193a792bf2b4f35e44 (diff) | |
download | gpsd-bfede96dcb989353be781759f337a7b34393aac2.tar.gz |
Fold the revert method into the generic event hook.
Abolish the wrapup method; there were only two users, one
was trivial, and the other belonged as a revert.
Diffstat (limited to 'driver_garmin.c')
-rw-r--r-- | driver_garmin.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/driver_garmin.c b/driver_garmin.c index 2f9139f6..99075639 100644 --- a/driver_garmin.c +++ b/driver_garmin.c @@ -875,14 +875,9 @@ static void garmin_event_hook(struct gps_device_t *session, event_t event) , GARMIN_PKTID_L001_COMMAND_DATA, 2, CMND_START_RM_DATA); #endif } -} - -static void garmin_close(struct gps_device_t *session UNUSED) -{ - /* FIXME -- do we need to put the garmin to sleep? or is closing the port - sufficient? */ - gpsd_report(LOG_PROG, "garmin_close()\n"); - return; + if (event == event_revert) + /* FIXME: is any action needed, or is closing the port sufficient? */ + gpsd_report(LOG_PROG, "garmin_close()\n"); } #define Send_ACK() Build_Send_SER_Packet(session, 0, ACK, 0, 0) @@ -1224,9 +1219,7 @@ const struct gps_type_t garmin_usb_binary_old = .mode_switcher = NULL, /* no mode switcher */ .rate_switcher = NULL, /* no sample-rate switcher */ .min_cycle = 1, /* not relevant, no rate switch */ - .revert = NULL, /* no setting-reversion method */ #endif /* ALLOW_RECONFIGURE */ - .wrapup = garmin_close, /* close hook */ }; #endif /* __UNUSED__ */ @@ -1250,9 +1243,7 @@ const struct gps_type_t garmin_usb_binary = .mode_switcher = garmin_switcher, /* how to change modes */ .rate_switcher = NULL, /* no sample-rate switcher */ .min_cycle = 1, /* not relevant, no rate switch */ - .revert = NULL, /* no setting-reversion method */ #endif /* ALLOW_RECONFIGURE */ - .wrapup = garmin_close, /* close hook */ }; const struct gps_type_t garmin_ser_binary = @@ -1275,9 +1266,7 @@ const struct gps_type_t garmin_ser_binary = .mode_switcher = garmin_switcher, /* how to change modes */ .rate_switcher = NULL, /* no sample-rate switcher */ .min_cycle = 1, /* not relevant, no rate switch */ - .revert = NULL, /* no setting-reversion method */ #endif /* ALLOW_RECONFIGURE */ - .wrapup = NULL, /* close hook */ }; #endif /* GARMIN_ENABLE */ |