Commit 2ea5d35a49f5c89d1d2d677fe90c71ad5a6278b6
Committed by
Linus Torvalds
1 parent
e4c570c4cb
Exists in
master
and in
20 other branches
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>
Showing 4 changed files with 20 additions and 19 deletions Side-by-side Diff
drivers/misc/ioc4.c
... | ... | @@ -138,7 +138,7 @@ |
138 | 138 | * even though the following code utilizes external interrupt registers |
139 | 139 | * to perform the speed calculation. |
140 | 140 | */ |
141 | -static void | |
141 | +static void __devinit | |
142 | 142 | ioc4_clock_calibrate(struct ioc4_driver_data *idd) |
143 | 143 | { |
144 | 144 | union ioc4_int_out int_out; |
... | ... | @@ -230,7 +230,7 @@ |
230 | 230 | * on the same PCI bus at slot number 3 to differentiate IO9 from IO10. |
231 | 231 | * If neither is present, it's a PCI-RT. |
232 | 232 | */ |
233 | -static unsigned int | |
233 | +static unsigned int __devinit | |
234 | 234 | ioc4_variant(struct ioc4_driver_data *idd) |
235 | 235 | { |
236 | 236 | struct pci_dev *pdev = NULL; |
... | ... | @@ -269,7 +269,7 @@ |
269 | 269 | return IOC4_VARIANT_PCI_RT; |
270 | 270 | } |
271 | 271 | |
272 | -static void | |
272 | +static void __devinit | |
273 | 273 | ioc4_load_modules(struct work_struct *work) |
274 | 274 | { |
275 | 275 | /* arg just has to be freed */ |
... | ... | @@ -280,7 +280,7 @@ |
280 | 280 | } |
281 | 281 | |
282 | 282 | /* Adds a new instance of an IOC4 card */ |
283 | -static int | |
283 | +static int __devinit | |
284 | 284 | ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) |
285 | 285 | { |
286 | 286 | struct ioc4_driver_data *idd; |
... | ... | @@ -425,7 +425,7 @@ |
425 | 425 | } |
426 | 426 | |
427 | 427 | /* Removes a particular instance of an IOC4 card. */ |
428 | -static void | |
428 | +static void __devexit | |
429 | 429 | ioc4_remove(struct pci_dev *pdev) |
430 | 430 | { |
431 | 431 | struct ioc4_submodule *is; |
... | ... | @@ -476,7 +476,7 @@ |
476 | 476 | .name = "IOC4", |
477 | 477 | .id_table = ioc4_id_table, |
478 | 478 | .probe = ioc4_probe, |
479 | - .remove = ioc4_remove, | |
479 | + .remove = __devexit_p(ioc4_remove), | |
480 | 480 | }; |
481 | 481 | |
482 | 482 | MODULE_DEVICE_TABLE(pci, ioc4_id_table); |
483 | 483 | |
... | ... | @@ -486,14 +486,14 @@ |
486 | 486 | *********************/ |
487 | 487 | |
488 | 488 | /* Module load */ |
489 | -static int __devinit | |
489 | +static int __init | |
490 | 490 | ioc4_init(void) |
491 | 491 | { |
492 | 492 | return pci_register_driver(&ioc4_driver); |
493 | 493 | } |
494 | 494 | |
495 | 495 | /* Module unload */ |
496 | -static void __devexit | |
496 | +static void __exit | |
497 | 497 | ioc4_exit(void) |
498 | 498 | { |
499 | 499 | /* Ensure ioc4_load_modules() has completed before exiting */ |
drivers/serial/ioc3_serial.c
... | ... | @@ -2162,7 +2162,7 @@ |
2162 | 2162 | /** |
2163 | 2163 | * ioc3_detect - module init called, |
2164 | 2164 | */ |
2165 | -static int __devinit ioc3uart_init(void) | |
2165 | +static int __init ioc3uart_init(void) | |
2166 | 2166 | { |
2167 | 2167 | int ret; |
2168 | 2168 | |
... | ... | @@ -2179,7 +2179,7 @@ |
2179 | 2179 | return ret; |
2180 | 2180 | } |
2181 | 2181 | |
2182 | -static void __devexit ioc3uart_exit(void) | |
2182 | +static void __exit ioc3uart_exit(void) | |
2183 | 2183 | { |
2184 | 2184 | ioc3_unregister_submodule(&ioc3uart_ops); |
2185 | 2185 | uart_unregister_driver(&ioc3_uart); |
drivers/serial/ioc4_serial.c
... | ... | @@ -2904,7 +2904,7 @@ |
2904 | 2904 | /** |
2905 | 2905 | * ioc4_serial_init - module init |
2906 | 2906 | */ |
2907 | -int ioc4_serial_init(void) | |
2907 | +static int __init ioc4_serial_init(void) | |
2908 | 2908 | { |
2909 | 2909 | int ret; |
2910 | 2910 | |
... | ... | @@ -2926,7 +2926,7 @@ |
2926 | 2926 | return ioc4_register_submodule(&ioc4_serial_submodule); |
2927 | 2927 | } |
2928 | 2928 | |
2929 | -static void __devexit ioc4_serial_exit(void) | |
2929 | +static void __exit ioc4_serial_exit(void) | |
2930 | 2930 | { |
2931 | 2931 | ioc4_unregister_submodule(&ioc4_serial_submodule); |
2932 | 2932 | uart_unregister_driver(&ioc4_uart_rs232); |
drivers/sn/ioc3.c
... | ... | @@ -574,11 +574,11 @@ |
574 | 574 | * Device management * |
575 | 575 | *********************/ |
576 | 576 | |
577 | -static char * | |
577 | +static char * __devinitdata | |
578 | 578 | ioc3_class_names[]={"unknown", "IP27 BaseIO", "IP30 system", "MENET 1/2/3", |
579 | 579 | "MENET 4", "CADduo", "Altix Serial"}; |
580 | 580 | |
581 | -static int ioc3_class(struct ioc3_driver_data *idd) | |
581 | +static int __devinit ioc3_class(struct ioc3_driver_data *idd) | |
582 | 582 | { |
583 | 583 | int res = IOC3_CLASS_NONE; |
584 | 584 | /* NIC-based logic */ |
... | ... | @@ -601,7 +601,8 @@ |
601 | 601 | return res; |
602 | 602 | } |
603 | 603 | /* Adds a new instance of an IOC3 card */ |
604 | -static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |
604 | +static int __devinit | |
605 | +ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |
605 | 606 | { |
606 | 607 | struct ioc3_driver_data *idd; |
607 | 608 | uint32_t pcmd; |
... | ... | @@ -753,7 +754,7 @@ |
753 | 754 | } |
754 | 755 | |
755 | 756 | /* Removes a particular instance of an IOC3 card. */ |
756 | -static void ioc3_remove(struct pci_dev *pdev) | |
757 | +static void __devexit ioc3_remove(struct pci_dev *pdev) | |
757 | 758 | { |
758 | 759 | int id; |
759 | 760 | struct ioc3_driver_data *idd; |
... | ... | @@ -805,7 +806,7 @@ |
805 | 806 | .name = "IOC3", |
806 | 807 | .id_table = ioc3_id_table, |
807 | 808 | .probe = ioc3_probe, |
808 | - .remove = ioc3_remove, | |
809 | + .remove = __devexit_p(ioc3_remove), | |
809 | 810 | }; |
810 | 811 | |
811 | 812 | MODULE_DEVICE_TABLE(pci, ioc3_id_table); |
... | ... | @@ -815,7 +816,7 @@ |
815 | 816 | *********************/ |
816 | 817 | |
817 | 818 | /* Module load */ |
818 | -static int __devinit ioc3_init(void) | |
819 | +static int __init ioc3_init(void) | |
819 | 820 | { |
820 | 821 | if (ia64_platform_is("sn2")) |
821 | 822 | return pci_register_driver(&ioc3_driver); |
... | ... | @@ -823,7 +824,7 @@ |
823 | 824 | } |
824 | 825 | |
825 | 826 | /* Module unload */ |
826 | -static void __devexit ioc3_exit(void) | |
827 | +static void __exit ioc3_exit(void) | |
827 | 828 | { |
828 | 829 | pci_unregister_driver(&ioc3_driver); |
829 | 830 | } |