diff options
Diffstat (limited to 'drivers/serial/ip22zilog.c')
-rw-r--r-- | drivers/serial/ip22zilog.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 5ff269fb604c..dbf13c03a1bb 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c | |||
@@ -1229,13 +1229,27 @@ static int __init ip22zilog_init(void) | |||
1229 | static void __exit ip22zilog_exit(void) | 1229 | static void __exit ip22zilog_exit(void) |
1230 | { | 1230 | { |
1231 | int i; | 1231 | int i; |
1232 | struct uart_ip22zilog_port *up; | ||
1232 | 1233 | ||
1233 | for (i = 0; i < NUM_CHANNELS; i++) { | 1234 | for (i = 0; i < NUM_CHANNELS; i++) { |
1234 | struct uart_ip22zilog_port *up = &ip22zilog_port_table[i]; | 1235 | up = &ip22zilog_port_table[i]; |
1235 | 1236 | ||
1236 | uart_remove_one_port(&ip22zilog_reg, &up->port); | 1237 | uart_remove_one_port(&ip22zilog_reg, &up->port); |
1237 | } | 1238 | } |
1238 | 1239 | ||
1240 | /* Free IO mem */ | ||
1241 | up = &ip22zilog_port_table[0]; | ||
1242 | for (i = 0; i < NUM_IP22ZILOG; i++) { | ||
1243 | if (up[(i * 2) + 0].port.mapbase) { | ||
1244 | iounmap((void*)up[(i * 2) + 0].port.mapbase); | ||
1245 | up[(i * 2) + 0].port.mapbase = 0; | ||
1246 | } | ||
1247 | if (up[(i * 2) + 1].port.mapbase) { | ||
1248 | iounmap((void*)up[(i * 2) + 1].port.mapbase); | ||
1249 | up[(i * 2) + 1].port.mapbase = 0; | ||
1250 | } | ||
1251 | } | ||
1252 | |||
1239 | uart_unregister_driver(&ip22zilog_reg); | 1253 | uart_unregister_driver(&ip22zilog_reg); |
1240 | } | 1254 | } |
1241 | 1255 | ||