Commit 39014172 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

[PATCH] Char: istallion, free only isa

Only ISA cards should be freed in module exit.  Pci probed are freed in
pci_remove.  Define a flag, where we store this info a what to check against.
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b103b5cf
...@@ -202,6 +202,7 @@ static int stli_shared; ...@@ -202,6 +202,7 @@ static int stli_shared;
*/ */
#define BST_FOUND 0x1 #define BST_FOUND 0x1
#define BST_STARTED 0x2 #define BST_STARTED 0x2
#define BST_PROBED 0x4
/* /*
* Define the set of port state flags. These are marked for internal * Define the set of port state flags. These are marked for internal
...@@ -791,7 +792,7 @@ static void __exit istallion_module_exit(void) ...@@ -791,7 +792,7 @@ static void __exit istallion_module_exit(void)
kfree(stli_txcookbuf); kfree(stli_txcookbuf);
for (j = 0; (j < stli_nrbrds); j++) { for (j = 0; (j < stli_nrbrds); j++) {
if ((brdp = stli_brds[j]) == NULL) if ((brdp = stli_brds[j]) == NULL || (brdp->state & BST_PROBED))
continue; continue;
stli_cleanup_ports(brdp); stli_cleanup_ports(brdp);
...@@ -3956,6 +3957,7 @@ static int __devinit stli_pciprobe(struct pci_dev *pdev, ...@@ -3956,6 +3957,7 @@ static int __devinit stli_pciprobe(struct pci_dev *pdev,
if (retval) if (retval)
goto err_null; goto err_null;
brdp->state |= BST_PROBED;
pci_set_drvdata(pdev, brdp); pci_set_drvdata(pdev, brdp);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment