Commit 4bb535d2 authored by Josh Cartwright's avatar Josh Cartwright Committed by Greg Kroah-Hartman

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: default avatarJosh Cartwright <josh.cartwright@ni.com>
Tested-by: default avatarMichal Simek <monstr@monstr.eu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1519e23
...@@ -1376,6 +1376,7 @@ config SERIAL_MXS_AUART_CONSOLE ...@@ -1376,6 +1376,7 @@ config SERIAL_MXS_AUART_CONSOLE
config SERIAL_XILINX_PS_UART config SERIAL_XILINX_PS_UART
tristate "Xilinx PS UART support" tristate "Xilinx PS UART support"
depends on OF
select SERIAL_CORE select SERIAL_CORE
help help
This driver supports the Xilinx PS UART port. This driver supports the Xilinx PS UART port.
......
...@@ -946,15 +946,11 @@ static int __devinit xuartps_probe(struct platform_device *pdev) ...@@ -946,15 +946,11 @@ static int __devinit xuartps_probe(struct platform_device *pdev)
struct resource *res, *res2; struct resource *res, *res2;
int clk = 0; int clk = 0;
#ifdef CONFIG_OF
const unsigned int *prop; const unsigned int *prop;
prop = of_get_property(pdev->dev.of_node, "clock", NULL); prop = of_get_property(pdev->dev.of_node, "clock", NULL);
if (prop) if (prop)
clk = be32_to_cpup(prop); clk = be32_to_cpup(prop);
#else
clk = *((unsigned int *)(pdev->dev.platform_data));
#endif
if (!clk) { if (!clk) {
dev_err(&pdev->dev, "no clock specified\n"); dev_err(&pdev->dev, "no clock specified\n");
return -ENODEV; return -ENODEV;
...@@ -1044,16 +1040,11 @@ static int xuartps_resume(struct platform_device *pdev) ...@@ -1044,16 +1040,11 @@ static int xuartps_resume(struct platform_device *pdev)
} }
/* Match table for of_platform binding */ /* Match table for of_platform binding */
#ifdef CONFIG_OF
static struct of_device_id xuartps_of_match[] __devinitdata = { static struct of_device_id xuartps_of_match[] __devinitdata = {
{ .compatible = "xlnx,xuartps", }, { .compatible = "xlnx,xuartps", },
{} {}
}; };
MODULE_DEVICE_TABLE(of, xuartps_of_match); MODULE_DEVICE_TABLE(of, xuartps_of_match);
#else
#define xuartps_of_match NULL
#endif
static struct platform_driver xuartps_platform_driver = { static struct platform_driver xuartps_platform_driver = {
.probe = xuartps_probe, /* Probe method */ .probe = xuartps_probe, /* Probe method */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment