diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-06-20 18:55:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-25 17:00:06 -0400 |
commit | ca16c5a300c33fd9d0cda48ef08166f32b35a56d (patch) | |
tree | 52dd32f88e827c1d011c82df632bd571c536c3d6 | |
parent | 8d6d544cfb52a28d5c75d17552fa3d3f1cfe4a8c (diff) |
serial: pxa: make it explicitly non-modular
The Kconfig currently controlling compilation of this code is:
drivers/tty/serial/Kconfig:config SERIAL_PXA
drivers/tty/serial/Kconfig: bool "PXA serial port support"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
Also note that MODULE_DEVICE_TABLE and MODULE_ALIAS are both a
no-op for non-modular builds.
We also delete the MODULE_LICENSE tag since that information is
already contained at the top of the file in the comments.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/pxa.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c index 41eab75ba2af..cd9d9e878475 100644 --- a/drivers/tty/serial/pxa.c +++ b/drivers/tty/serial/pxa.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #define SUPPORT_SYSRQ | 27 | #define SUPPORT_SYSRQ |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
32 | #include <linux/init.h> | 31 | #include <linux/init.h> |
33 | #include <linux/console.h> | 32 | #include <linux/console.h> |
@@ -829,7 +828,6 @@ static const struct of_device_id serial_pxa_dt_ids[] = { | |||
829 | { .compatible = "mrvl,mmp-uart", }, | 828 | { .compatible = "mrvl,mmp-uart", }, |
830 | {} | 829 | {} |
831 | }; | 830 | }; |
832 | MODULE_DEVICE_TABLE(of, serial_pxa_dt_ids); | ||
833 | 831 | ||
834 | static int serial_pxa_probe_dt(struct platform_device *pdev, | 832 | static int serial_pxa_probe_dt(struct platform_device *pdev, |
835 | struct uart_pxa_port *sport) | 833 | struct uart_pxa_port *sport) |
@@ -914,28 +912,15 @@ static int serial_pxa_probe(struct platform_device *dev) | |||
914 | return ret; | 912 | return ret; |
915 | } | 913 | } |
916 | 914 | ||
917 | static int serial_pxa_remove(struct platform_device *dev) | ||
918 | { | ||
919 | struct uart_pxa_port *sport = platform_get_drvdata(dev); | ||
920 | |||
921 | uart_remove_one_port(&serial_pxa_reg, &sport->port); | ||
922 | |||
923 | clk_unprepare(sport->clk); | ||
924 | clk_put(sport->clk); | ||
925 | kfree(sport); | ||
926 | |||
927 | return 0; | ||
928 | } | ||
929 | |||
930 | static struct platform_driver serial_pxa_driver = { | 915 | static struct platform_driver serial_pxa_driver = { |
931 | .probe = serial_pxa_probe, | 916 | .probe = serial_pxa_probe, |
932 | .remove = serial_pxa_remove, | ||
933 | 917 | ||
934 | .driver = { | 918 | .driver = { |
935 | .name = "pxa2xx-uart", | 919 | .name = "pxa2xx-uart", |
936 | #ifdef CONFIG_PM | 920 | #ifdef CONFIG_PM |
937 | .pm = &serial_pxa_pm_ops, | 921 | .pm = &serial_pxa_pm_ops, |
938 | #endif | 922 | #endif |
923 | .suppress_bind_attrs = true, | ||
939 | .of_match_table = serial_pxa_dt_ids, | 924 | .of_match_table = serial_pxa_dt_ids, |
940 | }, | 925 | }, |
941 | }; | 926 | }; |
@@ -954,15 +939,4 @@ static int __init serial_pxa_init(void) | |||
954 | 939 | ||
955 | return ret; | 940 | return ret; |
956 | } | 941 | } |
957 | 942 | device_initcall(serial_pxa_init); | |
958 | static void __exit serial_pxa_exit(void) | ||
959 | { | ||
960 | platform_driver_unregister(&serial_pxa_driver); | ||
961 | uart_unregister_driver(&serial_pxa_reg); | ||
962 | } | ||
963 | |||
964 | module_init(serial_pxa_init); | ||
965 | module_exit(serial_pxa_exit); | ||
966 | |||
967 | MODULE_LICENSE("GPL"); | ||
968 | MODULE_ALIAS("platform:pxa2xx-uart"); | ||