diff options
Diffstat (limited to 'drivers/tty/synclink_gt.c')
-rw-r--r-- | drivers/tty/synclink_gt.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index b38e954eedd..aba1e59f4a8 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c @@ -110,7 +110,7 @@ static struct pci_driver pci_driver = { .name = "synclink_gt", .id_table = pci_table, .probe = init_one, - .remove = __devexit_p(remove_one), + .remove = remove_one, }; static bool pci_registered; @@ -3645,8 +3645,10 @@ static void device_init(int adapter_num, struct pci_dev *pdev) for (i=0; i < port_count; ++i) { port_array[i] = alloc_dev(adapter_num, i, pdev); if (port_array[i] == NULL) { - for (--i; i >= 0; --i) + for (--i; i >= 0; --i) { + tty_port_destroy(&port_array[i]->port); kfree(port_array[i]); + } return; } } @@ -3696,7 +3698,7 @@ static void device_init(int adapter_num, struct pci_dev *pdev) } } -static int __devinit init_one(struct pci_dev *dev, +static int init_one(struct pci_dev *dev, const struct pci_device_id *ent) { if (pci_enable_device(dev)) { @@ -3708,7 +3710,7 @@ static int __devinit init_one(struct pci_dev *dev, return 0; } -static void __devexit remove_one(struct pci_dev *dev) +static void remove_one(struct pci_dev *dev) { } @@ -3773,6 +3775,7 @@ static void slgt_cleanup(void) release_resources(info); tmp = info; info = info->next_device; + tty_port_destroy(&tmp->port); kfree(tmp); } |