rapidio/tsi721: convert to modular mport driver
authorAlexandre Bounine <alexandre.bounine@idt.com>
Wed, 3 Jul 2013 22:08:55 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:08:04 +0000 (16:08 -0700)
This patch adds an option to build device driver for Tsi721 PCIe-to-SRIO
bridge device as a kernel module.

Currently this module cannot be unloaded because the existing RapidIO
subsystem code does not support dynamic removal of local RapidIO
controllers (TODO).

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rapidio/devices/Kconfig
drivers/rapidio/devices/Makefile
drivers/rapidio/devices/tsi721.c
drivers/rapidio/rio.c

index 12a9d7f7040b6c5cd89d454d60a91cef2d2bc50e..c4cb0877592b4a8c4af223682364bddb7952ce53 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 config RAPIDIO_TSI721
-       bool "IDT Tsi721 PCI Express SRIO Controller support"
+       tristate "IDT Tsi721 PCI Express SRIO Controller support"
        depends on RAPIDIO && PCIEPORTBUS
        default "n"
        ---help---
index 7b62860f34f805842ab9fbe28ea35a6909f029b3..9432c494cf576f7b56f3497a770c4c1ab5a9677b 100644 (file)
@@ -2,7 +2,6 @@
 # Makefile for RapidIO devices
 #
 
-obj-$(CONFIG_RAPIDIO_TSI721)   += tsi721.o
-ifeq ($(CONFIG_RAPIDIO_DMA_ENGINE),y)
-obj-$(CONFIG_RAPIDIO_TSI721)   += tsi721_dma.o
-endif
+obj-$(CONFIG_RAPIDIO_TSI721)   += tsi721_mport.o
+tsi721_mport-y                 := tsi721.o
+tsi721_mport-$(CONFIG_RAPIDIO_DMA_ENGINE) += tsi721_dma.o
index a8b2c23a7ef4b7acbe4a771fbf72a2ddffded52f..ff7cbf2d28e3aca513a21999334ae01352208600 100644 (file)
@@ -2515,9 +2515,8 @@ static int __init tsi721_init(void)
        return pci_register_driver(&tsi721_driver);
 }
 
-static void __exit tsi721_exit(void)
-{
-       pci_unregister_driver(&tsi721_driver);
-}
-
 device_initcall(tsi721_init);
+
+MODULE_DESCRIPTION("IDT Tsi721 PCIExpress-to-SRIO bridge driver");
+MODULE_AUTHOR("Integrated Device Technology, Inc.");
+MODULE_LICENSE("GPL");
index 5eb727cd0652277a43ddcba3b371327414396d2e..2054b620882300df67e59cd0e74cc85cfdced56a 100644 (file)
@@ -1911,6 +1911,7 @@ int rio_register_mport(struct rio_mport *port)
        pr_debug("RIO: %s %s id=%d\n", __func__, port->name, port->id);
        return 0;
 }
+EXPORT_SYMBOL_GPL(rio_register_mport);
 
 EXPORT_SYMBOL_GPL(rio_local_get_device_id);
 EXPORT_SYMBOL_GPL(rio_get_device);