From f4383d1f095b4fc9706564b3f784f8fda2e1e9d9 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 25 Oct 2018 16:40:26 -0500 Subject: Use mtac_free function in mtac_gpiob_exit --- mtac_gpiob.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/mtac_gpiob.c b/mtac_gpiob.c index 69e7388..5230670 100644 --- a/mtac_gpiob.c +++ b/mtac_gpiob.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 General Purpose I/O Accessory Card" #define DRIVER_NAME "mtac-gpiob" @@ -785,18 +785,7 @@ static int __init mtac_gpiob_init(void) /* We can only tear down our own device */ static void __exit mtac_gpiob_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_GPIOB)) { - if (mtac_port_info[port_index]->setup == &gpiob_setup) { - mtac_port_info[port_index]->teardown(port_index+1); - kfree(mtac_port_info[port_index]); - } - } - } + mtac_free(PRODUCT_ID_MTAC_GPIOB,eth_gpiob,"gpiob"); log_info("exiting"); } -- cgit v1.2.3