The patch titled Char: sx, use pci_iomap has been added to the -mm tree. Its filename is char-sx-use-pci_iomap.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Char: sx, use pci_iomap From: Jiri Slaby <jirislaby@xxxxxxxxx> Use pci_ friends for memory remapping of pci devices. Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx> Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/char/sx.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff -puN drivers/char/sx.c~char-sx-use-pci_iomap drivers/char/sx.c --- a/drivers/char/sx.c~char-sx-use-pci_iomap +++ a/drivers/char/sx.c @@ -2355,7 +2355,8 @@ static void __exit sx_release_drivers(vo func_exit(); } -static void __devexit sx_remove_card(struct sx_board *board) +static void __devexit sx_remove_card(struct sx_board *board, + struct pci_dev *pdev) { if (board->flags & SX_BOARD_INITIALIZED) { /* The board should stop messing with us. (actually I mean the @@ -2366,7 +2367,10 @@ static void __devexit sx_remove_card(str /* It is safe/allowed to del_timer a non-active timer */ del_timer(&board->timer); - iounmap(board->base); + if (pdev) + pci_iounmap(pdev, board->base); + else + iounmap(board->base); board->flags &= ~(SX_BOARD_INITIALIZED | SX_BOARD_PRESENT); } @@ -2429,7 +2433,7 @@ static int __devexit sx_eisa_remove(stru { struct sx_board *board = dev_get_drvdata(dev); - sx_remove_card(board); + sx_remove_card(board, NULL); return 0; } @@ -2488,7 +2492,7 @@ static int __devinit sx_pci_probe(struct const struct pci_device_id *ent) { struct sx_board *board; - unsigned int i; + unsigned int i, reg; int retval = -EIO; mutex_lock(&sx_boards_lock); @@ -2510,12 +2514,10 @@ static int __devinit sx_pci_probe(struct SX_CFPCI_BOARD; /* CF boards use base address 3.... */ - if (IS_CF_BOARD(board)) - board->hw_base = pci_resource_start(pdev, 3); - else - board->hw_base = pci_resource_start(pdev, 2); + reg = IS_CF_BOARD(board) ? 3 : 2; + board->hw_base = pci_resource_start(pdev, reg); board->base2 = - board->base = ioremap(board->hw_base, WINDOW_LEN(board)); + board->base = pci_iomap(pdev, reg, WINDOW_LEN(board)); if (!board->base) { dev_err(&pdev->dev, "ioremap failed\n"); goto err_flag; @@ -2541,7 +2543,7 @@ static int __devinit sx_pci_probe(struct return 0; err_unmap: - iounmap(board->base2); + pci_iounmap(pdev, board->base); err_flag: board->flags &= ~SX_BOARD_PRESENT; err: @@ -2552,7 +2554,7 @@ static void __devexit sx_pci_remove(stru { struct sx_board *board = pci_get_drvdata(pdev); - sx_remove_card(board); + sx_remove_card(board, pdev); } /* Specialix has a whole bunch of cards with 0x2000 as the device ID. They say @@ -2682,7 +2684,7 @@ static void __exit sx_exit(void) pci_unregister_driver(&sx_pcidriver); for (i = 0; i < SX_NBOARDS; i++) - sx_remove_card(&boards[i]); + sx_remove_card(&boards[i], NULL); if (misc_deregister(&sx_fw_device) < 0) { printk(KERN_INFO "sx: couldn't deregister firmware loader " _ Patches currently in -mm which might be from jirislaby@xxxxxxxxx are mxser-correct-tty-driver-name.patch pci-mxser-pci-refcounts.patch mxser-make-an-experimental-clone.patch char-mxser_new-correct-include-file.patch char-mxser_new-upgrade-to-191.patch char-mxser_new-rework-to-allow-dynamic-structs.patch char-mxser_new-use-__devinit-macros.patch char-mxser_new-pci_request_region-for-pci-regions.patch char-mxser_new-check-request_region-retvals.patch char-mxser_new-kill-unneeded-memsets.patch char-mxser_new-revert-spin_lock-changes.patch char-mxser_new-remove-request-for-testers-line.patch char-mxser_new-debug-printk-dependent-on-debug.patch char-mxser_new-alter-license-terms.patch char-mxser_new-code-upside-down.patch char-mxser_new-cmspar-is-defined.patch char-remove-unneded-termbits-redefinitions-mxser_new.patch char-mxser_new-eliminate-tty-ldisc-deref.patch char-mxser_new-testbit-for-bit-testing.patch char-mxser_new-correct-fail-paths.patch char-mxser_new-dont-check-tty_unregister-retval.patch char-mxser_new-compress-isa-finding.patch char-mxser_new-register-tty-devices-on-the-fly.patch char-mxser_new-compact-structures-round2.patch char-mxser_new-reverse-if-else-paths-patch.patch char-mxser_new-comments-cleanup.patch char-mxser_new-correct-intr-handler-proto.patch char-mxser_new-delete-ttys-and-termios.patch char-mxser_new-pci-probing.patch char-mxser_new-clean-macros.patch maintainers-add-me-to-isicom-mxser.patch mxser_new-correct-tty-driver-name.patch char-stallion-use-pr_debug-macro.patch char-stallion-remove-unneeded-casts.patch char-stallion-kill-typedefs.patch char-stallion-move-init-deinit.patch char-stallion-uninline-functions.patch char-stallion-mark-functions-as-init.patch char-stallion-remove-many-prototypes.patch char-isicom-expand-function.patch char-isicom-rename-init-function.patch char-isicom-remove-isa-code.patch char-isicom-remove-unneeded-memset.patch char-isicom-move-to-tty_register_device.patch char-isicom-use-pci_request_region.patch char-isicom-check-kmalloc-retval.patch char-isicom-use-completion.patch char-isicom-simplify-timer.patch char-isicom-remove-cvs-stuff.patch char-isicom-fix-tty-index-check.patch char-sx-convert-to-pci-probing.patch char-sx-use-kcalloc.patch char-sx-mark-functions-as-devinit.patch char-sx-use-eisa-probing.patch char-sx-ifdef-isa-code.patch char-sx-lock-boards-struct.patch char-sx-remove-duplicite-code.patch char-sx-whitespace-cleanup.patch char-sx-remove-unneeded-stuff.patch char-sx-simplify-timer-logic.patch char-sx-fix-return-in-module-init.patch char-sx-use-pci_iomap.patch char-sx-request-regions.patch char-stallion-convert-to-pci-probing.patch char-stallion-prints-cleanup.patch char-stallion-implement-fail-paths.patch char-stallion-correct-__init-macros.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html