From ff0023b8b4d7bbd1c2b6623e2d63fe2eb09ca22f Mon Sep 17 00:00:00 2001 From: =Michael Keller Date: Sun, 5 May 2024 20:36:22 +1200 Subject: [PATCH] Garmin: Remove Unused Transport Filter. Remove the unused transport filter for the file based Garmin importers, as it is not used at all in the way that the USB storage transport is implemented. Signed-off-by: Michael Keller --- src/descriptor.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/descriptor.c b/src/descriptor.c index 6a83f28b..f23c93dd 100644 --- a/src/descriptor.c +++ b/src/descriptor.c @@ -474,8 +474,8 @@ static const dc_descriptor_t g_descriptors[] = { /* for the Mk1 we are using the model of the global model */ /* for the Mk2/Mk3 we are using the model of the Mk2 global model */ /* see garmin_parser.c for a more comprehensive list of models */ - {"Garmin", "Descent Mk1", DC_FAMILY_GARMIN, 2859, DC_TRANSPORT_USBSTORAGE, dc_filter_garmin}, - {"Garmin", "Descent Mk2(i)/Mk3(i)", DC_FAMILY_GARMIN, 3258, DC_TRANSPORT_USBSTORAGE, dc_filter_garmin}, + {"Garmin", "Descent Mk1", DC_FAMILY_GARMIN, 2859, DC_TRANSPORT_USBSTORAGE, NULL}, + {"Garmin", "Descent Mk2(i)/Mk3(i)", DC_FAMILY_GARMIN, 3258, DC_TRANSPORT_USBSTORAGE, NULL}, {"FIT", "File import", DC_FAMILY_GARMIN, 0, DC_TRANSPORT_USBSTORAGE, NULL }, }; @@ -858,21 +858,6 @@ dc_filter_divesoft (dc_descriptor_t *descriptor, dc_transport_t transport, const return 1; } -// Not merged upstream yet -static int -dc_filter_garmin (dc_descriptor_t *descriptor, dc_transport_t transport, const void *userdata) -{ - static const dc_usb_desc_t usbhid[] = { - {0x091e, 0x2b2b}, // Garmin Descent Mk1 - }; - - if (transport == DC_TRANSPORT_USBSTORAGE) { - return DC_FILTER_INTERNAL (userdata, usbhid, 0, dc_match_usb); - } - - return 1; -} - dc_status_t dc_descriptor_iterator (dc_iterator_t **out) {