提交 1361b7d3 编写于 作者: J Jiri Slaby 提交者: Linus Torvalds

Char: sx, fix io unmapping

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: NJiri Slaby <jirislaby@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 24e6fd4c
......@@ -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 {
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册