aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-12-14 21:00:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 11:53:27 -0500
commit2ea5d35a49f5c89d1d2d677fe90c71ad5a6278b6 (patch)
tree3e5eb8efe966320b93ec948c8f95674d79912c5e
parente4c570c4cb7a95dbfafa3d016d2739bf3fdfe319 (diff)
ioc3/ioc4: various section fixes
Several IOC3 and IOC4 drivers misuse the __devinit and __devexit section markers. Use __init and __exit instead as appropriate, then add __devinit and __devexit where they really belong for PCI drivers. Also make ioc4_serial_init static. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Pat Gefre <pfg@sgi.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/misc/ioc4.c16
-rw-r--r--drivers/serial/ioc3_serial.c4
-rw-r--r--drivers/serial/ioc4_serial.c4
-rw-r--r--drivers/sn/ioc3.c15
4 files changed, 20 insertions, 19 deletions
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c
index 60b0b1a4fb3a..09dcb699e667 100644
--- a/drivers/misc/ioc4.c
+++ b/drivers/misc/ioc4.c
@@ -138,7 +138,7 @@ ioc4_unregister_submodule(struct ioc4_submodule *is)
138 * even though the following code utilizes external interrupt registers 138 * even though the following code utilizes external interrupt registers
139 * to perform the speed calculation. 139 * to perform the speed calculation.
140 */ 140 */
141static void 141static void __devinit
142ioc4_clock_calibrate(struct ioc4_driver_data *idd) 142ioc4_clock_calibrate(struct ioc4_driver_data *idd)
143{ 143{
144 union ioc4_int_out int_out; 144 union ioc4_int_out int_out;
@@ -230,7 +230,7 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd)
230 * on the same PCI bus at slot number 3 to differentiate IO9 from IO10. 230 * on the same PCI bus at slot number 3 to differentiate IO9 from IO10.
231 * If neither is present, it's a PCI-RT. 231 * If neither is present, it's a PCI-RT.
232 */ 232 */
233static unsigned int 233static unsigned int __devinit
234ioc4_variant(struct ioc4_driver_data *idd) 234ioc4_variant(struct ioc4_driver_data *idd)
235{ 235{
236 struct pci_dev *pdev = NULL; 236 struct pci_dev *pdev = NULL;
@@ -269,7 +269,7 @@ ioc4_variant(struct ioc4_driver_data *idd)
269 return IOC4_VARIANT_PCI_RT; 269 return IOC4_VARIANT_PCI_RT;
270} 270}
271 271
272static void 272static void __devinit
273ioc4_load_modules(struct work_struct *work) 273ioc4_load_modules(struct work_struct *work)
274{ 274{
275 /* arg just has to be freed */ 275 /* arg just has to be freed */
@@ -280,7 +280,7 @@ ioc4_load_modules(struct work_struct *work)
280} 280}
281 281
282/* Adds a new instance of an IOC4 card */ 282/* Adds a new instance of an IOC4 card */
283static int 283static int __devinit
284ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) 284ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
285{ 285{
286 struct ioc4_driver_data *idd; 286 struct ioc4_driver_data *idd;
@@ -425,7 +425,7 @@ out:
425} 425}
426 426
427/* Removes a particular instance of an IOC4 card. */ 427/* Removes a particular instance of an IOC4 card. */
428static void 428static void __devexit
429ioc4_remove(struct pci_dev *pdev) 429ioc4_remove(struct pci_dev *pdev)
430{ 430{
431 struct ioc4_submodule *is; 431 struct ioc4_submodule *is;
@@ -476,7 +476,7 @@ static struct pci_driver ioc4_driver = {
476 .name = "IOC4", 476 .name = "IOC4",
477 .id_table = ioc4_id_table, 477 .id_table = ioc4_id_table,
478 .probe = ioc4_probe, 478 .probe = ioc4_probe,
479 .remove = ioc4_remove, 479 .remove = __devexit_p(ioc4_remove),
480}; 480};
481 481
482MODULE_DEVICE_TABLE(pci, ioc4_id_table); 482MODULE_DEVICE_TABLE(pci, ioc4_id_table);
@@ -486,14 +486,14 @@ MODULE_DEVICE_TABLE(pci, ioc4_id_table);
486 *********************/ 486 *********************/
487 487
488/* Module load */ 488/* Module load */
489static int __devinit 489static int __init
490ioc4_init(void) 490ioc4_init(void)
491{ 491{
492 return pci_register_driver(&ioc4_driver); 492 return pci_register_driver(&ioc4_driver);
493} 493}
494 494
495/* Module unload */ 495/* Module unload */
496static void __devexit 496static void __exit
497ioc4_exit(void) 497ioc4_exit(void)
498{ 498{
499 /* Ensure ioc4_load_modules() has completed before exiting */ 499 /* Ensure ioc4_load_modules() has completed before exiting */
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index d8983dd5c4b2..85dc0410ac1a 100644
--- a/drivers/serial/ioc3_serial.c
+++ b/drivers/serial/ioc3_serial.c
@@ -2162,7 +2162,7 @@ static struct ioc3_submodule ioc3uart_ops = {
2162/** 2162/**
2163 * ioc3_detect - module init called, 2163 * ioc3_detect - module init called,
2164 */ 2164 */
2165static int __devinit ioc3uart_init(void) 2165static int __init ioc3uart_init(void)
2166{ 2166{
2167 int ret; 2167 int ret;
2168 2168
@@ -2179,7 +2179,7 @@ static int __devinit ioc3uart_init(void)
2179 return ret; 2179 return ret;
2180} 2180}
2181 2181
2182static void __devexit ioc3uart_exit(void) 2182static void __exit ioc3uart_exit(void)
2183{ 2183{
2184 ioc3_unregister_submodule(&ioc3uart_ops); 2184 ioc3_unregister_submodule(&ioc3uart_ops);
2185 uart_unregister_driver(&ioc3_uart); 2185 uart_unregister_driver(&ioc3_uart);
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index 2e02c3026d24..902b067d7e9c 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -2904,7 +2904,7 @@ static struct ioc4_submodule ioc4_serial_submodule = {
2904/** 2904/**
2905 * ioc4_serial_init - module init 2905 * ioc4_serial_init - module init
2906 */ 2906 */
2907int ioc4_serial_init(void) 2907static int __init ioc4_serial_init(void)
2908{ 2908{
2909 int ret; 2909 int ret;
2910 2910
@@ -2926,7 +2926,7 @@ int ioc4_serial_init(void)
2926 return ioc4_register_submodule(&ioc4_serial_submodule); 2926 return ioc4_register_submodule(&ioc4_serial_submodule);
2927} 2927}
2928 2928
2929static void __devexit ioc4_serial_exit(void) 2929static void __exit ioc4_serial_exit(void)
2930{ 2930{
2931 ioc4_unregister_submodule(&ioc4_serial_submodule); 2931 ioc4_unregister_submodule(&ioc4_serial_submodule);
2932 uart_unregister_driver(&ioc4_uart_rs232); 2932 uart_unregister_driver(&ioc4_uart_rs232);
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c
index 816d4c592a3c..354e9f17e35a 100644
--- a/drivers/sn/ioc3.c
+++ b/drivers/sn/ioc3.c
@@ -574,11 +574,11 @@ void ioc3_unregister_submodule(struct ioc3_submodule *is)
574 * Device management * 574 * Device management *
575 *********************/ 575 *********************/
576 576
577static char * 577static char * __devinitdata
578ioc3_class_names[]={"unknown", "IP27 BaseIO", "IP30 system", "MENET 1/2/3", 578ioc3_class_names[]={"unknown", "IP27 BaseIO", "IP30 system", "MENET 1/2/3",
579 "MENET 4", "CADduo", "Altix Serial"}; 579 "MENET 4", "CADduo", "Altix Serial"};
580 580
581static int ioc3_class(struct ioc3_driver_data *idd) 581static int __devinit ioc3_class(struct ioc3_driver_data *idd)
582{ 582{
583 int res = IOC3_CLASS_NONE; 583 int res = IOC3_CLASS_NONE;
584 /* NIC-based logic */ 584 /* NIC-based logic */
@@ -601,7 +601,8 @@ static int ioc3_class(struct ioc3_driver_data *idd)
601 return res; 601 return res;
602} 602}
603/* Adds a new instance of an IOC3 card */ 603/* Adds a new instance of an IOC3 card */
604static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) 604static int __devinit
605ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
605{ 606{
606 struct ioc3_driver_data *idd; 607 struct ioc3_driver_data *idd;
607 uint32_t pcmd; 608 uint32_t pcmd;
@@ -753,7 +754,7 @@ out:
753} 754}
754 755
755/* Removes a particular instance of an IOC3 card. */ 756/* Removes a particular instance of an IOC3 card. */
756static void ioc3_remove(struct pci_dev *pdev) 757static void __devexit ioc3_remove(struct pci_dev *pdev)
757{ 758{
758 int id; 759 int id;
759 struct ioc3_driver_data *idd; 760 struct ioc3_driver_data *idd;
@@ -805,7 +806,7 @@ static struct pci_driver ioc3_driver = {
805 .name = "IOC3", 806 .name = "IOC3",
806 .id_table = ioc3_id_table, 807 .id_table = ioc3_id_table,
807 .probe = ioc3_probe, 808 .probe = ioc3_probe,
808 .remove = ioc3_remove, 809 .remove = __devexit_p(ioc3_remove),
809}; 810};
810 811
811MODULE_DEVICE_TABLE(pci, ioc3_id_table); 812MODULE_DEVICE_TABLE(pci, ioc3_id_table);
@@ -815,7 +816,7 @@ MODULE_DEVICE_TABLE(pci, ioc3_id_table);
815 *********************/ 816 *********************/
816 817
817/* Module load */ 818/* Module load */
818static int __devinit ioc3_init(void) 819static int __init ioc3_init(void)
819{ 820{
820 if (ia64_platform_is("sn2")) 821 if (ia64_platform_is("sn2"))
821 return pci_register_driver(&ioc3_driver); 822 return pci_register_driver(&ioc3_driver);
@@ -823,7 +824,7 @@ static int __devinit ioc3_init(void)
823} 824}
824 825
825/* Module unload */ 826/* Module unload */
826static void __devexit ioc3_exit(void) 827static void __exit ioc3_exit(void)
827{ 828{
828 pci_unregister_driver(&ioc3_driver); 829 pci_unregister_driver(&ioc3_driver);
829} 830}