Skip to content

Commit

Permalink
Char: sx, fix io unmapping
Browse files Browse the repository at this point in the history
board->base is increased for CF cards after mapping. Use board->base2
for unmapping the region, since it holds the original/correct address.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Oct 13, 2008
1 parent 24e6fd4 commit 1361b7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/sx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2504,7 +2504,7 @@ static void __devexit sx_remove_card(struct sx_board *board,
del_timer(&board->timer);
if (pdev) {
#ifdef CONFIG_PCI
pci_iounmap(pdev, board->base);
pci_iounmap(pdev, board->base2);
pci_release_region(pdev, IS_CF_BOARD(board) ? 3 : 2);
#endif
} else {
Expand Down Expand Up @@ -2703,7 +2703,7 @@ static int __devinit sx_pci_probe(struct pci_dev *pdev,

return 0;
err_unmap:
pci_iounmap(pdev, board->base);
pci_iounmap(pdev, board->base2);
err_reg:
pci_release_region(pdev, reg);
err_flag:
Expand Down

0 comments on commit 1361b7d

Please sign in to comment.