aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-04-15 17:34:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-15 22:35:40 -0400
commite169c139642fb4c682ec12a409725508dbefa520 (patch)
tree71d1911b9973bc68c69597784c9d542c03f935b8 /drivers/serial
parent12c2c019eb9b0b586a061b336766d11cca449499 (diff)
serial: fix platform driver hotplug/coldplug
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable serial platform drivers, to re-enable auto loading. NOTE that Kconfig for some of these drivers doesn't allow modular builds, and thus doesn't match the driver source's unload support. Presumably their unload code is buggy and/or weakly tested... [dbrownell@users.sourceforge.net: more drivers, registration fixes] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/atmel_serial.c1
-rw-r--r--drivers/serial/bfin_5xx.c2
-rw-r--r--drivers/serial/imx.c2
-rw-r--r--drivers/serial/mcf.c1
-rw-r--r--drivers/serial/mpc52xx_uart.c2
-rw-r--r--drivers/serial/mpsc.c2
-rw-r--r--drivers/serial/netx-serial.c2
-rw-r--r--drivers/serial/pnx8xxx_uart.c1
-rw-r--r--drivers/serial/pxa.c3
-rw-r--r--drivers/serial/s3c2410.c4
-rw-r--r--drivers/serial/sa1100.c2
-rw-r--r--drivers/serial/sc26xx.c2
-rw-r--r--drivers/serial/sh-sci.c1
-rw-r--r--drivers/serial/uartlite.c3
-rw-r--r--drivers/serial/vr41xx_siu.c3
15 files changed, 30 insertions, 1 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 430997e33fc4..55492fa095a2 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1577,3 +1577,4 @@ module_exit(atmel_serial_exit);
1577MODULE_AUTHOR("Rick Bronson"); 1577MODULE_AUTHOR("Rick Bronson");
1578MODULE_DESCRIPTION("Atmel AT91 / AT32 serial port driver"); 1578MODULE_DESCRIPTION("Atmel AT91 / AT32 serial port driver");
1579MODULE_LICENSE("GPL"); 1579MODULE_LICENSE("GPL");
1580MODULE_ALIAS("platform:atmel_usart");
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 0aa345b9a38b..46bb47f37b9a 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -1243,6 +1243,7 @@ static struct platform_driver bfin_serial_driver = {
1243 .resume = bfin_serial_resume, 1243 .resume = bfin_serial_resume,
1244 .driver = { 1244 .driver = {
1245 .name = "bfin-uart", 1245 .name = "bfin-uart",
1246 .owner = THIS_MODULE,
1246 }, 1247 },
1247}; 1248};
1248 1249
@@ -1301,3 +1302,4 @@ MODULE_AUTHOR("Aubrey.Li <aubrey.li@analog.com>");
1301MODULE_DESCRIPTION("Blackfin generic serial port driver"); 1302MODULE_DESCRIPTION("Blackfin generic serial port driver");
1302MODULE_LICENSE("GPL"); 1303MODULE_LICENSE("GPL");
1303MODULE_ALIAS_CHARDEV_MAJOR(BFIN_SERIAL_MAJOR); 1304MODULE_ALIAS_CHARDEV_MAJOR(BFIN_SERIAL_MAJOR);
1305MODULE_ALIAS("platform:bfin-uart");
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 56af1f566a4c..16ba9ac7a566 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1090,6 +1090,7 @@ static struct platform_driver serial_imx_driver = {
1090 .resume = serial_imx_resume, 1090 .resume = serial_imx_resume,
1091 .driver = { 1091 .driver = {
1092 .name = "imx-uart", 1092 .name = "imx-uart",
1093 .owner = THIS_MODULE,
1093 }, 1094 },
1094}; 1095};
1095 1096
@@ -1124,3 +1125,4 @@ module_exit(imx_serial_exit);
1124MODULE_AUTHOR("Sascha Hauer"); 1125MODULE_AUTHOR("Sascha Hauer");
1125MODULE_DESCRIPTION("IMX generic serial port driver"); 1126MODULE_DESCRIPTION("IMX generic serial port driver");
1126MODULE_LICENSE("GPL"); 1127MODULE_LICENSE("GPL");
1128MODULE_ALIAS("platform:imx-uart");
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
index e76fc72c9b36..7e164e0cd211 100644
--- a/drivers/serial/mcf.c
+++ b/drivers/serial/mcf.c
@@ -649,5 +649,6 @@ module_exit(mcf_exit);
649MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>"); 649MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>");
650MODULE_DESCRIPTION("Freescale ColdFire UART driver"); 650MODULE_DESCRIPTION("Freescale ColdFire UART driver");
651MODULE_LICENSE("GPL"); 651MODULE_LICENSE("GPL");
652MODULE_ALIAS("platform:mcfuart");
652 653
653/****************************************************************************/ 654/****************************************************************************/
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index a638f23c6c61..d93b3578c5e2 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1188,6 +1188,8 @@ mpc52xx_uart_resume(struct platform_device *dev)
1188} 1188}
1189#endif 1189#endif
1190 1190
1191/* work with hotplug and coldplug */
1192MODULE_ALIAS("platform:mpc52xx-psc");
1191 1193
1192static struct platform_driver mpc52xx_uart_platform_driver = { 1194static struct platform_driver mpc52xx_uart_platform_driver = {
1193 .probe = mpc52xx_uart_probe, 1195 .probe = mpc52xx_uart_probe,
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index cb3a91967742..e8819c43f57d 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -1964,6 +1964,7 @@ static struct platform_driver mpsc_driver = {
1964 .remove = mpsc_drv_remove, 1964 .remove = mpsc_drv_remove,
1965 .driver = { 1965 .driver = {
1966 .name = MPSC_CTLR_NAME, 1966 .name = MPSC_CTLR_NAME,
1967 .owner = THIS_MODULE,
1967 }, 1968 },
1968}; 1969};
1969 1970
@@ -2007,3 +2008,4 @@ MODULE_DESCRIPTION("Generic Marvell MPSC serial/UART driver $Revision: 1.00 $");
2007MODULE_VERSION(MPSC_VERSION); 2008MODULE_VERSION(MPSC_VERSION);
2008MODULE_LICENSE("GPL"); 2009MODULE_LICENSE("GPL");
2009MODULE_ALIAS_CHARDEV_MAJOR(MPSC_MAJOR); 2010MODULE_ALIAS_CHARDEV_MAJOR(MPSC_MAJOR);
2011MODULE_ALIAS("platform:" MPSC_CTLR_NAME);
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c
index b56f7db45031..3123ffeac8ad 100644
--- a/drivers/serial/netx-serial.c
+++ b/drivers/serial/netx-serial.c
@@ -713,6 +713,7 @@ static struct platform_driver serial_netx_driver = {
713 713
714 .driver = { 714 .driver = {
715 .name = DRIVER_NAME, 715 .name = DRIVER_NAME,
716 .owner = THIS_MODULE,
716 }, 717 },
717}; 718};
718 719
@@ -745,3 +746,4 @@ module_exit(netx_serial_exit);
745MODULE_AUTHOR("Sascha Hauer"); 746MODULE_AUTHOR("Sascha Hauer");
746MODULE_DESCRIPTION("NetX serial port driver"); 747MODULE_DESCRIPTION("NetX serial port driver");
747MODULE_LICENSE("GPL"); 748MODULE_LICENSE("GPL");
749MODULE_ALIAS("platform:" DRIVER_NAME);
diff --git a/drivers/serial/pnx8xxx_uart.c b/drivers/serial/pnx8xxx_uart.c
index 8d01c59e8d04..d0e5a79ea635 100644
--- a/drivers/serial/pnx8xxx_uart.c
+++ b/drivers/serial/pnx8xxx_uart.c
@@ -850,3 +850,4 @@ MODULE_AUTHOR("Embedded Alley Solutions, Inc.");
850MODULE_DESCRIPTION("PNX8XXX SoCs serial port driver"); 850MODULE_DESCRIPTION("PNX8XXX SoCs serial port driver");
851MODULE_LICENSE("GPL"); 851MODULE_LICENSE("GPL");
852MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_PNX8XXX_MAJOR); 852MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_PNX8XXX_MAJOR);
853MODULE_ALIAS("platform:pnx8xxx-uart");
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 352fcb8926a6..b4f7ffb7688d 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -833,6 +833,7 @@ static struct platform_driver serial_pxa_driver = {
833 .resume = serial_pxa_resume, 833 .resume = serial_pxa_resume,
834 .driver = { 834 .driver = {
835 .name = "pxa2xx-uart", 835 .name = "pxa2xx-uart",
836 .owner = THIS_MODULE,
836 }, 837 },
837}; 838};
838 839
@@ -861,4 +862,4 @@ module_init(serial_pxa_init);
861module_exit(serial_pxa_exit); 862module_exit(serial_pxa_exit);
862 863
863MODULE_LICENSE("GPL"); 864MODULE_LICENSE("GPL");
864 865MODULE_ALIAS("platform:pxa2xx-uart");
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 45de19366030..4ffa2585429a 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1935,3 +1935,7 @@ console_initcall(s3c24xx_serial_initconsole);
1935MODULE_LICENSE("GPL"); 1935MODULE_LICENSE("GPL");
1936MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 1936MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
1937MODULE_DESCRIPTION("Samsung S3C2410/S3C2440/S3C2412 Serial port driver"); 1937MODULE_DESCRIPTION("Samsung S3C2410/S3C2440/S3C2412 Serial port driver");
1938MODULE_ALIAS("platform:s3c2400-uart");
1939MODULE_ALIAS("platform:s3c2410-uart");
1940MODULE_ALIAS("platform:s3c2412-uart");
1941MODULE_ALIAS("platform:s3c2440-uart");
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 58a83c27e14b..67b2338913c2 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -884,6 +884,7 @@ static struct platform_driver sa11x0_serial_driver = {
884 .resume = sa1100_serial_resume, 884 .resume = sa1100_serial_resume,
885 .driver = { 885 .driver = {
886 .name = "sa11x0-uart", 886 .name = "sa11x0-uart",
887 .owner = THIS_MODULE,
887 }, 888 },
888}; 889};
889 890
@@ -917,3 +918,4 @@ MODULE_AUTHOR("Deep Blue Solutions Ltd");
917MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.50 $"); 918MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.50 $");
918MODULE_LICENSE("GPL"); 919MODULE_LICENSE("GPL");
919MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_SA1100_MAJOR); 920MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_SA1100_MAJOR);
921MODULE_ALIAS("platform:sa11x0-uart");
diff --git a/drivers/serial/sc26xx.c b/drivers/serial/sc26xx.c
index a350b6d2a181..ae2a9e2df777 100644
--- a/drivers/serial/sc26xx.c
+++ b/drivers/serial/sc26xx.c
@@ -732,6 +732,7 @@ static struct platform_driver sc26xx_driver = {
732 .remove = __devexit_p(sc26xx_driver_remove), 732 .remove = __devexit_p(sc26xx_driver_remove),
733 .driver = { 733 .driver = {
734 .name = "SC26xx", 734 .name = "SC26xx",
735 .owner = THIS_MODULE,
735 }, 736 },
736}; 737};
737 738
@@ -753,3 +754,4 @@ MODULE_AUTHOR("Thomas Bogendörfer");
753MODULE_DESCRIPTION("SC681/SC2692 serial driver"); 754MODULE_DESCRIPTION("SC681/SC2692 serial driver");
754MODULE_VERSION("1.0"); 755MODULE_VERSION("1.0");
755MODULE_LICENSE("GPL"); 756MODULE_LICENSE("GPL");
757MODULE_ALIAS("platform:SC26xx");
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 9d244d1644e1..eff593080d4f 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1552,3 +1552,4 @@ module_init(sci_init);
1552module_exit(sci_exit); 1552module_exit(sci_exit);
1553 1553
1554MODULE_LICENSE("GPL"); 1554MODULE_LICENSE("GPL");
1555MODULE_ALIAS("platform:sh-sci");
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index 4e06ab6bcb6e..b565d5a37499 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -561,6 +561,9 @@ static int __devexit ulite_remove(struct platform_device *pdev)
561 return ulite_release(&pdev->dev); 561 return ulite_release(&pdev->dev);
562} 562}
563 563
564/* work with hotplug and coldplug */
565MODULE_ALIAS("platform:uartlite");
566
564static struct platform_driver ulite_platform_driver = { 567static struct platform_driver ulite_platform_driver = {
565 .probe = ulite_probe, 568 .probe = ulite_probe,
566 .remove = __devexit_p(ulite_remove), 569 .remove = __devexit_p(ulite_remove),
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index 6fd51b0022ca..98ab649c1ff9 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -960,3 +960,6 @@ static void __exit vr41xx_siu_exit(void)
960 960
961module_init(vr41xx_siu_init); 961module_init(vr41xx_siu_init);
962module_exit(vr41xx_siu_exit); 962module_exit(vr41xx_siu_exit);
963
964MODULE_LICENSE("GPL");
965MODULE_ALIAS("platform:SIU");