aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJosh Cartwright <josh.cartwright@ni.com>2012-11-05 16:24:26 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-15 19:58:19 -0500
commit4bb535d2b6fe1466d89037c95945cc7bf5ba2377 (patch)
tree11bc5a09cb50610676046cd2597df54883f2025c /drivers
parentd1519e23c2b3a518fb41daf3eceae43382433ceb (diff)
serial: xilinx_uartps: kill CONFIG_OF conditional
The Zynq platform requires the use of CONFIG_OF. Remove the #ifdef conditionals in the uartps driver. Make dependency explicit in Kconfig. Signed-off-by: Josh Cartwright <josh.cartwright@ni.com> Tested-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/Kconfig1
-rw-r--r--drivers/tty/serial/xilinx_uartps.c9
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index b1768012ed21..6a69c88c5020 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1376,6 +1376,7 @@ config SERIAL_MXS_AUART_CONSOLE
1376 1376
1377config SERIAL_XILINX_PS_UART 1377config SERIAL_XILINX_PS_UART
1378 tristate "Xilinx PS UART support" 1378 tristate "Xilinx PS UART support"
1379 depends on OF
1379 select SERIAL_CORE 1380 select SERIAL_CORE
1380 help 1381 help
1381 This driver supports the Xilinx PS UART port. 1382 This driver supports the Xilinx PS UART port.
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index b627363352e5..23efe17be44b 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -946,15 +946,11 @@ static int __devinit xuartps_probe(struct platform_device *pdev)
946 struct resource *res, *res2; 946 struct resource *res, *res2;
947 int clk = 0; 947 int clk = 0;
948 948
949#ifdef CONFIG_OF
950 const unsigned int *prop; 949 const unsigned int *prop;
951 950
952 prop = of_get_property(pdev->dev.of_node, "clock", NULL); 951 prop = of_get_property(pdev->dev.of_node, "clock", NULL);
953 if (prop) 952 if (prop)
954 clk = be32_to_cpup(prop); 953 clk = be32_to_cpup(prop);
955#else
956 clk = *((unsigned int *)(pdev->dev.platform_data));
957#endif
958 if (!clk) { 954 if (!clk) {
959 dev_err(&pdev->dev, "no clock specified\n"); 955 dev_err(&pdev->dev, "no clock specified\n");
960 return -ENODEV; 956 return -ENODEV;
@@ -1044,16 +1040,11 @@ static int xuartps_resume(struct platform_device *pdev)
1044} 1040}
1045 1041
1046/* Match table for of_platform binding */ 1042/* Match table for of_platform binding */
1047
1048#ifdef CONFIG_OF
1049static struct of_device_id xuartps_of_match[] __devinitdata = { 1043static struct of_device_id xuartps_of_match[] __devinitdata = {
1050 { .compatible = "xlnx,xuartps", }, 1044 { .compatible = "xlnx,xuartps", },
1051 {} 1045 {}
1052}; 1046};
1053MODULE_DEVICE_TABLE(of, xuartps_of_match); 1047MODULE_DEVICE_TABLE(of, xuartps_of_match);
1054#else
1055#define xuartps_of_match NULL
1056#endif
1057 1048
1058static struct platform_driver xuartps_platform_driver = { 1049static struct platform_driver xuartps_platform_driver = {
1059 .probe = xuartps_probe, /* Probe method */ 1050 .probe = xuartps_probe, /* Probe method */