Skip to content

Commit

Permalink
[PATCH] Char: istallion, fix enabling
Browse files Browse the repository at this point in the history
Enable ISA cards before pci_register_driver and then, enable each PCI card in
probe function.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Dec 8, 2006
1 parent 8f8f5a5 commit 140e92a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions drivers/char/istallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -3968,6 +3968,10 @@ static int __devinit stli_pciprobe(struct pci_dev *pdev,
brdp->state |= BST_PROBED;
pci_set_drvdata(pdev, brdp);

EBRDENABLE(brdp);
brdp->enable = NULL;
brdp->disable = NULL;

return 0;
err_null:
stli_brds[brdp->brdnr] = NULL;
Expand Down Expand Up @@ -4054,13 +4058,6 @@ static int stli_initbrds(void)
if (retval > 0)
found += retval;

retval = pci_register_driver(&stli_pcidriver);
if (retval && found == 0) {
printk(KERN_ERR "Neither isa nor eisa cards found nor pci "
"driver can be registered!\n");
goto err;
}

/*
* All found boards are initialized. Now for a little optimization, if
* no boards are sharing the "shared memory" regions then we can just
Expand Down Expand Up @@ -4099,6 +4096,13 @@ static int stli_initbrds(void)
}
}

retval = pci_register_driver(&stli_pcidriver);
if (retval && found == 0) {
printk(KERN_ERR "Neither isa nor eisa cards found nor pci "
"driver can be registered!\n");
goto err;
}

return 0;
err:
return retval;
Expand Down

0 comments on commit 140e92a

Please sign in to comment.