[PATCH 2/3] Char: sx, fix io unmapping

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jiri Slaby
Date: Thursday, August 14, 2008 - 9:25 am

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>
Cc: R.E.Wolff@BitWizard.nl
---
 drivers/char/sx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/sx.c b/drivers/char/sx.c
index c385206..5b8d7a1 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -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:
-- 
1.5.6.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] Char: cyclades, remove bogus iomap, Jiri Slaby, (Thu Aug 14, 9:25 am)
[PATCH 2/3] Char: sx, fix io unmapping, Jiri Slaby, (Thu Aug 14, 9:25 am)
[PATCH 3/3] Char: sx, remove bogus iomap, Jiri Slaby, (Thu Aug 14, 9:25 am)
Re: [PATCH 1/3] Char: cyclades, remove bogus iomap, Andrew Morton, (Mon Aug 18, 2:44 pm)