diff options
author | Alexandre Bounine <alexandre.bounine@idt.com> | 2013-07-03 18:08:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:08:04 -0400 |
commit | 94d9bd4576fcd340c344bffbbe0526227535a95f (patch) | |
tree | c2d3515d937562eda67fad07f149e5ae5cd1845a | |
parent | 9edbc30b434f56258d03faac5daf37a555384db3 (diff) |
rapidio/tsi721: convert to modular mport driver
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>
-rw-r--r-- | drivers/rapidio/devices/Kconfig | 2 | ||||
-rw-r--r-- | drivers/rapidio/devices/Makefile | 7 | ||||
-rw-r--r-- | drivers/rapidio/devices/tsi721.c | 9 | ||||
-rw-r--r-- | drivers/rapidio/rio.c | 1 |
4 files changed, 9 insertions, 10 deletions
diff --git a/drivers/rapidio/devices/Kconfig b/drivers/rapidio/devices/Kconfig index 12a9d7f7040b..c4cb0877592b 100644 --- a/drivers/rapidio/devices/Kconfig +++ b/drivers/rapidio/devices/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | config RAPIDIO_TSI721 | 5 | config RAPIDIO_TSI721 |
6 | bool "IDT Tsi721 PCI Express SRIO Controller support" | 6 | tristate "IDT Tsi721 PCI Express SRIO Controller support" |
7 | depends on RAPIDIO && PCIEPORTBUS | 7 | depends on RAPIDIO && PCIEPORTBUS |
8 | default "n" | 8 | default "n" |
9 | ---help--- | 9 | ---help--- |
diff --git a/drivers/rapidio/devices/Makefile b/drivers/rapidio/devices/Makefile index 7b62860f34f8..9432c494cf57 100644 --- a/drivers/rapidio/devices/Makefile +++ b/drivers/rapidio/devices/Makefile | |||
@@ -2,7 +2,6 @@ | |||
2 | # Makefile for RapidIO devices | 2 | # Makefile for RapidIO devices |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_RAPIDIO_TSI721) += tsi721.o | 5 | obj-$(CONFIG_RAPIDIO_TSI721) += tsi721_mport.o |
6 | ifeq ($(CONFIG_RAPIDIO_DMA_ENGINE),y) | 6 | tsi721_mport-y := tsi721.o |
7 | obj-$(CONFIG_RAPIDIO_TSI721) += tsi721_dma.o | 7 | tsi721_mport-$(CONFIG_RAPIDIO_DMA_ENGINE) += tsi721_dma.o |
8 | endif | ||
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index a8b2c23a7ef4..ff7cbf2d28e3 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c | |||
@@ -2515,9 +2515,8 @@ static int __init tsi721_init(void) | |||
2515 | return pci_register_driver(&tsi721_driver); | 2515 | return pci_register_driver(&tsi721_driver); |
2516 | } | 2516 | } |
2517 | 2517 | ||
2518 | static void __exit tsi721_exit(void) | ||
2519 | { | ||
2520 | pci_unregister_driver(&tsi721_driver); | ||
2521 | } | ||
2522 | |||
2523 | device_initcall(tsi721_init); | 2518 | device_initcall(tsi721_init); |
2519 | |||
2520 | MODULE_DESCRIPTION("IDT Tsi721 PCIExpress-to-SRIO bridge driver"); | ||
2521 | MODULE_AUTHOR("Integrated Device Technology, Inc."); | ||
2522 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c index 5eb727cd0652..2054b6208823 100644 --- a/drivers/rapidio/rio.c +++ b/drivers/rapidio/rio.c | |||
@@ -1911,6 +1911,7 @@ int rio_register_mport(struct rio_mport *port) | |||
1911 | pr_debug("RIO: %s %s id=%d\n", __func__, port->name, port->id); | 1911 | pr_debug("RIO: %s %s id=%d\n", __func__, port->name, port->id); |
1912 | return 0; | 1912 | return 0; |
1913 | } | 1913 | } |
1914 | EXPORT_SYMBOL_GPL(rio_register_mport); | ||
1914 | 1915 | ||
1915 | EXPORT_SYMBOL_GPL(rio_local_get_device_id); | 1916 | EXPORT_SYMBOL_GPL(rio_local_get_device_id); |
1916 | EXPORT_SYMBOL_GPL(rio_get_device); | 1917 | EXPORT_SYMBOL_GPL(rio_get_device); |