From 3f05329be8476d12900ce31e78bb48a8f38a9761 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 25 Oct 2018 16:30:14 -0500 Subject: Use mtac_free in mtac_mfser_exit --- mtac_mfser.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/mtac_mfser.c b/mtac_mfser.c index 3f65a77..2b5ca29 100644 --- a/mtac_mfser.c +++ b/mtac_mfser.c @@ -1,4 +1,4 @@ -#define DRIVER_VERSION "v1.0.0" +#define DRIVER_VERSION "v1.1.0" #define DRIVER_AUTHOR "John Klug " #define DRIVER_DESC "MTS Multi-Fuction Serial Accessory Card" #define DRIVER_NAME "mtac-mfser" @@ -105,7 +105,7 @@ static char* mfser_gpio_pin_name_by_attr_name(const char* name, int port) { } else if (! strcmp(name, "rts-override")) { return "ap2-gpio4"; } else { - log_error("attirbute name [%s] is invalid for MFSER in port %d", name, port); + log_error("attribute name [%s] is invalid for MFSER in port %d", name, port); return ""; } } @@ -406,18 +406,7 @@ static int __init mtac_mfser_init(void) /* We can only tear down our own device */ static void __exit mtac_mfser_exit(void) { - int port_index; - struct mts_ap_eeprom_layout *app; - - for (port_index = 0; port_index < NUM_AP; port_index++) { - app = (struct mts_ap_eeprom_layout *)mts_ap_eeprom[port_index]; - if (app && strstr(app->product_id, PRODUCT_ID_MTAC_MFSER)) { - if (mtac_port_info[port_index]->setup == &mfser_setup) { - mtac_port_info[port_index]->teardown(port_index+1); - kfree(mtac_port_info[port_index]); - } - } - } + mtac_free(PRODUCT_ID_MTAC_MFSER,mfser_setup,"mfser"); log_info("exiting"); } -- cgit v1.2.3